From 0ab050399544d3dbda5c47ce4122c5e3baf4ba23 Mon Sep 17 00:00:00 2001 From: Arslan Hassan Date: Mon, 18 Nov 2013 16:09:59 +0000 Subject: [PATCH] Added: Rating in 2.7 New template --- upload/includes/classes/video.class.php | 8 +- upload/styles/cb_2013/layout/watch_video.html | 78 ++++++++++++------- 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/upload/includes/classes/video.class.php b/upload/includes/classes/video.class.php index 5accef28..a77469c5 100644 --- a/upload/includes/classes/video.class.php +++ b/upload/includes/classes/video.class.php @@ -1430,8 +1430,12 @@ class CBvideo extends CBCategory assign("likes",$likes); assign("dislikes",($ratings-$likes)); assign('disable',$params['disable']); - - Template('blocks/rating.html'); + + + if(SMARTY_VERSION>2) + Template('blocks/common/rating.html'); + else + Template('blocks/rating.html'); } diff --git a/upload/styles/cb_2013/layout/watch_video.html b/upload/styles/cb_2013/layout/watch_video.html index 35a2d7d4..f9d4b81d 100644 --- a/upload/styles/cb_2013/layout/watch_video.html +++ b/upload/styles/cb_2013/layout/watch_video.html @@ -27,66 +27,82 @@ -
- - 34 - - {lang code='Like'} - - - -4 - - {lang code='Dislike'} - -
+ {show_video_rating rating=$vdo.rating ratings=$vdo.rated_by total='10' id=$vdo.videoid type=video file='blocks/common/rating.html'} + + +
-
+
- It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). + {description($video.description)} + +
+ {lang('Category')} +
{$vdo.category|categories:video}
+
+
+ {lang('Tags')} +
{$vdo.tags|tags:videos}
+
+ +
+ {lang code='views'} : {$vdo.views|number_format} – + {lang code='duration'} : {$vdo.duration|SetTime} – + {lang code='comments'} : {$vdo.comments_count|number_format} +
+
-
2,556 views
+
{$video.views|number_format} {lang('views')}
- {show_share_form id=$vdo.videoid type=Video} + {show_share_form id=$vdo.videoid type=video}
-
- {show_playlist_form id=$vdo.videoid type=Video} +
+ {show_playlist_form id=$vdo.videoid type=video}
- {show_flag_form id=$vdo.videoid type=Video} + {show_flag_form id=$vdo.videoid type=video}
@@ -172,7 +188,9 @@ $('.cb-item-description').readmore({ speed: 75, - maxHeight: 60 + maxHeight: 120, + moreLink : ' {lang("Read more")}', + lessLink : '{lang("Close")}' }); });