How to show related videos in mobile


#1

we all know that mobile is the future of the internet, but in the clipbucket script
we can not see videos relasionados in the watch video page.
The majority of my users come from the mobile devices and I would like to be able to show the related videos.

Clipbucket team please can you give us a solution to be able to show related videos


#2

I think I found the solution to this inconvenience,
I do not know if it’s the correct one but it works,
please note that it is only tested on a samsung galaxy s7 phone.
You can visit the site from your mobil device, and see if it works.
Clic Here

https://vevios.com/sony-drops-price-of-playstation-vr-bundle_v1011

Related videos will appear below the comments box

This is the way to apply the code.

in the file “watch_video.html”
Look for the line “</ section>” and above paste the following code

               <div class="visible-xs">
				<div class="box-ad ad">{AD place='ad_300x250'}</div>

				<h2>{if $smarty.get.play_list}Playlist Videos{elseif $relMode != 'ono'}Related Videos{else}Popular Videos{/if}</h2>
				<div class="clearfix sidebar-items">
					{if $smarty.get.play_list}

					{foreach $items as  $key => $item}
					{if $item.videokey == $vdo.videokey}
					{$current_key = $key}
					{/if}
					{/foreach}

					{$next_item_key = $current_key+1}
					{$prev_item_key = $current_key-1}
					{assign var=count_index value=count($items)}
					
					{if $next_item_key==$count_index}
					{$next_videoLink = '#'}
					{else}
					{$next_videoLink = videoLink($items.$next_item_key)}
					{/if}

					{if $items.$prev_item_key==0}
					{$prev_videoLink = '#'}
					{else}
					{$prev_videoLink = videoLink($items.$prev_item_key)}
					{/if}

					<div class="clearfix" style="padding-bottom:10px;">
						<a href="{$prev_videoLink }"  id="" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-step-backward"></span> Previous </a>
						<a href="{$next_videoLink }"  id=""  class="btn btn-primary btn-xs"> Next <span class="glyphicon glyphicon-step-forward"></span></a>
					</div>



					<div id="playlist_items">
						{$cur_playlist = $smarty.get.play_list}
						{$total_items = $cbvid->action->count_playlist_items($cur_playlist)}
						{section name=plist loop=$items}
						{include file="$style_dir/blocks/manage/account_video.html" video=$items[plist] control="onWatch" pid=$playlist.playlist_id}
						{/section}
					</div>
					{if $total_items > 10}
					<button class="btn btn-primary text-centre" id="playlist-pull" dataList={$cur_playlist} dataLimit="10" dataHit="2">Load More</button>
					{/if}
					{else}			    	
					{if $videos}
					{foreach from=$videos item=pop_video}

					{if $pop_video@iteration == 9}
					{break}
					{/if}
					<div class="clearfix popular-video">
						{include file="$style_dir/blocks/videos/video.html" display_type='popVideos_sidebar'}
					</div>
					{/foreach}

					{else}
					<div class="well well-info">No Videos Found !</div>
					{/if}
					{/if}
				</div>
				</div>

#3

I just tried this code on my site and it worked first time with an iPhone without any mods. Perfect. Thanks.


#4

Thanks for your comment, Can you share your website with us?


#5

Works well for me.
https://www.vituga.com
https://www.fadomeu.com
https://www.trailersmania.com

Thanks

JQ


#6

Sorry I have not logged in here for months. The related videos thing still works although I am running version 2.8.?. The website is Tribal Trails.


#7

Thank you very much.

It is working with ClipBucket V4.0 RC1 too.


#8

Thumbs up! Works perfect!

Thank you for sharing!