How we can set random video in Youtube style Guide

This is forum to report Nuevoplayer 5 possible bugs and issues and to publish Nuevoplayer 5 fixes and updates.

How we can set random video in Youtube style Guide

Postby nomoreturn » Sun Aug 14, 2011 10:31 pm

Hello , i want to know how we can set random video in youtube style guide right now permoted video changed every time but below that 4 video remain same every time and in every video they are not changed
Check it out these two links

1 - http://pakmotion.com/videos/141/ooh-ooh ... omo-wanted

2 - http://pakmotion.com/videos/201/lexus-is-c-2010

and you will notice that permoted videos changed but bellow 4 videos remain same
Pakmotion.com
nomoreturn
 
Posts: 39
Joined: Thu Apr 21, 2011 12:01 am
Location: Pakistan

Re: How we can set random video in Youtube style Guide

Postby dargre » Mon Aug 15, 2011 3:43 am

By default if current video id defined in file "guideyt.php" 4 related videos are set.
But if your videos detail is not enough unique - this may finish mostly with same result.

If you prefer to have 4 random video, trye to edit file "guideyt.php" (/nuevo/player/), and replace mysql query for related videos.
This is long line:
Code: Select all
$sql  = "SELECT indexer, video_id, title, title_seo, video_length, number_of_views FROM videos WHERE public_private='public' AND approved = 'yes' AND video_id != '" .$video['video_id']. "' AND ( title LIKE '%" .mysql_real_escape_string($video['title']). "%' " .$sql_add. ") LIMIT 4";

Replace it with:
Code: Select all
$sql  = "SELECT indexer, video_id, title, title_seo, video_length, number_of_views FROM videos WHERE public_private='public' AND approved = 'yes' ORDER BY RAND() LIMIT 4";
Thank you,
Nuevolab Team
dargre
 
Posts: 331
Joined: Mon Sep 07, 2009 3:47 am


Return to Nuevoplayer 5 Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron