phpcmsにおけるコメントスタイルの修正方法


phpcmsに持参したコメントプラグインはとても使いやすいです。しかし、スタイルは個人的に醜いと思います。Baiduは解決方法を見つけられませんでした。自分の検索方法が間違っているかもしれません。そこで、自分で研究しました。ここでは二つの方法を使って修正できます。
方法1:
PHPCMSでのget方法を使用してデータを取得します。

//      commentid   
{php $commentid = 'content_'.$catid.'-'.$id.'-'.$modelid;}
//      
{pc:get sql="SELECT * FROM v9_comment_data_1 where commentid = '$commentid'" cache="0" return="data"}
//    
{loop $data $key $val}
<li class="list-group-item">
<div class="media">
<a class="media-left" href="#">
<img src="{IMG_PATH}tou.png" class="img-circle" alt="...">
</a>
<div class="media-body">
<h5 class="media-heading">{$val[username]}</h5>
<span style="font-size:10px;">{$val[content]}</span>
</div>
</div>
</li>
{/loop}
{/pc}
方法二:
getメソッドを使ってデータを取得する以外に、最も簡単な方法があります。list.次のコードを見つけて、スタイルの修正をすればいいです。

{pc:comment action="lists" commentid="$commentid" siteid="$siteid" page="$_GET['page']" hot="$hot" num="20"}
{if !empty($data)} 
<div class="comment_button"><a href="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={$commentid}&title={urlencode(($comment[title] ? $comment[title] : $title))}&url={urlencode(($comment[url] ? $comment[url] : $url))}&hot=0&iframe=1"{if empty($hot)} class="on"{/if}>  </a> <a href="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={$commentid}&title={urlencode(($comment[title] ? $comment[title] : $title))}&url={urlencode(($comment[url] ? $comment[url] : $url))}&hot=1&iframe=1"{if $hot} class="on"{/if}>  </a></div>
<div class="comment">
{loop $data $r}
<h5 class="title fn">{direction($r[direction])} <font color="#FF0000">{format::date($r[creat_at], 1)}</font> {if $r[userid]}{get_nickname($r[userid])}{else}{$r[username]}{/if} </h5>
<div class="content">{$r[content]}
<div class="rt"><a href="javascript:void(0)" onclick="reply({$r[id]}, '{$commentid}')">  </a> <a href="javascript:void(0)" onclick="support({$r[id]}, '{$commentid}')">  </a>(<font id="support_{$r[id]}">{$r[support]}</font>)
</div>
<div id="reply_{$r[id]}" style="display:none"></div>
</div>
<div class="bk30 hr mb8"></div>
{/loop}
</div>
<div id="pages" class="text-r">{$pages}</div>
{/if}
{/pc}
以上は小编が皆さんに绍介したphpcmsの中のコメント様式の修正方法です。皆さんに助けてほしいです。もし何か疑问がありましたら、メッセージをください。小编はすぐに皆さんに返事します。ここでも私たちのサイトを応援してくれてありがとうございます。