How to use PHPCMS comments?
First find the "Comment Module" in "Module Management" under "Module" in the background and install it; then you can comment on it in the "Comments" item under "Module" The module configures some functional parameters; finally, add comment tags to the front-end template.
Quote code
{if $allow_comment && module_exists('comment')} <span style="white-space:pre"></span><iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no" height='600'></iframe> {/if}
or
{pc:content action="lists" catid="$catid" num="25" order="id DESC" page="$page" moreinfo="1"} {loop $data $r} {php $comment_tag = pc_base::load_app_class("comment_tag", "comment"); $comment_total = $comment_tag->count(array('commentid'=>'content_'.$catid.'-'.$r[id].'-'.$modelid));} <li><span class="rt">{date('Y-m-d H:i:s',$r[inputtime])}</span>·<a href="{$r[url]}" target="_blank"{title_style($r[style])}>{$r[title]}</a> 评论数:{if $comment_total}{$comment_total}{else}0{/if}</li> {/loop} {$pages} {/pc}
Recommended tutorial: "PHPCMS Tutorial"
The above is the detailed content of How to use PHPCMS comments?. For more information, please follow other related articles on the PHP Chinese website!