Random Videos Homepage


#1

Hello

Currently the homepage shows “Recent videos”

The code below is what shows the recent videos. How do we change this to show “Random Videos” ? or is there any way ?

{if $display_type=='normal' || $display_type==''}
<div class="item-video col-lg-6 col-md-6 col-sm-6 col-xs-12">
	<div class="clearfix thumb-holder">
		<a class="video-link" href="{videoLink($video)}" title="{$video.title|title}">
			<img class="img-responsive" src="{getThumb vdetails=$video size=416x260 }">
		</a>
		<img src="{$theme}/images/thumb-ratio.png" class="thumb-ratio" alt="">
		
		{ANCHOR place='in_video_thumb' data=$video}
		<button data-quick="quick-{$video.videoid}"
 class="icon-plus2 cb_quickie cb-btn-quick-{$video.videoid} {if in_array($video.videoid, $qlist_vids)}icon-tick{/if}" vtitle="{$video.title}" v-id="{$video.videoid}" vlink="{videoLink($video)}" vthumb="{getThumb vdetails=$video size=600x338 }" vduration="{$video.duration|SetTime}" title="Add {$video.title} to Quicklist">
		</button>
		<span class="duration">{if $video.duration>1}{$video.duration|SetTime}{else}00:00{/if}</span>
		
	</div>
	<div class="clearfix video-info">
		<h2 class="title"><a href="{videoLink($video)}">{$video.title|truncate:50}</a></h2>
		<span class="author">{lang code="by"}&nbsp;<a href="{$userquery->profile_link($video)}">{$video.username}</a></span>
		<div class="clearfix views-date">
			<span>{$video.views}&nbsp;{lang code="views"}</span>
			<time class="date" datetime="2016-15-03">{$video.date_added|niceTime}</time>
		</div>
	</div>
</div>
{/if}

Kind regards


#2

You need to specify more details if you want help.
Which version of CB are your using?
Which file is this code from?
Where do you want to put the random files? In the sidebar? Under the larger thumbnails on the main page?


#3

Hello

Thank you for the reply.

I am using ClipBucket: v2.8.3

I just want to show random videos on the homepage.

Any suggestions would be appreciated.

Kind regards


#4

{$random_picks = get_videos([“category” =>“1”, “active” =>" yes", ‘order’=>’ RAND() LIMIT 3 '])}