Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2017-05-18 14:46:58

hummy
Member
Registered: 2013-10-24
Posts: 27
Website

No Related videos in chinese language

Hi, my site in chinese language don't show related videos, is it posible to get it work?
related.php is:

$related    = (VCfg::get('video.related_method') == 'simple')
                ? $this->get_related_simple($video_id, $video['title'], $page)
                : $this->get_related_complex($video_id, $video['tags'], $page);
       
        $this->tpl->menu            = 'video';
       
        $this->tpl->meta_title        = __('related-meta-title', array(e($video['title'])));
        $this->tpl->meta_desc        = __('related-meta-desc', array(e($video['title']), $page, $this->tpl->cfg['site_name']));       
        $this->tpl->meta_keys        = $video['tags'];
       
        $this->tpl->video            = $video;
        $this->tpl->related            = $related['videos'];
        $this->tpl->pagination        = $related['pagination'];

        $this->tpl->load(array('header', 'video_browse', 'footer'));
        $this->tpl->display();   
    }

    private function get_related_simple($video_id, $title, $page)
    {
        $title          = $this->db->escape($title);
        $sql_count      = "SELECT COUNT(*) AS total_related
                             FROM #__video AS v
                           WHERE MATCH (v.title) AGAINST ('".$title."')
                             AND v.status = 1";
        $total_videos    = $this->db->get_field($sql_count, 'total_related');
        $pagination        = VPagination::get($page, $total_videos, VCfg::get('video.browse_per_page'));
        $sql               = "SELECT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb, v.type,
                                  v.thumbs, v.total_views, v.add_time, v.ext, v.hd, v.premium, u.username,
                                  MATCH (v.title) AGAINST ('".$title."') AS relevance
                             FROM #__video AS v
                             LEFT JOIN #__user AS u ON (u.user_id = v.user_id)
                             WHERE MATCH (v.title) AGAINST ('".$title."')
                           AND v.status = 1
                           AND v.video_id != ".$video_id."
                           ORDER BY relevance DESC
                           LIMIT ".$pagination['limit'];
        return array(
              'videos'        => $this->db->get_rows($sql),
              'pagination'    => $pagination
        );
    }

Thaks

Offline

#2 2017-05-18 17:27:06

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: No Related videos in chinese language

thats because mysql fulltext for chinese requires special modifications: http://stackoverflow.com/questions/2794 … characters

i recommend using sphinx


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2017-05-18 23:08:13

hummy
Member
Registered: 2013-10-24
Posts: 27
Website

Re: No Related videos in chinese language

Adrian and with sphinx will work?

Offline

#4 2017-05-19 05:38:53

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: No Related videos in chinese language

yes with sphinx will work, there are several sites in chinese running my script


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB