Forum

Forum - DatingScript

Online dating software

You are not logged in.

#1 2019-10-26 23:56:07

zoltar
Member
Registered: 2013-03-12
Posts: 397

hey guys i need some help

im looking for a code that i could put on the video page that would allow me to put 6 random videos on the video view page
so users dont need to go back to the video index to pick a video
some thing like this

    <? elseif ( $item == 'videos' ): ?>
                                <? $cache = videos_helper::getVideos(array('join_columns' => array_merge(array("`v`.`adult`=0", "`v`.`password` is null"), config::item('home_videos_featured', 'template') ? array("`v`.`featured`=1") : array()), 'limit' => config::item('home_'.$item, 'template'))); ?>
                            <? endif; ?>

but i cant get it to work can anyone help

Last edited by zoltar (2019-10-26 23:57:56)

Offline

#2 2019-11-04 20:45:38

radioact
Staff
Registered: 2013-05-26
Posts: 214

Re: hey guys i need some help

Try something like this:
<?= videos_helper::getVideos(array('join_columns' => array_merge(array("`v`.`adult`=0", "`v`.`password` is null"), array()), 'limit' => 6)); ?>

Offline

#3 2019-11-05 09:55:17

jackal
Member
From: Austin, Texas
Registered: 2013-03-12
Posts: 1,789

Re: hey guys i need some help

Also, it would be nice if we could display videos by the same poster "OR" display related videos (base on the category).

Anyone?

Last edited by jackal (2019-11-05 09:55:36)

Offline

#4 2019-11-05 12:49:49

zoltar
Member
Registered: 2013-03-12
Posts: 397

Re: hey guys i need some help

thanks radio act. but how do i get it to go random not show me the last 6 videos uploaded

Last edited by zoltar (2019-11-05 12:50:40)

Offline

#5 2019-11-05 13:36:17

zoltar
Member
Registered: 2013-03-12
Posts: 397

Re: hey guys i need some help

sorry got it works great
<?= videos_helper::getVideos(array('join_columns' => array_merge(array("`v`.`adult`=0", "`v`.`password` is null"), array()), 'limit' => 6, 'order' => 'rand()'));?>

Offline

Board footer