Merge branch 'master' of github.com:arslancb/clipbucket

This commit is contained in:
ASponch 2018-03-09 09:33:48 +01:00
commit 14608124da
17 changed files with 146 additions and 69 deletions

View file

@ -46,7 +46,7 @@ switch($mode)
echo json_encode($updateResponse);
}
break;
case "uploadPhoto":
/* case "uploadPhoto":
{
$exts = $cbphoto->exts;
$max_size = 1048576; // 2MB in bytes
@ -126,7 +126,7 @@ switch($mode)
exit(0);
}
}
break;
break;*/
case 'plupload': {
@ -147,6 +147,15 @@ switch($mode)
exit();
}
$extension = getExt( $_FILES['file']['name']);
$types = strtolower(config('allowed_types'));
$supported_extensions = explode(',', $types);
if (!in_array($extension, $supported_extensions)) {
echo json_encode(array("status"=>"504","msg"=>"Invalid extension"));
exit();
}
$targetDir = CB_BEATS_UPLOAD_DIR;
# $directory = create_dated_folder( CB_BEATS_UPLOAD_DIR );
# $targetDir .= '/'.$directory;

View file

@ -162,6 +162,14 @@ switch($mode)
exit(0);
}
#checking for if the right file is uploaded
$content_type = get_mime_type($_FILES[$form]['tmp_name']);
if ( $content_type != 'image') {
upload_error("Invalid file type");
exit();
}
$filename = $cbphoto->create_filename();
@ -178,7 +186,7 @@ switch($mode)
break;
case 'plupload': {
/* case 'plupload': {
$status_array = array();
// HTTP headers for no cache etc
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@ -194,6 +202,15 @@ switch($mode)
exit();
}
$extension = getExt( $_FILES['file']['name']);
$types = strtolower(config('allowed_types'));
$supported_extensions = explode(',', $types);
if (!in_array($extension, $supported_extensions)) {
echo json_encode(array("status"=>"504","msg"=>"Invalid extension"));
exit();
}
//pr($_REQUEST);
$targetDir = PHOTOS_DIR;
$directory = create_dated_folder( PHOTOS_DIR );
@ -318,8 +335,8 @@ switch($mode)
rename($filePath, $targetFile);
echo json_encode( array("success"=>"yes","file_name"=>$filename, "extension" => getExt( $filePath ), "file_directory" => $directory ) );
}
break;
}*/
// break;
}

View file

