From 65c9918155fd7574c16e07cf707be7ba844fa046 Mon Sep 17 00:00:00 2001 From: Awais-cb Date: Fri, 19 May 2017 12:07:51 +0500 Subject: [PATCH] Modified: Added option to show rounded views or normal views on watch video --- upload/admin_area/main.php | 3 ++- .../admin_area/styles/cb_2014/layout/main.html | 16 ++++++++++++++++ upload/cb_install/sql/configs.sql | 3 +++ upload/cb_install/sql/upgrade_2.8.3.sql | 3 ++- upload/styles/cb_28/layout/watch_video.html | 14 +++++++++++++- 5 files changed, 36 insertions(+), 3 deletions(-) diff --git a/upload/admin_area/main.php b/upload/admin_area/main.php index 1b7538b2..f2832db1 100644 --- a/upload/admin_area/main.php +++ b/upload/admin_area/main.php @@ -244,7 +244,8 @@ if(isset($_POST['update'])){ 'store_guest_session', 'delete_mass_upload', 'stay_mp4', - 'popup_video' + 'popup_video', + 'video_round_views' ); diff --git a/upload/admin_area/styles/cb_2014/layout/main.html b/upload/admin_area/styles/cb_2014/layout/main.html index cb7e1c47..e3413eed 100644 --- a/upload/admin_area/styles/cb_2014/layout/main.html +++ b/upload/admin_area/styles/cb_2014/layout/main.html @@ -399,6 +399,22 @@ + + + + +
+ + +
+ + + + +
diff --git a/upload/cb_install/sql/configs.sql b/upload/cb_install/sql/configs.sql index 34a6d44a..2c2485b7 100644 --- a/upload/cb_install/sql/configs.sql +++ b/upload/cb_install/sql/configs.sql @@ -284,5 +284,8 @@ INSERT INTO `{tbl_prefix}config`(`name`, `value`) VALUES ('youtube_api_key',''); -- Addition for 2.8.2 INSERT INTO `{tbl_prefix}config`(`name`, `value`) VALUES ('popup_video','yes'); +-- Addition for 2.8.3 +INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES (NULL, 'video_round_views', 'yes'); + diff --git a/upload/cb_install/sql/upgrade_2.8.3.sql b/upload/cb_install/sql/upgrade_2.8.3.sql index a08dc6ed..4f7a57df 100644 --- a/upload/cb_install/sql/upgrade_2.8.3.sql +++ b/upload/cb_install/sql/upgrade_2.8.3.sql @@ -13,4 +13,5 @@ INSERT INTO `{tbl_prefix}user_permissions` ( `permission_default` )VALUES( NULL , '2', 'Allow create collection', 'allow_create_collection', 'Allow users to create collection', 'yes'), ( -NULL , '2', 'Allow create playlist', 'allow_create_playlist', 'Allow users to create playlist', 'yes'); \ No newline at end of file +NULL , '2', 'Allow create playlist', 'allow_create_playlist', 'Allow users to create playlist', 'yes'); +INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES (NULL, 'video_round_views', 'yes'); \ No newline at end of file diff --git a/upload/styles/cb_28/layout/watch_video.html b/upload/styles/cb_28/layout/watch_video.html index 470b7e42..9923bb87 100644 --- a/upload/styles/cb_28/layout/watch_video.html +++ b/upload/styles/cb_28/layout/watch_video.html @@ -23,8 +23,20 @@

{$video.username}

+
- {prettyNum($vdo.views)} {if $vdo.views > 1}{lang code='views'}{else}{lang code="view"}{/if} + + {if $Cbucket->configs.video_round_views=='yes'} + {prettyNum($vdo.views)} + {else} + {( $vdo.views )} + {/if} + {if $vdo.views > 1} + {lang code='views'} + {else} + {lang code="view"} + {/if} +