mirror of https://github.com/1099438829/apeblog
修正回复
This commit is contained in:
parent
079b1a1739
commit
8d4933383f
|
|
@ -678,7 +678,7 @@ function tpl_get_comment_list($id, $type, $pageSize = 10, $orderBy)
|
|||
}
|
||||
$lists = [];
|
||||
foreach ($commentModel as $key => $item) {
|
||||
$item['reply_url'] = url('article/comment_reply?pid=' . $item['id'])->build();;
|
||||
$item['reply_url'] = url('article/create_comment?pid=' . $item['id'])->build();;
|
||||
$lists[$key] = $item;
|
||||
}
|
||||
$re = [
|
||||
|
|
|
|||
|
|
@ -108,30 +108,30 @@
|
|||
{notempty name="(web_config('web_zhifubao_pay'))"}<img src="{:file_cdn(web_config('web_zhifubao_pay'))}" alt="" />{/notempty}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-turn-page-plane">
|
||||
<div class="post-turn-page post-turn-page-previous">
|
||||
<div class="post-turn-page-main">
|
||||
{ape:prenext get="pre" cid="$apeField['category_id']"}
|
||||
<div>
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
</div>
|
||||
<div class="post-turn-page-link-pre">
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}"><<上一篇></上一篇></a>
|
||||
</div>
|
||||
{/ape:prenext}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-turn-page post-turn-page-next">
|
||||
{ape:prenext get="next" cid="$apeField['category_id']"}
|
||||
<div class="post-turn-page-main">
|
||||
<div class="post-turn-page-plane">
|
||||
<div class="post-turn-page post-turn-page-previous">
|
||||
<div class="post-turn-page-main">
|
||||
{ape:prenext get="pre" cid="$apeField['category_id']"}
|
||||
<div>
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
<div class="post-turn-page-link-next">
|
||||
<a href="javascript:;">下一篇>></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-turn-page-link-pre">
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}"><<上一篇></上一篇></a>
|
||||
</div>
|
||||
{/ape:prenext}
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-turn-page post-turn-page-next">
|
||||
{ape:prenext get="next" cid="$apeField['category_id']"}
|
||||
<div class="post-turn-page-main">
|
||||
<a href="{:url('/index/article/detail')}?id={$field['id']}">{$field['title']}</a>
|
||||
<div class="post-turn-page-link-next">
|
||||
<a href="javascript:;">下一篇>></a>
|
||||
</div>
|
||||
</div>
|
||||
{/ape:prenext}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post-tool-plane"></div>
|
||||
</div>
|
||||
|
|
@ -153,7 +153,7 @@
|
|||
<div id="respond" class="comment-respond">
|
||||
<h3 id="reply-title" class="comment-reply-title">
|
||||
<small>
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="#respond" style="display:none;">
|
||||
<a rel="nofollow" id="cancel-comment-reply-link" href="{:url('/index/article/detail')}?id={$field['id']}#respond" style="display:none;">
|
||||
取消回复
|
||||
</a>
|
||||
</small>
|
||||
|
|
@ -169,123 +169,122 @@
|
|||
<button class="popover-btn popover-btn-face" type="button">
|
||||
<i class="far fa-smile-wink">
|
||||
</i>添加表情</button>
|
||||
<div class="conment-face-plane">
|
||||
{:file_load_face('__IMG__/face/')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment_userinput">
|
||||
<div class="comment-form-author">
|
||||
<input id="author" name="author" placeholder="昵称(*)" type="text" value="" size="30" class="required" />
|
||||
</div>
|
||||
<div class="comment-form-email">
|
||||
<input id="email" name="email" type="text" placeholder="邮箱(*)" value="" class="required" />
|
||||
</div>
|
||||
<div class="comment-form-url">
|
||||
<input id="url" placeholder="网址" name="url" type="text" value="" size="30" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none" class="comment-form-cookies-consent">
|
||||
<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" checked="checked" />
|
||||
</div>
|
||||
<div class="form-submit">
|
||||
<div style="text-align: right">
|
||||
<input name="submit" type="submit" id="submit" class="button primary-btn" value="发表评论">
|
||||
</div>
|
||||
<input type="hidden" name="document_id" value="{$apeField['id']}" id="comment_document_id">
|
||||
<input type="hidden" name="pid" id="comment_pid" value="0">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- #respond -->
|
||||
<meta content="UserComments:0" itemprop="interactionCount">
|
||||
<h3 class="comments-title">共有<span class="commentCount">{:get_comment_count($apeField['id'])}</span>条评论</h3>
|
||||
<div class="comment-sofa">
|
||||
{if get_comment_count($apeField['id']) ==0}
|
||||
<i class="fas fa-couch"></i>沙发空余
|
||||
{/if}
|
||||
</div>
|
||||
<ol class="commentlist">
|
||||
{ape:comment type="top" typeId="$apeField['id']" void='field'}
|
||||
<li class="comment">
|
||||
<div class="comment-item" id="comment-{$field['id']}">
|
||||
<div class="comment-media">
|
||||
<div class="avatar-img">
|
||||
<img src="{$field['cover_path']}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-metadata">
|
||||
<div class="media-body">
|
||||
<p class="author_name">{$field['author']}<a href="{$field['url']}" rel="external nofollow ugc" target="_blank" class="url"></a><span class="comment-zhan"><img title="网站主" src="__IMG__/zhan.svg" alt=""></span></p>
|
||||
<div class="comment-text">
|
||||
<p>{$field['content']}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="comment-pub-time">{$field['create_time']}</span>
|
||||
<span class="comment-btn-reply">
|
||||
<a rel="nofollow" class="comment-reply-link" href="{$field['reply_url']}" data-commentid="{$field['id']}" data-postid="{$apeField['id']}" data-belowelement="comment-{$field['id']}" data-respondelement="respond" data-replyto="回复给{$field['author']}" aria-label="回复给{$field['author']}"><i class="fa fa-reply"></i> 回复</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{ape:comment type="son" typeId="$field['id']" void="vo"}
|
||||
<ol class="children">
|
||||
<li class="comment">
|
||||
<div class="comment-item" id="comment-{$vo.id}">
|
||||
<div class="comment-media">
|
||||
<div class="avatar-img">
|
||||
<img src="{$field['cover_path']}" alt="">
|
||||
<div class="conment-face-plane">
|
||||
{:file_load_face('__IMG__/face/')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-metadata">
|
||||
<div class="media-body">
|
||||
<p class="author_name">{$vo['author']}<span class="user-identity user-admin" title="{$vo['author']}"></span><span class="comment-from">@<a href="#comment-2264">{$field['author']}</a></span></p>
|
||||
<div class="comment-text">
|
||||
<p>{$vo['content']}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment_userinput">
|
||||
<div class="comment-form-author">
|
||||
<input id="author" name="author" placeholder="昵称(*)" type="text" value="" size="30" class="required" />
|
||||
</div>
|
||||
<div class="comment-form-email">
|
||||
<input id="email" name="email" type="text" placeholder="邮箱(*)" value="" class="required" />
|
||||
</div>
|
||||
<div class="comment-form-url">
|
||||
<input id="url" placeholder="网址" name="url" type="text" value="" size="30" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none" class="comment-form-cookies-consent">
|
||||
<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" checked="checked" />记住用户信息
|
||||
</div>
|
||||
<div class="form-submit">
|
||||
<div style="text-align: right">
|
||||
<input name="submit" type="submit" id="submit" class="button primary-btn" value="发表评论">
|
||||
</div>
|
||||
<input type="hidden" name="document_id" value="{$apeField['id']}" id="comment_document_id">
|
||||
<input type="hidden" name="pid" id="comment_parent" value="0">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- #respond -->
|
||||
<meta content="UserComments:0" itemprop="interactionCount">
|
||||
<h3 class="comments-title">共有<span class="commentCount">{:get_comment_count($apeField['id'])}</span>条评论</h3>
|
||||
<div class="comment-sofa">
|
||||
{if get_comment_count($apeField['id']) ==0}
|
||||
<i class="fas fa-couch"></i>沙发空余
|
||||
{/if}
|
||||
</div>
|
||||
<ol class="commentlist">
|
||||
{ape:comment type="top" typeId="$apeField['id']" void='field'}
|
||||
<li class="comment">
|
||||
<div class="comment-item" id="comment-{$field['id']}">
|
||||
<div class="comment-media">
|
||||
<div class="avatar-img">
|
||||
<img src="{$field['cover_path']}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-metadata">
|
||||
<div class="media-body">
|
||||
<p class="author_name">{$field['author']}<a href="{$field['url']}" rel="external nofollow ugc" target="_blank" class="url"></a><span class="comment-zhan"><img title="网站主" src="__IMG__/zhan.svg" alt=""></span></p>
|
||||
<div class="comment-text">
|
||||
<p>{$field['content']}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="comment-pub-time">{$field['create_time']}</span>
|
||||
<span class="comment-btn-reply">
|
||||
<a rel="nofollow" class="comment-reply-link" href="{$field['reply_url']}" data-commentid="{$field['id']}" data-postid="{$apeField['id']}" data-belowelement="comment-{$field['id']}" data-respondelement="respond" data-replyto="回复给{$field['author']}" aria-label="回复给{$field['author']}"><i class="fa fa-reply"></i> 回复</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{ape:comment type="son" typeId="$field['id']" void="vo"}
|
||||
<ol class="children">
|
||||
<li class="comment">
|
||||
<div class="comment-item" id="comment-{$vo.id}">
|
||||
<div class="comment-media">
|
||||
<div class="avatar-img">
|
||||
<img src="{$field['cover_path']}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<span class="comment-pub-time">{$vo.create_time}</span>
|
||||
<span class="comment-btn-reply">
|
||||
<a rel="nofollow" class="comment-reply-link" href="{$vo['reply_url']}" data-commentid="{$vo.id}" data-postid="{$apeField['id']}" data-belowelement="comment-{$vo.id}" data-respondelement="respond" data-replyto="回复给{$vo['author']}" aria-label="回复给{$vo['author']}"><i class="fa fa-reply"></i> 回复</a>
|
||||
</span>
|
||||
<div class="comment-metadata">
|
||||
<div class="media-body">
|
||||
<p class="author_name">{$vo['author']}<span class="user-identity user-admin" title="{$vo['author']}"></span><span class="comment-from">@<a href="#comment-2264">{$field['author']}</a></span></p>
|
||||
<div class="comment-text">
|
||||
<p>{$vo['content']}</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="comment-pub-time">{$vo.create_time}</span>
|
||||
<span class="comment-btn-reply">
|
||||
<a rel="nofollow" class="comment-reply-link" href="{$vo['reply_url']}" data-commentid="{$vo.id}" data-postid="{$apeField['id']}" data-belowelement="comment-{$vo.id}" data-respondelement="respond" data-replyto="回复给{$vo['author']}" aria-label="回复给{$vo['author']}"><i class="fa fa-reply"></i> 回复</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li><!-- #comment-## -->
|
||||
</ol><!-- .children -->
|
||||
</li><!-- #comment-## -->
|
||||
</ol><!-- .children -->
|
||||
{/ape:comment}
|
||||
</li><!-- #comment-## -->
|
||||
{/ape:comment}
|
||||
</li><!-- #comment-## -->
|
||||
{/ape:comment}
|
||||
</ol>
|
||||
<script type='text/javascript' src='__JS__/comment-reply.min.js'></script>
|
||||
<script type='text/javascript'>
|
||||
$('body').on('click', '.comment-reply-link', function (e) {
|
||||
addComment.moveForm("li-comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid'));
|
||||
console.log("li-comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid'));
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
$(document).click(function (e) {
|
||||
$('.conment-face-plane').css("opacity", "0");
|
||||
$('.conment-face-plane').css("visibility", "hidden");
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('body').on('click', '.img-pace', function (e) {
|
||||
$('.comment_form_textarea').val($('.comment_form_textarea').val() + '[f=' + $(this).attr('facename') + ']')
|
||||
});
|
||||
$('body').on('click', '.popover-btn-face', function (e) {
|
||||
if ($('.conment-face-plane').css("visibility") == 'visible') {
|
||||
</ol>
|
||||
<script type='text/javascript' src='__JS__/comment-reply.min.js'></script>
|
||||
<script type='text/javascript'>
|
||||
$('body').on('click', '.comment-reply-link', function (e) {
|
||||
addComment.moveForm("li-comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid'));
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
$(document).click(function (e) {
|
||||
$('.conment-face-plane').css("opacity", "0");
|
||||
$('.conment-face-plane').css("visibility", "hidden");
|
||||
} else {
|
||||
$('.conment-face-plane').css("opacity", "1");
|
||||
$('.conment-face-plane').css("visibility", "visible");
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
</script>
|
||||
<nav class="comment-navigation pages"></nav>
|
||||
</div>
|
||||
{/if}
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('body').on('click', '.img-pace', function (e) {
|
||||
$('.comment_form_textarea').val($('.comment_form_textarea').val() + '[f=' + $(this).attr('facename') + ']')
|
||||
});
|
||||
$('body').on('click', '.popover-btn-face', function (e) {
|
||||
if ($('.conment-face-plane').css("visibility") == 'visible') {
|
||||
$('.conment-face-plane').css("opacity", "0");
|
||||
$('.conment-face-plane').css("visibility", "hidden");
|
||||
} else {
|
||||
$('.conment-face-plane').css("opacity", "1");
|
||||
$('.conment-face-plane').css("visibility", "visible");
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
</script>
|
||||
<nav class="comment-navigation pages"></nav>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-box-list">
|
||||
|
|
|
|||
Loading…
Reference in New Issue