@ -67,7 +67,7 @@ if(isset($_POST['update'])){
'collection_rating',
'collectionsSection',
'comments_per_page',
'captcha_type',
/*'captcha_type',*/
'con_modules_type',
'comments_captcha',
'comment_rating',
@ -176,7 +176,7 @@ if(isset($_POST['update'])){
'photo_other_limit',
'quick_conv',
/*'quick_conv',*/
'resize',
'remoteUpload',
@ -199,7 +199,7 @@ if(isset($_POST['update'])){
'thumb_height',
'use_ffmpeg_vf',
'use_crons',
/*'use_crons',*/
'user_comment_own',
'user_rate_opt1' ,
'users_items_subscriptions',

View file

@ -176,7 +176,7 @@
<tr>
<td class="first"><label for="filename">Uploaded Date</label></td>
<td class="last">
<p><span>{$data.datecreated|nicetime}</span></p>
<p><span>{$data.date_added|date_only}</span></p>
</td>
</tr>
<tr>

View file

@ -624,7 +624,7 @@
</div>
<div class="col-md-4">
<!-- <div class="col-md-4">
<h5>Use Crons</h5>
<label class="radio-inline">
<input type="radio" name="use_crons" value="yes" id="use_crons_0" {if $row.use_crons =='yes'} checked="checked"{/if} />Yes
@ -633,7 +633,7 @@
<label class="radio-inline">
<input type="radio" name="use_crons" value="no" id="use_crons_1" {if $row.use_crons =='no'} checked="checked"{/if} />No
</label>
</div>
</div> -->
<div class="col-md-4">
<label for="ffmpegpath">FFMPEG Path</label>
@ -760,14 +760,14 @@
</div>
<div class="row">
<div class="col-md-4">
<!-- <div class="col-md-4">
<h5>Quick Conversion</h5>
<label class="checkbox" for="quick_conv">
<input type="checkbox" name="quick_conv" id="quick_conv" value="yes" {if $row.quick_conv=='yes'} checked="checked"{/if}/>
Turn on Quick Conversion
<a href="javascript:void(0)" target="_blank"><img src="{$imageurl}/help.png" alt="info" border="0" class="tipsy_tip" title="If you check this option, videos will be converted as soon as uploading is complete, make sure your php path is correct before enabling this option otherwise may cause your website inaccessible" /></a>
</label>
</div>
</div> -->
<!--
<div class="col-md-4">
@ -1365,7 +1365,7 @@
</label>
</div>
<div class="col-md-4">
<!-- <div class="col-md-4">
<label for="varification_captcha">Image verification (captcha)</label>
<select class="form-control" name="captcha_type">
<option value="0" {if $row.captcha_type == 0}
@ -1378,7 +1378,7 @@
selected="selected"
{/if}>Secured</option>
</select>
</div>
</div> -->
</div>
<div class="row">

View file

@ -11,9 +11,9 @@
define("ClipBucket","ClipBucket - Open Source Media Sharing Script by Arslan Hassan");
define("VERSION","4.0");
define("STATE","RC1");
define("REV","4881");
define("RELEASED","20-12-2017");
define("AUTHORS","ARSLAN HASSAN,FAHAD ABBAS","AWAIS FIAZ");
define("STATE","STABLE");
define("REV","4902");
define("RELEASED","23-02-2018");
define("AUTHORS","ARSLAN HASSAN,FAHAD ABBAS,AWAIS FIAZ");
?>

View file

@ -14,6 +14,7 @@ INSERT INTO `{tbl_prefix}email_templates` (`email_template_id`, `email_template_
(12, 'Contact Form', 'contact_form', '[{website_title} - Contact] {reason} from {name}', 'Name : {name}\r\nEmail : {email}\r\nReason : {reason}\r\n\r\nMessage:\r\n{message}\r\n\r\n===============\r\nIp : {ip_address}\r\ndate : {now}', ''),
(13, 'Video Acitvation Email', 'video_activation_email', '[{website_title}] - Your video has been activated', 'Hello {username},\r\nYour video has been reviewed and activated by one of our staff, thanks for uploading this video. You can view this video here.\r\n{video_link}\r\n\r\nThanks\r\n{website_title} Team', ''),
(14, 'User Comment Email', 'user_comment_email', '[{website_title}] {username} made comment on your {obj}', '{username} has commented on your {obj}\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', ''),
(15, 'Photo Share Template', 'photo_share_template', '{username} wants to share photo with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 12px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this photo with you<br>\r\n <div id="videoThumb"><a class="text" title="{photo_title}" href="{photo_link}"><img src="{photo_thumb}"><br>\r\n View Photo</a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Photo Description</span><br>\r\n <span class="text">{photo_description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', ''),
(16, 'Video Subscription Email', 'video_subscription_email', '{uploader} has uploaded new video on {website_title}', 'Hello {username}\r\n\r\nYou have been notified by {website_title} that {uploader} has uploaded new video \r\n\r\nVideo Title : {video_title}\r\nVideo Description : {video_description}\r\n\r\n\r\n<a href="{video_link}">\r\n<img src="{video_thumb}" border="0" height="90" width="120"><br>\r\nclick here to watch this video</a>\r\n\r\n\r\nYou are notified because you are subscribed to {uploader}, you can manage your subscriptions by going to your account and click on manage subscriptions.\r\n{website_title}', ''),
(17, 'Collection Share Template', 'collection_share_template', '{username} wants to share collection with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family:Tahoma, Geneva, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 11px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text, .text2 {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n\r\n.text2 {\r\n font-size: 10px;\r\n padding: 0px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this collection with you.<br>\r\n <div id="videoThumb"><a class="text" title="{name}" href="{collection_link}"><img src="{collection_thumb}"><br>\r\n View Collection <small class=''text2''>({total_items} {type})</small></a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Collection Description</span><br>\r\n <span class="text">{description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', '');
(15, 'User Reply Email', 'user_reply_email', '[{website_title}] {username} made reply on your comment', '{username} has replied on your comment\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', ''),
(16, 'Photo Share Template', 'photo_share_template', '{username} wants to share photo with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 12px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this photo with you<br>\r\n <div id="videoThumb"><a class="text" title="{photo_title}" href="{photo_link}"><img src="{photo_thumb}"><br>\r\n View Photo</a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Photo Description</span><br>\r\n <span class="text">{photo_description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', ''),
(17, 'Video Subscription Email', 'video_subscription_email', '{uploader} has uploaded new video on {website_title}', 'Hello {username}\r\n\r\nYou have been notified by {website_title} that {uploader} has uploaded new video \r\n\r\nVideo Title : {video_title}\r\nVideo Description : {video_description}\r\n\r\n\r\n<a href="{video_link}">\r\n<img src="{video_thumb}" border="0" height="90" width="120"><br>\r\nclick here to watch this video</a>\r\n\r\n\r\nYou are notified because you are subscribed to {uploader}, you can manage your subscriptions by going to your account and click on manage subscriptions.\r\n{website_title}', ''),
(18, 'Collection Share Template', 'collection_share_template', '{username} wants to share collection with you', '<html>\r\n<head>\r\n<style type="text/css">\r\n<!--\r\n.title {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #FFFFFF;\r\n font-size: 16px;\r\n}\r\n.title2 {\r\n font-family: Arial, Helvetica, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 14px;\r\n}\r\n.messege {\r\n font-family:Tahoma, Geneva, sans-serif;\r\n padding: 5px;\r\n font-weight:bold;\r\n color: #000000;\r\n font-size: 11px;\r\n}\r\n#videoThumb{\r\n float:left;\r\n padding: 2px;\r\n margin: 3px;\r\n border: 1px solid #F0F0F0;\r\n text-align: center;\r\n vertical-align: middle;\r\n}\r\n#videoThumb img{border:0px}\r\nbody,td,th {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #FFFFFF;\r\n}\r\n.text, .text2 {\r\n font-family: tahoma;\r\n font-size: 11px;\r\n color: #000000;\r\n padding: 5px;\r\n}\r\n\r\n.text2 {\r\n font-size: 10px;\r\n padding: 0px;\r\n}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<table width="100%" border="0" cellspacing="0" cellpadding="5">\r\n <tr>\r\n <td bgcolor="#0099cc" ><span class="title">{website_title}</span></td>\r\n </tr>\r\n\r\n <tr>\r\n <td height="20" class="messege">{username} wants to share this collection with you.<br>\r\n <div id="videoThumb"><a class="text" title="{name}" href="{collection_link}"><img src="{collection_thumb}"><br>\r\n View Collection <small class=''text2''>({total_items} {type})</small></a></div></td>\r\n </tr>\r\n <tr>\r\n <td class="text" ><span class="title2">Collection Description</span><br>\r\n <span class="text">{description}</span></td>\r\n </tr>\r\n <tr>\r\n <td><span class="title2">Personal Message</span><br>\r\n <span class="text">{user_message}\r\n </span><br>\r\n <br>\r\n<span class="text">Thanks,</span><br> \r\n<span class="text">{website_title}</span></td>\r\n </tr>\r\n <tr>\r\n <td bgcolor="#0099cc">copyrights {date_year} {website_title}</td>\r\n </tr>\r\n</table>\r\n</body>\r\n</html>', '');

View file

@ -607,7 +607,7 @@ CREATE TABLE IF NOT EXISTS `{tbl_prefix}plugin_config` (
--
-- Table structure for table `sessions`
--
CREATE TABLE `{tbl_prefix}sessions` (
CREATE TABLE IF NOT EXISTS `{tbl_prefix}sessions` (
`session_id` int(11) NOT NULL AUTO_INCREMENT,
`session` varchar(100) NOT NULL,
`session_user` int(11) NOT NULL,

View file

@ -44,3 +44,5 @@ INSERT INTO `{tbl_prefix}config` (`configid`, `name`, `value`) VALUES ('', 'play
-- Updating featured videos limit for new template
-- Commented because cb-git version has difference from corporate
-- UPDATE `{tbl_prefix}config` SET value = '3' WHERE name = 'index_featured';
-- Reply email template added
INSERT INTO `{tbl_prefix}email_templates` (`email_template_id`, `email_template_name`, `email_template_code`, `email_template_subject`, `email_template`, `email_template_allowed_tags`) VALUES ('', 'User Reply Email', 'user_reply_email', '[{website_title}] {username} made reply on your comment', '{username} has replied on your comment\r\n"{comment}"\r\n\r\n<a href="{obj_link}">{obj_link}</a>\r\n\r\n{website_title} team', '');

View file

@ -33,9 +33,24 @@ if(isset($_POST['update_avatar_bg']))
$array['userid'] = userid();
$userquery->update_user_avatar_bg($array);
}
if(isset($_FILES["coverPhoto"])){
if(isset($_FILES["coverPhoto"]) && get_mime_type($_FILES["coverPhoto"]['tmp_name']) == 'image'){
$array = $_FILES;
$extension = getExt( $_FILES['coverPhoto']['name']);
$types = strtolower(config('allowed_types'));
$supported_extensions = explode(',', $types);
if (!in_array($extension, $supported_extensions)) {
$response = array(
"status" => false,
"msg" => "Invalid extension provided",
"url" => false,
);
echo json_encode($response);
die();
}
$array['userid'] = userid();
$coverUpload = $userquery->updateCover($array);
$timeStamp = time();
@ -55,7 +70,7 @@ if(isset($_FILES["coverPhoto"]) && get_mime_type($_FILES["coverPhoto"]['tmp_name
echo json_encode($response);
die();
}
}
if(isset($_FILES["avatar_file"]) && $_GET['ajax'] == true){
$array = $_FILES;
$array['userid'] = userid();

View file

@ -540,6 +540,30 @@ class myquery {
//Now Finally Sending Email
cbmail(array('to'=>$own_details,'from'=>WEBSITE_EMAIL,'subject'=>$subj,'content'=>$msg));
if($reply_to!=0){
$tpl = $cbemail->get_template('user_reply_email');
$more_var = array
('{username}' => $username,
'{fullname}' => $fullname,
'{obj_link}' => $obj_link.'#comment_'.$cid,
'{comment}' => $comment,
'{obj}' => get_obj_type($type)
);
if(!is_array($var))
$var = array();
$var = array_merge($more_var,$var);
$subj = $cbemail->replace($tpl['email_template_subject'],$var);
$msg = nl2br($cbemail->replace($tpl['email_template'],$var));
$cd = $this->get_comment($reply_to);
$replying_to_email = $cd['email'];
cbmail(array('to'=>$replying_to_email,'from'=>WEBSITE_EMAIL,'subject'=>$subj,'content'=>$msg));
}
}
//Adding Video Feed

View file

@ -5884,6 +5884,20 @@
}
}
/**
* Trims the date added to date only
* @param : { $date_time }
* @author : Awais Fiaz
* @since : 5 March, 2018
* @todo : will trim the date and time to date only
* @return : { Date }
* @example : N/A
*/
function date_only($date_time)
{
$arr=explode(" ",$date_time);
return $arr[0];
}

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@
<tr>
<td>
<div class="col-md-3">
<a class="manageVid_thumb" href="edit_video.php?video={$video.videoid}">
<a class="manageVid_thumb" href="edit_video.php?vid={$video.videoid}">
<img src="{getThumb vdetails=$video}" class="img-responsive" width="130" height="80" id="thumbs_{$video.videoid}" class="vthumb" title=""/>
<span class="duration">({if
$video.duration>1}{$video.duration|SetTime}{else}00:00{/if})</span>
@ -119,9 +119,8 @@
{/if}
<!-- changes made -->
{if $control=='onWatch'}
<div class="featured-video clearfix" {if $ajax_load == "yes"} style="display: none" {/if} id="{videoLink($video)}">
<div class="featured-video clearfix" {if $ajax_load == "yes"} style="display: none" {/if} id="{$video.videoid}">
<a href="{videoLink($video)}">
<!-- {pr(videoLink($video),true)} -->
<div class="video_thumb">
<img src="{getThumb vdetails=$video size=128x80}" {ANCHOR place="video_thumb" data=$video} class="img-responsive">
<img src="{$theme}/images/thumb-ratio.png" alt="" class="thumb-ratio">
@ -138,19 +137,9 @@
</div>
</div>
<script>
//getting url of all videos
var url = "{videoLink($video)}";
var params = url.split("?")[1].split("&");
//getting url of current
var secondUrl=window.location.href ;
var secondParam = secondUrl.split("?")[1].split("&");
// styling according to parameter
if(params[0]==secondParam[0]){
document.getElementById("{videoLink($video)}").style.background = "#f1ecec";
if('{$video.videoid}'=='{$vdo.videoid}'){
$("#{$video.videoid}").css("background", "#f1ecec");
}
</script>
{/if}
<!-- changes made -->

View file

@ -128,8 +128,8 @@
<h2 title="Playlists with most videos">{lang code="top_playlists"}</h2>
{foreach $playlists as $playlist}
<div class="playlist clearfix">
<a href="{videoLink vdetails=$playlist['first_item']|@json_decode}{if $Cbucket->configs.seo == 'no'}&{else}?{/if}play_list={$playlist.playlist_id}"><h3>{$playlist.playlist_name}</h3></a>
{$items = get_playlist_items($playlist.playlist_id)}
<a href="{VideoLink($items[0])}"><h3>{$playlist.playlist_name}</h3></a>
<div class="clearfix row">
{foreach $items as $item}
{if $item@iteration == 5}

View file

@ -32,6 +32,7 @@
<!-- Add new playlist -->
<hr>
<!-- Getting List of Playlist -->
<form class="marginTop" name="manage_playlists" method="post">
<div>
@ -48,6 +49,8 @@
<td width="130" class="last_td"><strong>{lang code='total_items'}</strong></td>
</tr>
{section name=plist loop=$playlists}
{assign var=playlist_items value=$cbvid->get_playlist_items($playlists[plist].playlist_id, 'playlist_items.date_added DESC')}
<tr>
<td>
<input type="checkbox" name="check_playlist[]" id="check_playlist-{$playlists[plist].playlist_id}" value="{$playlists[plist].playlist_id}" />
@ -57,9 +60,9 @@
<span class="video_control">
- <a class="btn btn-primary btn-xs" href="?mode=edit_playlist&amp;pid={$playlists[plist].playlist_id}">{lang code='view'}</a>
<!-- changes made -->
{assign var=firstitem value=$playlists[plist].first_item|json_decode:1}
{assign var=firstitem value=$playlist_items[0]}
{if $firstitem}
<a class="btn btn-success btn-xs" href="{$baseurl}/watch_video.php?v={$firstitem->videokey}&play_list={$playlists[plist].playlist_id}" target="_blank">{lang code='play'}</a>
<a class="btn btn-success btn-xs" href="{videoLink($firstitem)}" target="_blank">{lang code='play'}</a>
{else}
<a class="btn btn-success btn-xs" onclick="_cb.throwHeadMsg('danger','{lang code=no_vid_in_playlist}', 5000, true);">{lang code='play'}</a>
{/if}

View file

@ -215,8 +215,11 @@
{/if}
<div class="clearfix" style="padding-bottom:10px;">
<a href="{$prev_videoLink }" id="" class="btn btn-primary btn-xs"><span class="glyphicon glyphicon-step-backward"></span> Previous </a>
<a href="{$next_videoLink }" id="" class="btn btn-primary btn-xs"> Next <span class="glyphicon glyphicon-step-forward"></span></a>
<a href="{$prev_videoLink}" id="" class="btn btn-primary btn-xs" {if $prev_videoLink=='#'} onclick="_cb.throwHeadMsg('warning','{lang code=empty_next}', 3000, true)" {/if}><span class="glyphicon glyphicon-step-backward"></span> {lang code=previous} </a>
<a href="{$next_videoLink}" id="" class="btn btn-primary btn-xs" {if $next_videoLink=='#'} onclick="_cb.throwHeadMsg('warning','{lang code=empty_next}', 3000, true)" {/if}> {lang code=next} <span class="glyphicon glyphicon-step-forward"></span></a>
</div>