适用范围:文章详情页面可使用
{pboot:commentcodestatus} 验证码是否开启
{pboot:commentaction} 评论提交地址
会员文章评论
{pboot:comment contentid={content:id}}
[comment:i] 序号0开始
[comment:n] 序号1开始
[comment:pid] 父评论ID
[comment:contentid] 评论文章ID
[comment:comment] 评论内容
[comment:ip] IP地址
[comment:os] 操作系统
[comment:bs] 浏览器
[comment:date] 日期
[comment:uid] 评论人ID
[comment:username] 评论人账号
[comment:nickname] 评论人昵称
[comment:headpic] 评论人头像
[comment:pid] 父评论人ID
[comment:pusername] 父评论人账号
[comment:pnickname] 父评论人昵称
[comment:pheadpic] 父评论人头像
[comment:likes] 点赞数量
[comment:oppose] 反对数量
[comment:replyaction] 评论回复提交地址
{pboot:commentsub} 子评论输出
[commentsub:***] 子评论调用字段同上
{/pboot:commentsub}
{/pboot:comment}Ajax提交评论
//提交评论
function submitcomment(obj){
var url= $(obj).data("action");
var comment=$(obj).find("#comment").val();
var checkcode=$(obj).find("#checkcode").val();
$.ajax({
type: 'POST',
url: url,
dataType: 'json',
data: {
comment: comment,
checkcode: checkcode
},
success: function (response, status) {
if(response.code){
alert(response.data);
$(obj)[0].reset();
$(".modal").modal("hide");
window.location.reload()
}else{
alert(response.data);
$('.codeimg').click();
}
},
error:function(xhr,status,error){
alert('返回数据异常!');
}
});
return false;
}
</script>我的评论列表
{pboot:mycommentpage} 我的评论页面地址
{pboot:mycomment}
[mycomment:i] 序号0开始
[mycomment:n] 序号1开始
[mycomment:pid] 父评论ID
[mycomment:contentid] 评论文章ID
[mycomment:comment] 评论内容
[mycomment:title] 文章标题
[mycomment:ip] IP地址
[mycomment:os] 操作系统
[mycomment:bs] 浏览器
[mycomment:date] 日期
[mycomment:uid] 评论人ID
[mycomment:username] 评论人账号
[mycomment:nickname] 评论人昵称
[mycomment:headpic] 评论人头像
[mycomment:pid] 父评论人ID
[mycomment:pusername] 父评论人账号
[mycomment:pnickname] 父评论人昵称
[mycomment:pheadpic] 父评论人头像
[mycomment:likes] 点赞数量
[mycomment:oppose] 反对数量
[mycomment:status] 评论状态1审核2待审核
[mycomment:replyaction] 评论回复提交地址
[mycomment:delaction] 评论删除地址
{/pboot:mycomment}