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 2016-10-13 19:25:01

K!ng
Member
Registered: 2013-01-18
Posts: 103
Website

Related videos

I have a problems with related videos under the player, because a lot of embeeded videos are old like 3-5 years and they are not working anymore. How to change, that related videos will be the "newest" related videos? Like only few months old ...

tnx

Offline

#2 2016-10-15 12:19:56

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

Re: Related videos

what version of the script are you running?


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

Offline

#3 2016-10-18 17:45:00

K!ng
Member
Registered: 2013-01-18
Posts: 103
Website

Re: Related videos

i think 2.2.1 ... i have message to update to 2.2.2 where can i check version?

Offline

#4 2016-10-20 13:37:05

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

Re: Related videos

You have to edit modules/video/components/view.php and replace the get_related_simple function as following:

    private function get_related_simple($video_id, $title)
    {
        $title      = $this->db->escape($title);
        $sql_count  = "SELECT COUNT(*) AS total_related
                       FROM #__video AS v WHERE v.status = 1";
        return array(
            'total' => $this->db->get_field($sql_count, 'total_related'),
            'sql'   => "SELECT v.video_id, v.title, v.slug, v.likes, v.rating, v.rated_by, v.duration, v.thumb,
                               v.thumbs, v.total_views, v.add_time, v.ext, v.hd, v.premium, v.type, 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 v.status = 1
                        AND v.video_id != ".$video_id."
                        ORDER BY v.add_time DESC LIMIT ".VCfg::get('video.related_per_page')
        );
    }

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

Offline

Board footer

Powered by FluxBB