2016-03-16 17:30:07 +05:00
|
|
|
<div class="add-comments clearfix" id="add_comment">
|
|
|
|
{if $userquery->login_check('',true) || $Cbucket->configs.anonym_comments == 'yes' }
|
|
|
|
<form name="comment_form" method="post" action="" id="comment_form" onsubmit="return false;">
|
|
|
|
<div class="clearfix com-txtarea">
|
|
|
|
<span id="comment_err_output" class="alert alert-danger comment_err_output pull-left" style="display:none;width:100%"></span>
|
|
|
|
<span id="comment_msg_output" class="alert alert-success comment_msg_output pull-left" style="display:none;"></span>
|
|
|
|
<input type="hidden" name="reply_to" id="reply_to" value="0">
|
|
|
|
<input type="hidden" name="obj_id" id="obj_id" value="{$id}">
|
|
|
|
<input type="hidden" name="type" value="{$type}" />
|
|
|
|
{if !$userquery->login_check('',true) && $Cbucket->configs.anonym_comments == 'yes'}
|
2016-03-25 19:04:18 +05:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="name" class="block-label">{lang code='name'}</label>
|
|
|
|
<input type="text" name="name" id="name" class="form-control" placeholder="Your Name">
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="email" class="block-label">{lang code='email_wont_display'}</label>
|
|
|
|
<input type="text" name="email" id="email" class="form-control" placeholder="Your Email">
|
|
|
|
</div>
|
2016-03-16 17:30:07 +05:00
|
|
|
{else}
|
2016-04-05 11:04:42 +05:00
|
|
|
<div class="clearfix ">
|
2016-04-14 13:17:26 +05:00
|
|
|
<label>{lang code="comment_as"} </label>
|
2016-04-05 11:04:42 +05:00
|
|
|
<span>
|
|
|
|
{if $userquery->udetails.fullname}
|
|
|
|
{$userquery->udetails.fullname}
|
|
|
|
{else}
|
|
|
|
{$userquery->username}
|
|
|
|
{/if}
|
|
|
|
</span>
|
|
|
|
</div>
|
2016-03-16 17:30:07 +05:00
|
|
|
{/if}
|
2016-03-25 19:04:18 +05:00
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
{if config('comments_captcha')=='all' || ( config('comments_captcha')=='guests' && !$userquery->login_check('',true) )}
|
|
|
|
{$captcha=get_captcha()}
|
|
|
|
{if $captcha}
|
2016-03-25 19:04:18 +05:00
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
{if $captcha.show_field}
|
2016-03-25 19:04:18 +05:00
|
|
|
<label class="block-label" for="captcha">Verification Code</label>
|
2016-03-16 17:30:07 +05:00
|
|
|
<div class="ADfieldInputs">{load_captcha captcha=$captcha load=field field_params = ' id="captcha" class="TextField"'}</div>
|
|
|
|
{/if}
|
|
|
|
{load_captcha captcha=$captcha load=function}
|
2016-03-25 19:04:18 +05:00
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
{/if}
|
|
|
|
{/if}
|
|
|
|
{ANCHOR place='before_compose_box'}
|
|
|
|
|
2016-03-25 19:04:18 +05:00
|
|
|
<div class="form-group clearfix">
|
|
|
|
<div class="avatar_comment_as">
|
|
|
|
<img src="{$userquery->avatar(false,'false',userid())}" class="img-circle">
|
|
|
|
</div>
|
|
|
|
<div class="comment_txt_area">
|
|
|
|
<textarea name="comment" id="comment_box" cols="30" rows="1" class="form-control" placeholder="Please type something in a comment box"></textarea>
|
|
|
|
</div>
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
2016-03-25 19:04:18 +05:00
|
|
|
<div class="clearfix text-right">
|
2016-04-14 13:17:26 +05:00
|
|
|
<input type="button" name="add_comment" id="add_comment_button" class="btn btn-submit btn-primary" value="{lang code='user_add_comment'}">
|
2016-03-16 17:30:07 +05:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-03-25 19:04:18 +05:00
|
|
|
|
2016-03-16 17:30:07 +05:00
|
|
|
<div class="clearfix" id="msg_container"></div>
|
|
|
|
</form>
|
|
|
|
{else}
|
|
|
|
<span class="sizeSmall bold error"></span>
|
|
|
|
<div class="col-lg-10 col-md-9 col-sm-9 col-xs-9">
|
|
|
|
<span class="alert-warning alert msg-display">{lang code='please_login_to_comment'}</span>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
|
|
var form_selector = 'comment_form';
|
|
|
|
var type = '{$type}';
|
|
|
|
var video_id = '{$vdo.video_id}';
|
|
|
|
$('body').on("click","#add_comment_button",function(){
|
|
|
|
add_comment_js(form_selector,type,video_id);
|
|
|
|
});
|
|
|
|
$('#comment_box').keypress(function(e){
|
|
|
|
if(e.keyCode == 13 && !e.shiftKey)
|
|
|
|
{
|
|
|
|
e.preventDefault();
|
|
|
|
add_comment_js(form_selector,type,video_id);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|