Update : view_collection

Removed : Unused code of watch_video.php
Updated : Language phrases
This commit is contained in:
Arslan Hassan 2011-02-06 21:28:53 +00:00
parent 3d686b2198
commit 773c08ec57
5 changed files with 28 additions and 36 deletions

File diff suppressed because one or more lines are too long

View file

@ -27,7 +27,7 @@
<!--{include file="$style_dir/blocks/pagination.html"}-->
<div style="padding-bottom:5px; height:1px; margin-bottom:5px; clear:both; border-bottom:1px solid #ccc;"></div>
<div class="moveL" style="width:200px; font:normal 11px Tahoma;">
<div class="moveL" style="width:170px; font:normal 11px Tahoma;">
<span style="color:#333; font-weight:bold;">{lang code="date_added"}</span>
<div style="height:2px; clear:both;"></div>
{$c.date_added|niceTime}
@ -51,7 +51,7 @@
</div> <!-- moveL end -->
<div class="clearfix" style="width:77%; float:left;">
<div class="clearfix" style="width:820px; float:left;">
<span style="font:normal 11px Tahoma">{$c.collection_description|description}</span>
<div class="borderLine"></div>
<div class="video_actions_cont clearfix">
@ -68,8 +68,10 @@
</ul>
</div>
</div> <!-- video_actions_cont -->
<div style="margin-top:5px">{AD place=ad_728x90}</div>
<div class="video_action_result_boxes">
{show_share_form id=$c.collection_id type=Collection}
{show_flag_form id=$c.collection_id type=Collection}
@ -78,18 +80,22 @@
</div> <!-- IN-LINE DIV END -->
<div style="height:15px; clear:both;"></div>
<div class="moveL" style="width:60%">
<div class="" style="font-size:12px; padding-bottom:5px; margin-bottom:5px; border-bottom:1px solid #ccc;"><h2 class="commentHead">{lang code="comments"} ({$c.total_comments})</h2></div>
<div class="moveL" style="width:670px">
<div id="collectionComments">
{include file="$style_dir/blocks/comments/comments.html" id=$c.collection_id type='cl'}
</div>
</div>
<div class="moveR collectionComments" style="width:39%">
<div class="moveR collectionComments" style="width:310px">
<div style="height:5px;"></div>
{if $myquery->is_commentable($c,'collection')}
{include file="$style_dir/blocks/comments/add_comment.html" id=$c.collection_id type='cl'}
{else}
<div class="disable_msg" align="center">{lang code='comm_disabled_for_vid'}</div>
{/if}
<div align="center" style="margin:5px auto">{AD place=ad_300x250}</div>
</div>
</div>

View file

@ -149,13 +149,13 @@
<!-- Collections -->
{if userid()}
<span class="watch_vids_head watch_vids_head_closed"
onclick='$(this).toggleClass("watch_vids_head_closed");$("#vid_collections").slideToggle("fast")'>Collections</span>
onclick='$(this).toggleClass("watch_vids_head_closed");$("#vid_collections").slideToggle("fast")'>{lang code='collections'}</span>
<div class="watch_vids_cont" id="vid_collections" style="display:none">
{assign var=collections value=$cbvid->collection->getCollectionFromItem($vdo.videoid)}
{if $collections}
This video is found in following collections
{lang code='this_video_found_in_no_collection'}
{foreach from=$collections item=collection name=collect}
<div class="watch_collect_item">
{$smarty.foreach.collect.iteration}. <a href="{$cbcollection->collection_links($collection.collection_id,'view')}">{$collection.collection_name}</a>
@ -182,7 +182,10 @@ This video is found in following collections
{assign var=videos_items_columns value=func->config(videos_items_columns)}
{get_videos user=$vdo.userid limit=$videos_items_columns assign=user_vids exclude=$vdo.videoid}
{if $user_vids}
<span class="watch_vids_head" onclick='$(this).toggleClass("watch_vids_head_closed");$("#user_vids").slideToggle("fast")'>More from {$vdo.username}</span>
<span class="watch_vids_head" onclick='$(this).toggleClass("watch_vids_head_closed");$("#user_vids").slideToggle("fast")'>
{lang code='more_from' assign='more_from'}
{$more_from|sprintf:$vdo.username}</span>
<div class="watch_vids_cont" id="user_vids">
{section name=uvlist loop=$user_vids}
{include file="$style_dir/blocks/watch_video/video_box.html" video=$user_vids[uvlist]}
@ -197,7 +200,7 @@ This video is found in following collections
{if $related_vids}
<span class="watch_vids_head" onclick='$(this).toggleClass("watch_vids_head_closed");$("#related_vids").slideToggle("fast")'>Related Videos</span>
<span class="watch_vids_head" onclick='$(this).toggleClass("watch_vids_head_closed");$("#related_vids").slideToggle("fast")'>{lang code='related_videos'}</span>
<div class="watch_vids_cont" id="related_vids">
{section name=uvlist loop=$related_vids}
{include file="$style_dir/blocks/watch_video/video_box.html" video=$related_vids[uvlist]}

View file

@ -28,7 +28,9 @@ if($cbcollection->is_viewable($cid))
else
{
assign('type',$type);
$param = array("type"=>$type,"cid"=>$cid);
$cdetails = $cbcollection->get_collections($param);
$collect = $cdetails[0];
switch($type)
{
case "videos":
@ -37,7 +39,7 @@ if($cbcollection->is_viewable($cid))
global $cbvideo;
$video = $cbvideo->get_video($item);
if($video)
if(video_playable($video))
{
$info = $cbvideo->collection->get_collection_item_fields($cid,$video['videoid'],'ci_id,collection_id');
if($info)
@ -47,7 +49,8 @@ if($cbcollection->is_viewable($cid))
assign('object',$video);
assign('user',$userquery->get_user_details($video['userid']));
assign('c',$collect);
assign('c',$collect);
} else {
e(lang("item_not_exist"));
$Cbucket->show_page = false;
@ -56,6 +59,8 @@ if($cbcollection->is_viewable($cid))
e(lang("item_not_exist"));
$Cbucket->show_page = false;
}
}
break;

View file

@ -26,31 +26,9 @@ if(video_playable($vdo))
$plist = $cbvid->action->get_playlist($pid,userid());
if($plist)
$_SESSION['cur_playlist'] = $pid;
}
if(post('send_content'))
{
//Sending Video
$cbvid->set_share_email($vdo);
$cbvid->action->share_content($vdo['videoid']);
}
}
//Calling Functions When Video Is going to play
call_watch_video_function($vdo);
//adding Comment
if(isset($_POST['add_comment']))
{
$cbvideo->add_comment($_POST['comment'],$vdo['videoid']);
$vdo['comments_count'] = $cbvid->count_video_comments;
}
//Adding Video To Favorites
if(isset($_REQUEST['favorite']))
{
$cbvideo->action->add_to_fav($vdo['videoid']);
}
assign('vdo',$vdo);
subtitle($vdo['title']);