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 2011-08-30 15:20:14

asko
Member
Registered: 2011-05-11
Posts: 138

Modifying to make a full page of 'recently watched'

This code from frontpage.tpl creates a full page of videos 'most recent '.
Can you please modify it to populate page with  'recently watched' instead of 'most recent'

<?php defined('_VALID') or die('Restricted Access!'); ?>
<div id="pageFrontpage">
<?php if ($this->errors): ?>
<div class="errors">
<?php foreach ($this->errors as $error): echo e($error),'<br />'; endforeach; ?>
</div>
<?php endif; if ($this->messages): ?>
<div class="messages">
<?php foreach ($this->messages as $message): echo e($message),'<br />'; endforeach; ?>
</div>
<?php endif; ?>
<div>
<div ><?php echo __('recent-title'); ?></div>
<div class="content">
<?php if ($this->videos): ?>

---------------------------------------------------
THIS IS CODE THAT POPULATES VIDEOS THUMBS
---------------------------------------------------

<div class="items">
<?php foreach ($this->videos as $video): ?>
<div id="video-<?php echo $video['video_id']; ?>" class="video">
<a href="<?php echo RELATIVE_URL,'/',$video['video_id'],'/',$video['slug']; ?>/" title="<?php echo e($video['title']); ?>" target="_top">
<img src="<?php echo THUMB_URL,'/',path($video['video_id']),'/',$video['thumb']; ?>.jpg" alt="<?php echo e($video['title']); ?>" id="preview-video-<?php echo $video['video_id'].'-'.$video['thumb'].'-'.$video['thumbs']; ?>" /><br />
<h5><?php echo e(VText::truncate_chars($video['title'], 50)); ?></h5>
</a>
<span class="duration"><?php echo VDate::duration($video['duration']); ?></span>
<div class="clear"></div>
</div>
<?php endforeach; ?>

------------------------------------------------

<div class="clear-left"></div>
</div>
<div class="clear"></div>
<?php else: ?>
<div class="none">No videos yet!</div>
<?php endif; ?>
</div>
</div>
<?php echo p('adv', 'frontpage-bottom'); ?>
</div>

Last edited by asko (2011-08-30 15:28:56)

Offline

#2 2011-08-30 16:23:24

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

Re: Modifying to make a full page of 'recently watched'

You already have a page like this if go you to http://www.domain.com/watched/


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

Offline

#3 2011-08-31 03:10:18

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Modifying to make a full page of 'recently watched'

That was a sample code of the frontpage.tlp  with slider you started( trying to finish it with somebody in my city)
I wanted to fill the slider with 'watched' videos instead of 'new videos' that way it will always have fresh thumbs.
Will that work if i use that code from 'watched' and put it in frontpage.tpl ?

That page with watched you mentioned above is generated by  video_browse.tlp if i remember

I suppose i have to make sure the <span clas="videoOptions" > is on 'Being watched' by default

HOW do i do that?

<span class="videoOptions">
<a href="<?php echo RELATIVE_URL,'/recent/"'; if ($this->order == 'recent'): echo ' class="active"'; endif; echo '>',__('recent'); ?></a> &middot;
<a href="<?php echo RELATIVE_URL,'/longest/"'; if ($this->order == 'longest'): echo ' class="active"'; endif; echo '>',__('longest'); ?></a> &middot;
<a href="<?php echo RELATIVE_URL,'/popular/"'; if ($this->order == 'popular'): echo ' class="active"'; endif; echo '>',__('popular'); ?></a> &middot;
<a href="<?php echo RELATIVE_URL,'/watched/"'; if ($this->order == 'watched'): echo ' class="active"'; endif; echo '>',__('being-watched'); ?></a>
</span>

------------------

Otherwise on default scriptpro frontpage.tpl template there is code for those 2 rows of of 'recently watched' seems to be different:
Looks like use different method to appear?

<script type="text/javascript">
$(document).ready(function() {
$("#refresh").click(function(e) {
e.preventDefault();
$("#content-watched-videos").load("<?php echo RELATIVE_URL; ?>/ajax/?s=watched");
});
});
</script>

<div id="right" class="width-760">
<div class="content-box">
<h4 class="content-box-title"><?php echo __('watched-title'); ?></h4>
<a href="<?php echo RELATIVE_URL; ?>/video/watched/" id="refresh" class="content-box-refresh"><?php echo __('refresh'); ?></a>
<div id="content-watched-videos" class="content clear">
<?php if ($this->watched):
echo p('adv_square', 'frontpage-watched');
foreach ($this->watched as $video): ?>
<div id="video-<?php echo $video['video_id']; ?>" class="video">
<a href="<?php echo RELATIVE_URL,'/',$video['video_id'],'/',prepare_string($video['title'], true); ?>/" title="<?php echo e($video['title']); ?>">
<img src="<?php echo THUMB_URL,'/',$video['video_id'],'/',$video['thumb']; ?>.jpg" alt="<?php echo e($video['title']); ?>" id="preview-video-<?php echo $video['video_id'].'-'.$video['thumb'].'-'.$video['thumbs']; ?>-watched" /><br />
<h5><?php echo e(VText::truncate_chars($video['title'], 50)); ?></h5>
<?php if ($video['ext'] == 'mp4'): ?><img src="<?php echo TPL_REL; ?>/images/hd.png" class="watermark" alt="" /><?php endif; ?>
</a>
<span class="duration"><?php echo date('i:s', (int) $video['duration']); ?></span>
<div class="rating_bar"><div style="width:<?php echo round($video['rating']*20); ?>%"></div></div>
<span class="timeline clear"><?php echo VDate::nice($video['add_date']); ?></span>
<span class="views"><?php echo $video['total_views'],' '; if ($video['total_views'] == '1'): echo __('view'); else: echo __('views'); endif; ?></span>
<div class="clear"></div>
</div>
<?php endforeach; ?>
<div class="clear-left"></div>
<?php else: ?>
<div id="no-watched-videos" class="none"><?php echo __('no-watched'); ?></div>
<?php endif; ?>
</div>

Last edited by asko (2011-08-31 03:53:46)

Offline

#4 2011-08-31 06:43:03

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

Re: Modifying to make a full page of 'recently watched'

I'm sorry, but i dont understand the entire code, there are css definitions that are not part of the script and i dont know what they do. If you want to fill the slider with watched videos, then the only thing you need to change is the mysql query code.

PS: Please use the bbcode code notation when pasting code, it is easier to read.


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

Offline

#5 2011-08-31 12:41:10

asko
Member
Registered: 2011-05-11
Posts: 138

Re: Modifying to make a full page of 'recently watched'

Yes the mysql query code, can you please tell me what to write instead for the mysql query code?
(That's what i was actually asking in the first post in section ...THIS IS CODE THAT POPULATES VIDEOS THUMBS, that the part that must be modified right? )

PS:will use bbcode next time

Last edited by asko (2011-08-31 12:43:13)

Offline

Board footer

Powered by FluxBB