{ANCHOR place="display_head_sec"}
{ANCHOR place='global'}
{if is_installed('editorspick')} {if $editor_picks}
{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
Videos Manager > Add to editor's pick {/section} {/if}
{section name=e_list loop=$editor_picks} {include file="$style_dir/blocks/editor_pick/index_featured_video.html" video=$editor_picks[e_list]} {/section}
{/if} {/if}
{AD place='ad_728x90'}

## {lang code="Featured Videos"}

{$featured_videos=get_videos(['featured' => 'yes','limit'=>6])} {if $featured_videos}
{$video_01=$featured_videos.0}
{if $video_01.duration>1}{$video_01.duration|SetTime}{else}00:00ewwew{/if}
{$video_01.username}
{foreach $featured_videos as $video_02} {if $video_02@iteration >1 && $video_02@iteration < 4}
{if $video_02.duration>1}{$video_02.duration|SetTime}{else}00:00{/if}
{/if} {/foreach}
{foreach $featured_videos as $video_02} {if $video_02@iteration >3}
{$video_02.title|truncate:10}
{if $video_02.duration>1}{$video_02.duration|SetTime}{else}00:00{/if}
{/if} {/foreach}
{else}
No featured Video
{/if}

### {lang('Recent videos')}

{$videos=get_videos(["order" =>"date_added DESC", "limit" =>12])}
{foreach $videos as $video}
{include file="$style_dir/blocks/videos/video.html"}
{/foreach}
{AD place='ad_468x60'}
{if $row.photosSection=='yes' }

## {lang code="Photos"}

{$result_photos1_01 = get_photos(['order'=>' RAND() LIMIT 15 '])} {if $result_photos1_01}
{foreach from=$result_photos1_01 key=i item=result_photo1_01} {if $i==0}
{get_photo details=$result_photo1_01 output='html' size="l" class="cb_img_thum"}
{$result_photo1_01.photo_title} plus
{else if $i < 3}
{get_photo details=$result_photo1_01 output='html' size="l" class='photoThumbBox moveL cb_img_thum'}
{$result_photo1_01.photo_title} plus
{else if $i < 7}
{get_photo details=$result_photo1_01 output='html' size="l" class='photoThumbBox moveL cb_img_thum'}
{$result_photo1_01.photo_title} plus
{else}
{get_photo details=$result_photo1_01 output='html' size="l" class='photoThumbBox moveL cb_img_thum'}
{$result_photo1_01.photo_title} plus
{/if} {/foreach}
{/if} {$result_photos2_08 = get_photos(['order'=>' photo_id ASC LIMIT 4 '])} {if $result_photos2_08} {/if}
{elseif $row.photosSection=='yes' && !$result_photos2_08 }
No featured Photo
{else} {/if}
{$feature_users=get_users(['featured'=>'yes','limit'=>5])} {if $feature_users}

## {lang code="Featured Users"}

{foreach $feature_users as $user}

#### {$user.username}

{$user.profile_hits|number_format} {lang code='views'}
{$user.total_videos|number_format} {lang code='Videos'}
40% Complete (success)
{/foreach}
{/if} {AD place=ad_300x250} {if $row.collectionsSection == 'yes'} {$collections = $cbcollection->get_collections(['limit'=>5, 'active'=>'yes'])}

## {lang code="Top Collections"}

{$limit=10} {if $collections} {foreach from=$collections item=collection}
{$collection.collection_name}
{$collection.total_objects}
{if $collection.type=='photos'} {$items = $cbphoto->collection->get_collection_items_with_details($collection.collection_id,0,$limit,false)} {else} {$items = get_videos_of_collection($collection.collection_id,0,$limit,false) } {/if} {if $items} {foreach from=$items item=item}
{if $collection.type=='photos'} {get_photo details=$item output='html' size="l" class="cb_img_thum"} {else} {/if}
{/foreach} {/if}
{/foreach} {else}
No Collection
{/if}
{/if} {$playlists = get_playlists(['limit'=>5, 'order'=>'total_items DESC'])}

## {lang code="Top Playlists"}

{if $playlists} {foreach $playlists as $playlist}
{$playlist.playlist_name}
{$cbvid->action->count_playlist_items($playlist.playlist_id)|number_format}
{$items = get_playlist_items($playlist.playlist_id)} {foreach $items as $item}
{$videoid = $item.videoid} {if $videoid} {$videos = get_videos(['videoid'=>$videoid,'limit'=>'4'])} {foreach $videos as $video} {$thumb = get_thumb($video)} {/foreach} {else} no items {/if}
{/foreach}
{/foreach} {else}
No Playlists
{/if}
{*include file="$style_dir/blocks/videos/video-home-sliders2.html" video_06_da=$video_06_da slider3='slider3'*}