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
How to call models and channels to display under video thumb. my intention is to replace time and views by model names and channels.
Tried this code but doesn´t work
<span class="pull-left"><?php if (isset($this->pornstars) && $this->pornstars): echo '<br>',__('pornstars'),':'; foreach ($this->pornstars as $model):
echo '<a href="',REL_URL,'/pornstar/',$model['slug'],'/" >',e($model['name']),'</a>'; endforeach; endif; ?></span>
Offline
Hmm...you want to show the models for a video below the video?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Yes
Name of the model under the thumb in homepage and video view, same for channel name
Similar to changes in this image
Offline
Its not as easy as modifying the template. The data needs to be pulled out of the database in the components for the pages you want modified. For example in modules/video/components/video/browse.php you need to change:
$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
FROM #__video AS v
LEFT JOIN #__user AS u ON (u.user_id = v.user_id)
WHERE v.status = 1";
to
$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, v.channel_id, c.name AS cname, c.slug AS cslug,
GROUP_CONCAT(m.name) AS models,
GROUP_CONCAT(m.slug) AS slugs
FROM #__video AS v
LEFT JOIN #__user AS u ON (u.user_id = v.user_id)
LEFT JOIN #__channel AS c ON (c.channel_id = v.channel_id)
LEFT JOIN #__model_videos AS mv ON (mv.video_id = v.video_id)
LEFT JOIN #__model AS m ON (m.model_id = mv.model_id)
WHERE v.status = 1";
and you also need to add:
$sql .= "GROUP BY v.video_id";
right before:
switch ($order) {
Once this is done you can modify the code in the template (templates/defboot/_video_list.tpl.php), change:
<div class="video-details hidden-xs hidden-sm">
<span class="pull-left"><?php echo VDate::nice($video['add_time']); ?></span>
<span class="pull-right text-right"><?php echo $video['total_views'],' '; if ($video['total_views'] == '1'): echo __('view'); else: echo __('views'); endi
f; ?></span>
</div>
to:
<div class="video-details hidden-xs hidden-sm">
<span class="pull-left">
<?php $names = explode(',', $video['models']; $slugs = explode(',', $video['slugs']); $count = count($slugs); foreach ($slugs as $index => $slug): ?>
<a href="<?php echo REL_URL,'/pornstar/',$slug,'/">',e($names[$index]); ?></a><?php if ($index !== $count): echo ', '; endif; ?>
<?php endforeach; ?>
</span>
<span class="pull-right text-right"><a href="<?php echo REL_URL,'/channel/,$video['cslug'],'/">',e($video['cname']); ?></a></span>
</div>
Did not test this, if any bugs, let me know.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Query: 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, v.channel_id, c.name AS cname, c.slug AS cslug, GROUP_CONCAT(m.name) AS models, GROUP_CONCAT(m.slug) AS slugs FROM prvideo AS v LEFT JOIN pruser AS u ON (u.user_id = v.user_id) LEFT JOIN prchannel AS c ON (c.channel_id = v.channel_id) LEFT JOIN prmodel_videos AS mv ON (mv.video_id = v.video_id) LEFT JOIN prmodel AS m ON (m.model_id = mv.model_id) WHERE v.status = 1GROUP BY v.video_id ORDER BY v.add_time DESC LIMIT 20
Error Message: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY v.video_id ORDER BY v.add_time DESC LIMIT 20' at line 11
Error Number: 1064
Offline
there needs to be a space after WHERE v.status = 1...replace this $sql .= "GROUP BY v.video_id"; with $sql .= " GROUP BY v.video_id";
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Done that and all major errors gone
Just this one shows
Query:
Error Message:
Error Number: 0
Offline
Oki. I'll connect to your server and add this. Same server as the other sites? For which site is this btw?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
I added the names already jazziegirls.com/recent/ but having trouble in adding click on models names > go to models page
yes same server
Offline
fixed
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Thank you Adrien
Any reason why they disappear from home page ? but show in recent.
Offline
You need to modify modules/frontpage/frontpage.php also...all files that pull videos from the database...
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Pages: 1