Added : Comments Captcha
Added : New HD FLV Player (Working)
This commit is contained in:
parent
3f0e80b050
commit
3e76f346b4
10 changed files with 107 additions and 15 deletions
|
@ -1 +1,3 @@
|
|||
INSERT INTO `clipbucket_svn`.`cb_config` (`configid`, `name`, `value`) VALUES (NULL, 'allow_username_spaces', 'yes');
|
||||
INSERT INTO `cb_config` (`configid`, `name`, `value`) VALUES (NULL, 'allow_username_spaces', 'yes');
|
||||
INSERT INTO `cb_config` (`configid`, `name`, `value`) VALUES (NULL, 'use_playlist', 'yes');
|
||||
INSERT INTO `cb_config` (`configid`, `name`, `value`) VALUES (NULL, 'comments_captcha', 'all');
|
|
@ -38,7 +38,7 @@ if(isset($_POST['update'])){
|
|||
'big_thumb_width',
|
||||
'big_thumb_height',
|
||||
|
||||
'closed' ,
|
||||
'closed',
|
||||
'closed_msg',
|
||||
'channel_comments',
|
||||
'anonym_comments',
|
||||
|
@ -46,7 +46,8 @@ if(isset($_POST['update'])){
|
|||
'channels_list_per_tab',
|
||||
'captcha_type',
|
||||
'con_modules_type',
|
||||
'comment_rating' ,
|
||||
'comments_captcha',
|
||||
'comment_rating',
|
||||
|
||||
'date_format',
|
||||
'description',
|
||||
|
|
|
@ -12,12 +12,15 @@ $userquery->admin_login_check();
|
|||
$pages->page_redir();
|
||||
$userquery->login_check('admin_access');
|
||||
|
||||
//Set Mode
|
||||
assign('mode',$_GET['mode']);
|
||||
|
||||
if(isset($_POST['update'])){
|
||||
$configs = $Cbucket->configs;
|
||||
|
||||
$rows = array(
|
||||
'autoplay_video',
|
||||
'use_playlist',
|
||||
);
|
||||
|
||||
foreach($rows as $field)
|
||||
|
|
|
@ -200,6 +200,26 @@ $(document).ready(function(){
|
|||
<td>Allow comments rating</td>
|
||||
<td><input name="comment_rating" type="checkbox" id="comment_rating" value="1" {if $row.comment_rating=='1'}checked="checked"{/if} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Comments Captcha</td>
|
||||
<td><p>
|
||||
<label>
|
||||
<input type="radio" name="comments_captcha" value="all" id="comments_captcha_0"
|
||||
{if $row.comments_captcha==all} checked="checked"{/if} />
|
||||
For Everyone</label>
|
||||
|
||||
<label>
|
||||
<input type="radio" name="comments_captcha" value="guests" id="comments_captcha_1"
|
||||
{if $row.comments_captcha==guests} checked="checked"{/if} />
|
||||
For Guests Only</label>
|
||||
|
||||
<label>
|
||||
<input type="radio" name="comments_captcha" value="none" id="comments_captcha_2"
|
||||
{if $row.comments_captcha==none} checked="checked"{/if} />
|
||||
Disable</label>
|
||||
<br />
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
|
|
@ -1,22 +1,43 @@
|
|||
{if $mode =='show_settings'}
|
||||
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
|
||||
<tr>
|
||||
<td align="left" class="settings_inner_title"><div onclick="toggle_search('player_size')" style="cursor:pointer">ClipBucket Website Player Settings -<span style="font-size:11px; color:#06c"> click here to edit setting</span></div></td>
|
||||
<td align="left" class="settings_inner_title">ClipBucket Website Player Settings</td>
|
||||
<td width="20" align="right" > </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="width:100%; margin:auto{if $smarty.cookies.show_player_size_search!='show'};display:none{/if}" id="player_size">
|
||||
<form name="player_settings" action="manage_players.php" method="post">
|
||||
<div style="width:100%; margin:auto" id="player_size">
|
||||
<form name="player_settings" action="manage_players.php?mode=show_settings" method="post">
|
||||
<fieldset class="fieldset" style="border:none">
|
||||
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="block">
|
||||
<tr>
|
||||
<td width="200" valign="top"><label for="autoplay_video">Autoplay</label></td>
|
||||
<td valign="top">
|
||||
<td width="301" valign="top"><label for="autoplay_video"><strong>Autoplay</strong><br />
|
||||
if yes, all videos will be played automatically
|
||||
</label></td>
|
||||
<td width="813" valign="top">
|
||||
<label>
|
||||
<input type="radio" name="autoplay_video" value="yes" id="autoplay_video_0" {if $row.autoplay_video=='yes'} checked="checked"{/if} />
|
||||
Yes</label>
|
||||
<label><input type="radio" name="autoplay_video" value="no" id="autoplay_video_1" {if $row.autoplay_video=='no'} checked="checked"{/if} />
|
||||
No</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><strong>Use Playlist<br />
|
||||
</strong>By turning this on, player will turn on playlists feature in player (if available)</td>
|
||||
<td valign="top"><label>
|
||||
<input type="radio" name="use_playlist" value="yes" id="use_playlist" {if $row.use_playlist=='yes'} checked="checked"{/if} />
|
||||
Yes</label>
|
||||
<label>
|
||||
<input type="radio" name="use_playlist" value="no" id="use_playlist" {if $row.use_playlist=='no'} checked="checked"{/if} />
|
||||
No</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"> </td>
|
||||
<td valign="top"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"> </td>
|
||||
<td valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align="left"><input type="submit" class="button" value="Update" name="update" /></div>
|
||||
</fieldset>
|
||||
|
@ -81,6 +102,9 @@
|
|||
</script>
|
||||
{/literal}
|
||||
|
||||
<div style="height:30px"></div>
|
||||
In order to change player size, resize the box given below..
|
||||
<div style="height:10px"></div>
|
||||
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
|
||||
<tr>
|
||||
<td align="left" class="settings_inner_title"><div onclick="toggle_search('website_player');" style="cursor:pointer">Main Website Player -<span style="font-size:11px; color:#06c"> click here to main website player</span></div></td>
|
||||
|
@ -91,7 +115,7 @@
|
|||
<div class="demo" style="width:100%; margin:auto{if $smarty.cookies.website_player_search!='show'};display:none{/if}" id="website_player">
|
||||
<div id="msg_box" style="margin:5px;"></div>
|
||||
|
||||
<div id="resizable" class="ui-widget-content" style="width:{$Cbucket->configs.player_width}px; height:{$Cbucket->configs.player_height}px">
|
||||
<div id="resizable" class="ui-widget-content" style="width:{$Cbucket->configs.player_width}px; height:{$Cbucket->configs.player_height}px; margin:auto">
|
||||
<h3 class="ui-widget-header">Original Size of your Main Website Player</h3>
|
||||
</div>
|
||||
<div class="player_dims"><label for="width">Width</label>
|
||||
|
@ -100,6 +124,9 @@
|
|||
<input type="text" name="height" id="height" value="{$Cbucket->configs.player_height}" />
|
||||
</div></div>
|
||||
|
||||
|
||||
<div style="height:10px"></div>
|
||||
|
||||
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="block">
|
||||
<tr>
|
||||
<td align="left" class="settings_inner_title"><div onclick="toggle_search('channel_player');" style="cursor:pointer">Channel Player Settings -<span style="font-size:11px; color:#06c"> click here to edit channel player settings</span></div></td>
|
||||
|
@ -108,7 +135,7 @@
|
|||
</table>
|
||||
<div class="demo" style="width:100%; margin:auto{if $smarty.cookies.channel_player_search!='show'};display:none{/if}" id="channel_player">
|
||||
|
||||
<div id="resizable-channel" class="ui-widget-content" style="width:{$Cbucket->configs.channel_player_width}px; height:{$Cbucket->configs.channel_player_height}px">
|
||||
<div id="resizable-channel" class="ui-widget-content" style="width:{$Cbucket->configs.channel_player_width}px; height:{$Cbucket->configs.channel_player_height}px; margin:auto">
|
||||
<h3 class="ui-widget-header">Original Size of your Main Website Player</h3>
|
||||
</div>
|
||||
<div class="player_dims"><label for="width">Width</label>
|
||||
|
@ -120,6 +147,9 @@
|
|||
</div>
|
||||
|
||||
|
||||
{else}
|
||||
|
||||
|
||||
<div style="height:35px"></div>
|
||||
|
||||
<h2>Selected Player</h2>
|
||||
|
@ -161,4 +191,6 @@ Website : <a href="{$curplayer.website}">{$curplayer.website}</a></td>
|
|||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
|
@ -291,7 +291,8 @@ class ClipBucket
|
|||
array(
|
||||
'Templates Manager'=>'templates.php',
|
||||
'Templates Editor'=>'template_editor.php',
|
||||
'Players Manager' => 'manage_players.php'
|
||||
'Players Manager' => 'manage_players.php',
|
||||
'Player Settings' => 'manage_players.php?mode=show_settings'
|
||||
|
||||
),
|
||||
//Plugin Manager
|
||||
|
|
|
@ -422,6 +422,8 @@ class myquery {
|
|||
if(strlen($comment) > MAX_COMMENT_CHR)
|
||||
e(sprintf("'%d' characters allowed for comment",MAX_COMMENT_CHR));
|
||||
}
|
||||
if(!verify_captcha())
|
||||
e(lang('usr_ccode_err'));
|
||||
if(empty($comment))
|
||||
e(lang("pelase_enter_something_for_comment"));
|
||||
|
||||
|
|
|
@ -415,7 +415,8 @@ var loading = loading_img+" Loading...";
|
|||
$("#add_comment_result").css("display","block");
|
||||
$("#add_comment_result").html(loading);
|
||||
$("#add_comment_button").attr("disabled","disabled");
|
||||
|
||||
|
||||
var captcha_enabled = $("#"+form_id+" input:#cb_captcha_enabled").val();
|
||||
$.post(page,
|
||||
{
|
||||
mode : 'add_comment',
|
||||
|
@ -424,7 +425,9 @@ var loading = loading_img+" Loading...";
|
|||
comment : $("#"+form_id+" textarea:#comment_box").val(),
|
||||
obj_id : $("#"+form_id+" input:#obj_id").val(),
|
||||
reply_to : $("#"+form_id+" input:#reply_to").val(),
|
||||
type : type
|
||||
type : type,
|
||||
cb_captcha_enabled: $("#"+form_id+" input:#cb_captcha_enabled").val(),
|
||||
cb_captcha: $("#"+form_id+" input:#captcha").val()
|
||||
},
|
||||
function(data)
|
||||
{
|
||||
|
@ -432,11 +435,15 @@ var loading = loading_img+" Loading...";
|
|||
alert("No data");
|
||||
else
|
||||
{
|
||||
|
||||
$("#add_comment_button").attr("disabled","");
|
||||
|
||||
$("#add_comment_result").css("display","block");
|
||||
if(data.err!='')
|
||||
{
|
||||
captcha_enabled
|
||||
$("#add_comment_result").html(data.err);
|
||||
}
|
||||
if(data.msg!='')
|
||||
$("#add_comment_result").html(data.msg);
|
||||
|
||||
|
|
|
@ -16,6 +16,24 @@
|
|||
Name : {$userquery->username}<br>
|
||||
{/if}
|
||||
<br>
|
||||
|
||||
{if config('comments_captcha')=='all' || ( config('comments_captcha')=='guests' && !$userquery->login_check('',true) )}
|
||||
{assign var=captcha value=func->get_captcha()}
|
||||
{if $captcha}
|
||||
{if $captcha.show_field}
|
||||
<label class="label" for="captcha">Verification Code</label><br />
|
||||
{load_captcha captcha=$captcha load=field field_params = ' id="captcha" class="input'}
|
||||
<div class="clearfix"></div>
|
||||
{/if}
|
||||
<label class="label"> </label>
|
||||
<div class="input_container">
|
||||
{load_captcha captcha=$captcha load=function}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
|
||||
{ANCHOR place='before_compose_box'}
|
||||
<textarea name="comment" id="comment_box" cols="45" rows="5" class="input" ></textarea>
|
||||
<input type="hidden" name="type" value="{$type}" />
|
||||
|
|
|
@ -217,7 +217,13 @@ $(document).ready(function() {
|
|||
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{literal}
|
||||
<!--[if lte IE 6]>
|
||||
<style type="text/css">
|
||||
.clearfix { height: 1%; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
{/literal}
|
||||
<!--[if IE 7]>
|
||||
<link href="{$theme}/ie7.css" rel="stylesheet" type="text/css" />
|
||||
<![endif]-->
|
||||
|
|
Loading…
Add table
Reference in a new issue