2016-03-16 17:30:07 +05:00
|
|
|
<div id="main" class="clearfix container">
|
|
|
|
<div id="messageFav" class="alert alert-info marginTop" style="display:none; height:66px;">
|
|
|
|
</div>
|
|
|
|
<div class="clearfix">
|
|
|
|
<div id="content">
|
|
|
|
<div class="clearfix leaderboard-ad">
|
|
|
|
<div class="ad">{AD place='ad_728x90'}</div>
|
|
|
|
</div>
|
|
|
|
{$row = $myquery->Get_Website_Details()}
|
|
|
|
{if is_installed('editorspick')}
|
|
|
|
{if $editor_picks}
|
|
|
|
<div class="clearfix editorpick">
|
|
|
|
<div class="editorpick-holder">
|
|
|
|
<!-- Editor Pick Video Main Container START //-->
|
|
|
|
<div id="ep_video_container">
|
|
|
|
{if is_installed('editorspick')}
|
|
|
|
{section name=e_list loop=$editor_picks max=1}
|
|
|
|
{include file="$style_dir/blocks/editor_pick/video_block.html" video=$editor_picks[e_list]}
|
|
|
|
{sectionelse}
|
|
|
|
There is no video in editor's pick, Please Add Videos In Editor's Pick<br />Videos Manager > Add to editor's pick
|
|
|
|
{/section}
|
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
<!-- Editor Pick Video Main Container END //-->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Editor Pick Videos Slider Container START //-->
|
|
|
|
<div class="editorpick-videos custom-elements">
|
|
|
|
<div class="scrollable-area vscrollable">
|
|
|
|
{section name=e_list loop=$editor_picks}
|
|
|
|
{include file="$style_dir/blocks/editor_pick/index_featured_video.html" video=$editor_picks[e_list]}
|
|
|
|
{/section}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Editor Pick Videos Slider Container END //-->
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
{/if}
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
<!-- ************ EDITORS BLOCK END ************ -->
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
{$limit = '2'}
|
|
|
|
{$featured=$cbvid->get_videos(["featured"=>"yes","limit"=>$limit])}
|
|
|
|
{if $featured}
|
2016-03-17 14:10:40 +05:00
|
|
|
<section id="featured_vid_sec" class="clearfix featured-videos">
|
2016-03-16 17:30:07 +05:00
|
|
|
<h1>{lang code="Featured Videos"}</h1>
|
|
|
|
<div class="clearfix row">
|
|
|
|
{foreach from=$featured item=video}
|
|
|
|
<div class="item-video col-lg-6 col-md-6 col-sm-6 col-xs-12">
|
|
|
|
{include file="$style_dir/blocks/videos/video.html" display_type='featuredVideos'}
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
2016-03-18 17:47:12 +05:00
|
|
|
</div>
|
|
|
|
<div class="clearfix">
|
|
|
|
<button id="featured_load_more" class="btn btn-primary btn-block" loadtype="video" loadmode="featured" loadlimit="2" loadhit="2">Load More</button>
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{else}
|
|
|
|
<div class="well well-info">No Videos Found !</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{$videos=get_videos(["order" =>"date_added DESC", "limit" =>6])}
|
2016-03-16 19:32:19 +05:00
|
|
|
<section id="recent_vids_sec" class="clearfix videos">
|
2016-03-16 17:30:07 +05:00
|
|
|
<h1>{lang code="Recent Videos"}</h1>
|
|
|
|
<div class="clearfix row">
|
|
|
|
{foreach $videos as $video}
|
|
|
|
<div class="item-video col-lg-4 col-md-4 col-sm-4 col-xs-6">
|
|
|
|
{include file="$style_dir/blocks/videos/video.html" display_type='homeVideos'}
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
2016-03-18 17:47:12 +05:00
|
|
|
</div>
|
|
|
|
<div class="clearfix">
|
2016-03-17 15:27:19 +05:00
|
|
|
<button id="recent_load_more" class="btn btn-primary col-md-12 col-sm-12" loadtype="video" loadmode="recent" loadlimit="8" loadhit="2">Load More</button>
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<aside id="sidebar">
|
|
|
|
<div class="box-ad ad">{AD place='ad_300x250'}</div>
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
<!-- ************* USER BLOCK START ************ -->
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
{$feature_users=get_users(['featured'=>'yes','limit'=>5])}
|
|
|
|
{if $feature_users}
|
|
|
|
<h2>{lang code="Featured Users"}</h2>
|
|
|
|
<div class="clearfix sidebar-channels">
|
|
|
|
{foreach $feature_users as $user}
|
|
|
|
|
|
|
|
<div class="clearfix channel-item">
|
|
|
|
<a href="{$userquery->profile_link($user)}" class="avatar">
|
|
|
|
<img src="{$userquery->getuserthumb($user,'small')}" width="50" height="50" class="cb-rounded">
|
|
|
|
</a>
|
|
|
|
<div class="channel-info">
|
|
|
|
<h3><a href="{$userquery->profile_link($user)}">{$user.username}</a></h3>
|
|
|
|
<div class="clearfix views-videos">
|
|
|
|
<span>{$user.profile_hits|number_format} {lang code='views'}</span>
|
|
|
|
<span>{$user.total_videos|number_format} {lang code='Videos'}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
<!-- ************* USER BLOCK END ************** -->
|
|
|
|
<!-- ******************************************* -->
|
|
|
|
|
|
|
|
{if $row.collectionsSection == 'yes'}
|
|
|
|
{$collections = $cbcollection->get_collections(['limit'=>5, 'active'=>'yes'])}
|
|
|
|
<h2>{lang code="Top Collections"}</h2>
|
|
|
|
<div class="clearfix collections-grid">
|
|
|
|
<div class="clearfix row">
|
|
|
|
{$limit=10}
|
|
|
|
{if $collections}
|
|
|
|
{foreach from=$collections item=collection}
|
2016-03-17 12:25:52 +05:00
|
|
|
{$first_col_thumb = $cbcollection->coll_first_thumb($collection,'l')}
|
2016-03-16 17:30:07 +05:00
|
|
|
<div class="clearfix collection-item col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
|
|
|
<div class="collection-holder">
|
|
|
|
<div class="photo-block">
|
|
|
|
<a href="{$cbphoto->photo_links($item,'view_item')}">
|
2016-03-17 11:58:03 +05:00
|
|
|
<img alt="{$collection.title}" title="{$collection.title}" class="img-responsive" id="photo_{$collection.ci_id}" src="{$first_col_thumb}">
|
2016-03-16 17:30:07 +05:00
|
|
|
</a>
|
|
|
|
</div>
|
2016-03-17 17:12:11 +05:00
|
|
|
<div class="collection-info">
|
|
|
|
<span>{$collection.total_objects}</span>Photo(s)
|
|
|
|
</div>
|
|
|
|
<img src="{$theme}/images/photo-bg.png" alt="" class="photo-bg">
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
|
|
|
<span>{$collection.collection_name}</span>
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
{else}
|
|
|
|
<div class="col-md-12 nopadding">No Collection</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
{/if}
|
2016-03-17 17:12:11 +05:00
|
|
|
|
|
|
|
<!-- playlists -->
|
|
|
|
{$playlists = get_playlists(['limit'=>5, 'order'=>'total_items DESC'])}
|
|
|
|
<div class="clearfix sidebar-playlists">
|
|
|
|
<h2>{lang code="Top Playlists"}</h2>
|
|
|
|
{if $playlists}
|
|
|
|
{foreach $playlists as $playlist}
|
|
|
|
<div class="playlist clearfix">
|
|
|
|
<h3>{$playlist.playlist_name}</h3>
|
|
|
|
{$items = get_playlist_items($playlist.playlist_id)}
|
|
|
|
<div class="clearfix row">
|
|
|
|
{foreach $items as $item}
|
|
|
|
{if $item@iteration == 5}
|
|
|
|
{break}
|
|
|
|
{/if}
|
|
|
|
<div class="video col-lg-3 col-md-4 col-sm-6 col-xs-6">
|
|
|
|
{$videoid = $item.videoid}
|
|
|
|
{if $videoid}
|
|
|
|
{$videos = get_videos(['videoid'=>$videoid,'limit'=>'2'])}
|
|
|
|
{foreach $videos as $video}
|
|
|
|
<a href="{videoLink($video)}">
|
|
|
|
{$thumb = get_thumb($video)}
|
|
|
|
<img src="{$thumb}" class="img-responsive">
|
|
|
|
</a>
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
<span class="clearfix">no items</span>
|
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{/foreach}
|
|
|
|
</div>
|
|
|
|
<span class="videos-count">{$cbvid->action->count_playlist_items($playlist.playlist_id)|number_format} video(s)</span>
|
|
|
|
</div>
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
<div class="clearfix">No Playlists</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2016-03-16 17:30:07 +05:00
|
|
|
</aside>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-03-18 17:47:12 +05:00
|
|
|
{assign var=qlist_videos value=get_fast_qlist()}
|
|
|
|
{assign var=litems_count value=$qlist_videos|@count}
|
|
|
|
{if $litems_count >= 1}
|
|
|
|
{assign var=got_qlitems value="yes"}
|
|
|
|
{/if}
|
|
|
|
<div id="qlist_main" class="quicklist_box">
|
|
|
|
<div class="quicklist_box_head clearfix">
|
|
|
|
<span class="quick_title">Quicklists<!-- (<span id="qlist_count" data="{$litems_count}">{$litems_count}</span>) --></span>
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="ql_show-hide1 glyphicon glyphicon-minus btn btn-danger btn-sm" href="javascript:void(0)" onClick="quick_show_hide_toggle('#quicklist_cont')"></a>
|
|
|
|
<a class="ql_rem glyphicon glyphicon-trash btn btn-danger btn-sm" href="javascript:void(0)" ></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="quicklist_cont" class="quicklist_cont" style="display: block;">
|
|
|
|
{foreach $qlist_videos as $ql_item}
|
|
|
|
{include file="$style_dir/blocks/quicklist/fast_qlist.html"}
|
|
|
|
{/foreach}
|
|
|
|
<div id="my_quicklist" class="my_quicklist">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
<script>
|
2016-03-18 17:47:12 +05:00
|
|
|
$('#qlist_main').hide();
|
|
|
|
var gotitems = "{$got_qlitems}";
|
|
|
|
if (gotitems == 'yes') {
|
|
|
|
$('#qlist_main').show();
|
|
|
|
}
|
|
|
|
var notInList = false;
|
|
|
|
function pushToQlist(obj, id) {
|
|
|
|
id = parseInt(id);
|
|
|
|
$.cookie("btn-q-"+id, "yes", { expires : 10 });
|
|
|
|
currentList = $.cookie("fast_qlist");
|
|
|
|
cleanList = currentList;
|
|
|
|
//console.log(cleanList);
|
|
|
|
if (cleanList != null) {
|
|
|
|
console.log("HERE");
|
|
|
|
notInList = true;
|
|
|
|
index = cleanList.indexOf(id);
|
|
|
|
if (index == '-1') {
|
|
|
|
console.log("DO");
|
|
|
|
cleaned = cleanList.replace(/\[/g, '');
|
|
|
|
console.log(cleaned);
|
|
|
|
cleaned = cleaned.replace(/\]/g, '');
|
|
|
|
console.log(cleaned);
|
|
|
|
newCookie = "[" + cleaned + ',' + id + ']';
|
|
|
|
console.log(newCookie);
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
console.log("Really");
|
|
|
|
notInList = true;
|
|
|
|
newCookie = "[" + id + "]";
|
|
|
|
}
|
2016-03-17 11:58:03 +05:00
|
|
|
|
2016-03-18 17:47:12 +05:00
|
|
|
$.cookie("fast_qlist", newCookie, { expires : 10 });
|
|
|
|
var vtitle = $(obj).attr("vtitle"),
|
|
|
|
vtitle = vtitle.split(0,10);
|
|
|
|
thevid = $(obj).attr("v-id"),
|
|
|
|
vlink = $(obj).attr("vlink"),
|
|
|
|
vthumb = $(obj).attr("vthumb"),
|
|
|
|
vduration = $(obj).attr("vduration");
|
|
|
|
|
|
|
|
if (notInList == true) {
|
|
|
|
$('#my_quicklist').append('<div class="qlist_item clearfix" style="background-color:#fff; " id="quicklist_playlist_cont_'+thevid+'"><div class="pl_num"></div><div class="pl_thumb"><a href="'+obj.attr("vlink")+'" target="blank"><img src="'+vthumb+'"/></a><span class="pl_duration">'+vduration+'</span></div><div class="pl_details" "><p><a href="'+vlink+'" target="blank" >'+vtitle+'</a></p></div><button todel="'+thevid+'" class="ql_delete glyphicon glyphicon-trash btn btn-danger btn-sm" title="remove '+vtitle+' from qucklist" alt="quicklist"></button></div>');
|
|
|
|
}
|
|
|
|
|
|
|
|
$.cookie("quick_list_box", "show", { expires : 10 });
|
|
|
|
/*currentItems = $('#qlist_count').attr('data');
|
|
|
|
alert(currentItems);
|
|
|
|
newItems = parseInt(currentItems) + 2;
|
|
|
|
alert(newItems);
|
|
|
|
$('#qlist_count').html(newItems);*/
|
|
|
|
$('#qlist_main').show();
|
|
|
|
$('.quicklist_cont').css("display","block");
|
|
|
|
}
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(".ql_show-hide1").click(function(){
|
|
|
|
$(this).toggleClass('glyphicon-minus glyphicon-plus');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#container').on("click","#recent_load_more, #featured_load_more",function(){
|
2016-03-16 19:32:19 +05:00
|
|
|
var loadLink = baseurl + '/ajax/home.php',
|
|
|
|
main_object = $(this),
|
|
|
|
sendType = 'post',
|
|
|
|
dataType = 'html',
|
|
|
|
loadType = $(main_object).attr('loadtype'),
|
|
|
|
loadMode = $(main_object).attr('loadmode'),
|
|
|
|
loadLimit = $(main_object).attr('loadlimit'),
|
|
|
|
loadHit = $(main_object).attr('loadhit'),
|
2016-03-17 14:10:40 +05:00
|
|
|
newloadHit = parseInt(loadHit) + 1;
|
2016-03-16 19:32:19 +05:00
|
|
|
$.ajax({
|
|
|
|
url: loadLink,
|
|
|
|
type: sendType,
|
|
|
|
dataType: dataType,
|
|
|
|
data: {
|
|
|
|
"load_type":loadType,
|
|
|
|
"load_mode":loadMode,
|
|
|
|
"load_limit":loadLimit,
|
|
|
|
"load_hit":loadHit
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeSend: function() {
|
2016-03-17 17:12:11 +05:00
|
|
|
// setting a timeout
|
|
|
|
$(main_object).text("Loading..");
|
|
|
|
},
|
2016-03-16 19:32:19 +05:00
|
|
|
|
|
|
|
success: function(data) {
|
2016-03-17 15:11:27 +05:00
|
|
|
$(main_object).text("Load More");
|
2016-03-17 14:10:40 +05:00
|
|
|
if (data === '') {
|
2016-03-17 15:27:19 +05:00
|
|
|
$(main_object).remove();
|
2016-03-17 14:10:40 +05:00
|
|
|
return true;
|
|
|
|
}
|
2016-03-16 19:32:19 +05:00
|
|
|
if (loadType == 'video') {
|
2016-03-17 14:10:40 +05:00
|
|
|
if (loadMode == 'recent') {
|
2016-03-17 15:11:27 +05:00
|
|
|
$('#recent_load_more').remove();
|
2016-03-17 14:10:40 +05:00
|
|
|
$('#recent_vids_sec').append(data);
|
2016-03-17 15:11:27 +05:00
|
|
|
$('#recent_vids_sec').append('<button id="recent_load_more" class="btn btn-primary col-md-12 col-sm-12" loadtype="video" loadmode="recent" loadlimit="8" loadhit="'+newloadHit+'">Load More</button>');
|
2016-03-17 14:10:40 +05:00
|
|
|
} else {
|
2016-03-17 15:11:27 +05:00
|
|
|
$('#featured_load_more').remove();
|
2016-03-17 14:10:40 +05:00
|
|
|
$('#featured_vid_sec').append(data);
|
2016-03-17 15:11:27 +05:00
|
|
|
$('#featured_vid_sec').append('<button id="featured_load_more" class="btn btn-primary col-md-12 col-sm-12" loadtype="video" loadmode="featured" loadlimit="2" loadhit="'+newloadHit+'">Load More</button>');
|
2016-03-17 14:10:40 +05:00
|
|
|
}
|
2016-03-16 19:32:19 +05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2016-03-18 17:47:12 +05:00
|
|
|
|
|
|
|
$(document).on("click",".cb_quickie",function(){
|
|
|
|
obj = $(this);
|
|
|
|
$(this).addClass('check_icon');
|
|
|
|
id = $(this).attr('v-id');
|
|
|
|
title = $(this).attr('vtitle');
|
|
|
|
thumb = $(this).attr('vthumb');
|
|
|
|
link = $(this).attr('vlink');
|
|
|
|
vdur = $(this).attr('vduration');
|
|
|
|
pushToQlist(obj, id);
|
|
|
|
/*console.log(title);
|
|
|
|
console.log(thumb);
|
|
|
|
console.log(link);
|
|
|
|
console.log(vdur);*/
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).on("click",".ql_delete",function(){
|
|
|
|
vid = $(this).attr('todel');
|
|
|
|
currentList = $.cookie("fast_qlist");
|
|
|
|
cleaned = currentList.replace(vid, '');
|
|
|
|
console.log(cleaned);
|
|
|
|
$.cookie("fast_qlist", cleaned, { expires : 10 });
|
|
|
|
$(this).closest('.qlist_item').remove();
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.ql_rem').on("click",function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
$.cookie("fast_qlist", null, { expires : 10 });
|
|
|
|
$('#qlist_main').fadeOut('slow');
|
|
|
|
$('#qlist_main').remove();
|
|
|
|
});
|
2016-03-16 17:30:07 +05:00
|
|
|
</script>
|