首页 建站教程 正文

如何给回复留言内容前添加@姓名标签

当有人回复该条留言时,自动在留言内容前面添加@姓名实现方法比较简单,只需要在模板文件comment.php里的评论内容{$comment.Content}的前面加上如下代码即可:{if $comment.ParentID!=0}{php}$newc=$zbp->GetCommentByID($comment->ParentID);$atid=$n...

当有人回复该条留言时,自动在留言内容前面添加@姓名

实现方法比较简单,只需要在模板文件comment.php里的评论内容{$comment.Content}的前面加上如下代码即可:

{if $comment.ParentID!=0}{php}$newc=$zbp->GetCommentByID($comment->ParentID);$atid=$newc->ID;$atname=$newc->Name;{/php}<a class="comment_at" href="#comment-{$atid}">@{$atname}</a>{/if}


打赏
海报

本文由优美主题原创或收集发布

转载请注明本文地址:http://www.umtheme.com/website/113.html

相关推荐

发布评论

ainiaobaibaibaibaobaobeishangbishibizuichiguachijingchongjingdahaqiandaliandangaodw_dogedw_erhadw_miaodw_tuzidw_xiongmaodw_zhutouganbeigeiliguiguolaiguzhanghahahahashoushihaixiuhanheixianhenghorse2huaixiaohuatonghuaxinhufenjiayoujiyankeaikeliankouzhaokukuloukunkuxiaolandelinileimuliwulxhainiolxhlikelxhqiuguanzhulxhtouxiaolxhwahahalxhzanningwennonuokpinganqianqiaoqinqinquantouruoshayanshengbingshiwangshuaishuijiaosikaostar0star2star3taikaixintanshoutianpingtouxiaotuwabiweifengweiquweiwuweixiaowenhaowoshouwuxiangjixianhuaxiaoerbuyuxiaokuxiaoxinxinxinxinsuixixixuyeyinxianyinyueyouhenghengyuebingyueliangyunzanzhajizhongguozanzhoumazhuakuangzuohenghengzuoyi

感谢您的支持