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 2015-11-01 20:14:23

ivatigoal
Member
Registered: 2013-06-07
Posts: 367
Website

[NOT A BUG] Mobile related videos

If I use the mobile version the related videos of any video are all the same. Also I don't see anymore the option at the mobile module to the related to choose either simple or complex


Analtube4u

Offline

#2 2015-11-04 10:38:33

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

Re: [NOT A BUG] Mobile related videos

The mobile part of the script never had any sphinx option. Will add this in a future version.


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

Offline

#3 2015-12-10 17:47:24

ivatigoal
Member
Registered: 2013-06-07
Posts: 367
Website

Re: [NOT A BUG] Mobile related videos

You have to add this option at some point because the related videos feature in the mobile site is really not efficient. For example if we open a video and then we see the list of the related videos and we choose one of them then the related videos of that will be most of the times the same like the related like the first one. That is why I thought at the beginning that the related is always the same.


Analtube4u

Offline

#4 2015-12-11 06:32:11

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

Re: [NOT A BUG] Mobile related videos

I could replace related videos via tags with related videos via full text match.


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

Offline

#5 2015-12-11 11:45:40

ivatigoal
Member
Registered: 2013-06-07
Posts: 367
Website

Re: [NOT A BUG] Mobile related videos

We can try that, can u please let me know if it is easy what part of the code to change?


Analtube4u

Offline

#6 2015-12-11 14:06:36

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

Re: [NOT A BUG] Mobile related videos

Edit mobile/components/video_view.php and find:

$this->tpl->related         = $this->get_related_videos($video_id, $video['tags']);

replace with:

 $this->tpl->related         = $this->get_related_videos($video_id, $video['title'], $video['tags']);

find:

        if (!$videos = $this->cache->get($cache_id, 86400)) {
            $tags       = explode(',', $tags);
            $sql_add    = array();
            foreach ($tags as $tag) {
                $sql_add[] = "'".$this->db->escape($tag)."'";
            }
    
            $sql    = "SELECT DISTINCT v.video_id, v.title, v.slug, v.description, v.thumb,
                                       v.rating, v.total_views, v.duration
                       FROM #__video_tags AS t
                       INNER JOIN #__video AS v ON (v.video_id = t.video_id AND v.status = 1 AND v.mobile = '1' AND v.video_id != ".$video_id.")
                       WHERE t.name IN (".implode(',', $sql_add).")
                       ORDER BY v.add_time DESC
                       LIMIT ".$this->mcfg['related_per_page'];
            $this->db->query($sql);
            if ($this->db->affected_rows()) {
                $videos = $this->db->fetch_rows();
                $this->cache->store($cache_id, $videos, 86400);
            } else {
                $videos = array();
            }
        }

replace with:

        if (!$videos = $this->cache->get($cache_id, 86400)) {
            $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 MATCH (v.title) AGAINST ('".$title."')
                        AND v.status = 1
                        AND v.video_id != ".$video_id."
                        AND v.mobile = '1'
                        ORDER BY relevance DESC LIMIT ".$this->mcfg['related_per_page'];
            $this->db->query($sql);
            if ($this->db->affected_rows()) {
                $videos = $this->db->fetch_rows();
                $this->cache->store($cache_id, $videos, 86400);
            } else {
                $videos = array();
            }
        }

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

Offline

#7 2015-12-12 08:26:57

ivatigoal
Member
Registered: 2013-06-07
Posts: 367
Website

Re: [NOT A BUG] Mobile related videos

I get no related videos with this code


Analtube4u

Offline

#8 2015-12-13 08:02:56

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

Re: [NOT A BUG] Mobile related videos

Oki. Will be updated in 2.0.13.


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

Offline

Board footer

Powered by FluxBB