怎么在phpcms中修改評論的樣式-創(chuàng)新互聯(lián)

今天就跟大家聊聊有關怎么在phpcms中修改評論的樣式,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結了以下內容,希望大家根據(jù)這篇文章可以有所收獲。

創(chuàng)新互聯(lián)建站:從2013年創(chuàng)立為各行業(yè)開拓出企業(yè)自己的“網站建設”服務,為成百上千家公司企業(yè)提供了專業(yè)的成都網站建設、做網站、網頁設計和網站推廣服務, 定制網站由設計師親自精心設計,設計的效果完全按照客戶的要求,并適當?shù)奶岢龊侠淼慕ㄗh,擁有的視覺效果,策劃師分析客戶的同行競爭對手,根據(jù)客戶的實際情況給出合理的網站構架,制作客戶同行業(yè)具有領先地位的。

方法一:


使用PHPCMS中的get方法進行獲取數(shù)據(jù)

//拼接評論表的commentid字段值
{php $commentid = 'content_'.$catid.'-'.$id.'-'.$modelid;}
//查詢獲取數(shù)據(jù)
{pc:get sql="SELECT * FROM v9_comment_data_1 where commentid = '$commentid'" cache="0" return="data"}
//循環(huán)輸出
{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">
<h6 class="media-heading">{$val[username]}</h6>
<span >{$val[content]}</span>
</div>
</div>
</li>
{/loop}
{/pc}

方法二:

除了使用get方法進行獲取數(shù)據(jù)之外還有一種最簡單的方式,找到 /phpcms/templates/default/comment/show_list.html 找到如下代碼,進行樣式的修改即可

{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}
<h6 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} </h6>
<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]}" ></div>
</div>
<div class="bk30 hr mb8"></div>
{/loop}
</div>
<div id="pages" class="text-r">{$pages}</div>
{/if}
{/pc}

看完上述內容,你們對怎么在phpcms中修改評論的樣式有進一步的了解嗎?如果還想了解更多知識或者相關內容,請關注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝大家的支持。

本文名稱:怎么在phpcms中修改評論的樣式-創(chuàng)新互聯(lián)
文章分享:http://muchs.cn/article28/djjsjp.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供自適應網站、營銷型網站建設、網站設計ChatGPT、做網站定制網站

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都網頁設計公司