home page Site building tutorial text

How to add @ name tag before replying to message content

When someone replies to this message, the implementation method of automatically adding @ name in front of the message content is relatively simple. Just add the following code before the comment content {$comment. Content} in the template file comment.php: {if $comment. ParentID!=0} {php} $newc=$zbp ->GetCommentByID ($comment ->ParentID)$ atid=$n...

When someone replies to this message, @ name will be automatically added in front of the message

The implementation method is relatively simple. You only need to Template file comment.php Comments in {$comment.Content} Add the following code before the:

 {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}


Reward
poster

This article is written by Beautiful theme Original or collected and released

Please indicate the address of this article for reprinting: https://www.umtheme.com/website/113.html

Related recommendations

Post comments

Thank you for your support