ホームページ  >  記事  >  CMS チュートリアル  >  PHPCMS コメントを使用するにはどうすればよいですか?

PHPCMS コメントを使用するにはどうすればよいですか?

Guanhui
Guanhuiオリジナル
2020-07-20 15:17:123139ブラウズ

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 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。