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.
Pages: 1
the next button of the related videos under the videoplayer dosent work anymore
Offline
Will check. I think i have access to your server in emails.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
mines never work
Offline
Checking!
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Hi, I'm new here. Mine doesn't work either. Is there a fix for this?
Offline
Hmmm....i'm gonna provide a fix. It should work.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Ok. How long will I have to wait? I hate paying for things and they don't work. Just a little agitating. Thanks.
Last edited by cybra (2012-02-15 08:19:37)
Offline
Hey man you know what. I see where this is going. Don't worry about it, because I know you must have a lot on your plate. I probably will just get another programmer I know to look at it.
Offline
I was going to checkout why the related button doesnt work right now, but if you want to hire someone to do this, i have no problem with that. Good luck.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
I just tested this on scriptdevel.com and my box and it works. Anyone that reported this, please email me FTP access so i can check.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
mine does not work as well you have my ftp details i evan made you an account
Offline
I mean I would rather not have to pay anyone else to do it. I will PM you a temp ftp also.
Offline
Fixed the related videos problem. Please replace templates/your-template/extend/ajax/replated.plugin.php with the below code:
<?php
defined('_VALID') or die('Restricted Access!');
function ajax_plugin_related()
{
$data = array('status' => 0, 'msg' => '', 'code' => '', 'debug' => '');
if (isset($_POST['video_id']) && isset($_POST['page'])) {
$video_id = (int) $_POST['video_id'];
$page = (int) $_POST['page'];
$db = VF::factory('database');
$db->query("SELECT v.title, GROUP_CONCAT(DISTINCT vt.name) AS tags,
GROUP_CONCAT(DISTINCT c.cat_id) AS categories
FROM #__video AS v
INNER JOIN #__video_tags AS vt ON (vt.video_id = v.video_id)
INNER JOIN #__video_category AS c ON (c.video_id = v.video_id)
WHERE v.video_id = ".$video_id."
AND v.status = 1
LIMIT 1");
if ($db->affected_rows()) {
VLanguage::load('frontend.video');
$video = $db->fetch_assoc();
$vcfg = VF::cfg('module.video');
$limit = $vcfg['related_per_page'];
$start = ($page === 1) ? 0 : ($page*$limit);
if ($vcfg['related_category']) {
$query = ($vcfg['related_method'] == 'simple')
? get_related_category_simple($video_id, $video['title'], $video['categories'], $start, $limit)
: get_related_category_complex($video_id, $video['tags'], $video['categories'], $start, $limit);
} else {
$query = ($vcfg['related_method'] == 'simple')
? get_related_simple($video_id, $video['title'], $start, $limit)
: get_related_complex($video_id, $video['tags'], $start, $limit);
}
$related_total = $query['total'];
if ($related_total > $vcfg['related_total']) {
$related_total = $vcfg['related_total'];
}
$pagination = VPagination::get($page, $related_total, $limit);
$tpl_url = BASE_URL.'/templates/'.VF::cfg_item('template');
$code = array();
$code[] = '<div id="related-left" class="related-bar">';
$code[] = ($page > 1) ? '<a href="#related-page-'.$pagination['prev_page'].'" id="related-'.$pagination['prev_page'].'"><img src="'.$tpl_url.'/images/related-bar-left.png" alt="" /></a>' : ' ';
$code[] = '</div>';
$code[] = '<div class="content left width-900" style="min-height: 400px;">';
if ($related) {
foreach ($related as $video) {
$title = htmlspecialchars($video['title'], ENT_QUOTES, 'UTF-8');
$views = ($video['total_views'] == '1') ? __('view') : __('views');
$code[] = '<div id="video-'.$video['video_id'].'" class="video related">';
$code[] = '<a href="'.BASE_URL.'/'.$video['video_id'].'/'.$video['slug'].'/" title="'.$title.'">';
$code[] = '<img src="'.THUMB_URL.'/'.path($video['video_id']).'/'.$video['thumb'].'.jpg" alt="'.$title.'" id="preview-video-'.$video['video_id'].'-'.$video['thumb'].'-'.$video['thumbs'].'" /><br />';
$code[] = '<h5>'.htmlspecialchars(VText::truncate_chars($video['title'], 50), ENT_QUOTES, 'UTF-8').'</h5>';
if ($video['ext'] == 'mp4') {
$code[] = '<img src="'.$tpl_url.'/images/hd.png" class="watermark" alt="" />';
}
$code[] = '</a>';
$code[] = '<span class="duration">'.VDate::duration($video['duration']).'</span>';
$code[] = '<div class="rating_bar"><div style="width:'.round($video['rating']*20).'%"></div></div>';
$code[] = '<span class="timeline clear">'.VDate::nice($video['add_time']).'</span>';
$code[] = '<span class="views">'.$video['total_views'].' '.$views.'</span>';
$code[] = '<div class="clear"></div>';
$code[] = '</div>';
}
$code[] = '<div class="clear-left"></div>';
} else {
$code[] = '<div class="none">'.__('no-related-videos').'</div>';
}
$code[] = '</div>';
$code[] = '<div id="related-right" class="related-bar">';
$code[] = ($page < $pagination['total_pages']) ? '<a href="#related-page-'.$pagination['next_page'].'" id="related-'.$pagination['next_page'].'"><img src="'.$tpl_url.'/images/related-bar-right.png" alt="" /></a>' : ' ';
$code[] = '</div>';
$code[] = '<div class="clear-left"></div>';
$data['code'] = implode("\n", $code);
$data['status'] = 1;
} else {
$data['msg'] = 'Invalid ajax request!';
}
} else {
$data['msg'] = 'Invalid ajax request!';
}
return json_encode($data);
}
function get_related_category_simple($video_id, $title, $categories, $start, $limit)
{
$db = VF::factory('database');
$title = $db->escape($title);
$sql_count = "SELECT COUNT(*) AS total_related
FROM #__video AS v
INNER JOIN #__video_category AS c ON (c.video_id = v.video_id AND c.cat_id IN (".$categories."))
WHERE MATCH (v.title) AGAINST ('".$title."')
AND v.status = 1";
return array(
'total' => $db->get_field($sql_count, 'total_related'),
'sql' => "SELECT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
v.thumbs, v.total_views, v.add_time, v.ext, u.username,
MATCH (v.title) AGAINST ('".$title."') AS relevance
FROM #__video AS v
INNER JOIN #__video_category AS c ON (c.video_id = v.video_id AND c.cat_id IN (".$categories."))
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 ".$start.",".$limit
);
}
function get_related_category_complex($video_id, $tags, $categories, $start, $limit)
{
VF::load('sphinxapi.sphinxapi');
$sphinx = new SphinxClient();
$sphinx->SetServer('localhost', 3312);
$sphinx->SetConnectTimeout(1);
$sphinx->SetFieldWeights(array('tags' => 100, 'title' => 70, 'description' => 30));
$sphinx->SetFilter('categories', array_values(explode(',', $categories)));
$sphinx->SetFilter('video', array($video_id), true);
$sphinx->SetMatchMode(SPH_MATCH_ANY);
$sphinx->SetLimits($start, $limit, 1000);
$results = $sphinx->Query(str_replace(',',' ', $tags), 'videos');
if (isset($results['total']) && isset($results['matches'])) {
$ids = implode(',', array_keys($results['matches']));
return array(
'total' => $results['total'],
'sql' => 'SELECT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
v.thumbs, v.total_views, v.add_time, v.ext, u.username
FROM #__video AS v
LEFT JOIN #__user AS u on (u.user_id = v.user_id)
WHERE v.video_id IN ('.$ids.')
ORDER BY FIELD (v.video_id, '.$ids.')'
);
}
return array('total' => 0, 'sql' => FALSE);
}
function get_related_simple($video_id, $title, $start, $limit)
{
$db = VF::factory('database');
$title = $db->escape($title);
$sql_count = "SELECT COUNT(*) AS total_related
FROM #__video AS v
WHERE MATCH (v.title) AGAINST ('".$title."')
AND v.status = 1";
return array(
'total' => $db->get_field($sql_count, 'total_related'),
'sql' => "SELECT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
v.thumbs, v.total_views, v.add_time, v.ext, 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 ".$start.",".$limit
);
}
function get_related_complex($video_id, $tags, $start, $limit)
{
VF::load('sphinxapi.sphinxapi');
$sphinx = new SphinxClient();
$sphinx->SetServer('localhost', 3312);
$sphinx->SetConnectTimeout(1);
$sphinx->SetFieldWeights(array('tags' => 100, 'title' => 70, 'description' => 30));
$sphinx->SetMatchMode(SPH_MATCH_ANY);
$sphinx->SetFilter('video', array($video_id), true);
$sphinx->SetLimits($start, $limit, 1000);
$results = $sphinx->Query(str_replace(',', ' ', $tags), 'videos');
if (isset($results['total']) && isset($results['matches'])) {
$ids = implode(',', array_keys($results['matches']));
return array(
'total' => $results['total'],
'sql' => 'SELECT v.video_id, v.title, v.slug, v.rating, v.rated_by, v.duration, v.thumb,
v.thumbs, v.total_views, v.add_time, v.ext, u.username
FROM #__video AS v
LEFT JOIN #__user AS u on (u.user_id = v.user_id)
WHERE v.video_id IN ('.$ids.')
ORDER BY FIELD (v.video_id, '.$ids.')'
);
}
return array('total' => 0, 'sql' => FALSE);
}
Or you can download the file from http://www.pronguide.com/related.plugin.php.txt
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Still not working..smh http://thatassphat.com/204/3-phat-asses-catching-loads/ I thought you were just gonna fix it since I gave you ftp access.
Offline
It is fixed on your site. If you changed the code again, then thats the problem, but i fixed it first on your site and after that i posted the fix topic.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Offline
can you please fix mines
Offline
Pages: 1