首頁  >  文章  >  CMS教程  >  PHPCMS評論怎麼用?

PHPCMS評論怎麼用?

Guanhui
Guanhui原創
2020-07-20 15:17:123173瀏覽

PHPCMS評論怎麼用?

PHPCMS評論怎麼用?

首先在後台的“模組”下的"模組管理"裡面找到“評論模組”,對其進行安裝;然後在“模組”下的“評論”一項裡可以對此模組進行一些功能參數的配置;最後在前台模板添加評論標籤即可。

引用程式碼

{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=&#39;600&#39;></iframe>
{/if}


{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(&#39;commentid&#39;=>&#39;content_&#39;.$catid.&#39;-&#39;.$r[id].&#39;-&#39;.$modelid));}
<li><span class="rt">{date(&#39;Y-m-d H:i:s&#39;,$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}

推薦教學:《PHPCMS教學

以上是PHPCMS評論怎麼用?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn