phpcms中的評(píng)論樣式修改方法
phpcms中自帶的評(píng)論插件很好用!但是樣式個(gè)人感覺丑的狠,百度一下也沒能找到解決方式,也許是自己的搜索方式不對(duì),于是自己就研究了研究,這里可以使用兩種方法進(jìn)行修改
方法一:
使用PHPCMS中的get方法進(jìn)行獲取數(shù)據(jù)
//拼接評(píng)論表的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"> <h5 class="media-heading">{$val[username]}</h5> <span style="font-size:10px;">{$val[content]}</span> </div> </div> </li> {/loop} {/pc}
方法二:
除了使用get方法進(jìn)行獲取數(shù)據(jù)之外還有一種最簡(jiǎn)單的方式,找到 /phpcms/templates/default/comment/show_list.html 找到如下代碼,進(jìn)行樣式的修改即可
{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}')">回復(fù)</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中的評(píng)論樣式修改方法,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
- 使用PHPCMS搭建wap手機(jī)網(wǎng)站
- phpcms模塊開發(fā)之swfupload的使用介紹
- linux服務(wù)器下PHPCMS v9 安全配置詳解
- php筆記之:初探PHPcms模塊開發(fā)介紹
- PHPCMS的使用小結(jié)
- CodeIgniter使用phpcms模板引擎
- phpcms的分類名稱和類別名稱的調(diào)用
- phpcms手機(jī)內(nèi)容頁面添加上一篇和下一篇
- PHPCMS手機(jī)站偽靜態(tài)設(shè)置詳細(xì)教程
- PHPCMS忘記后臺(tái)密碼的解決辦法
- 解決phpcms更換javascript的幻燈片代碼調(diào)用圖片問題
- PHPCMS V9 添加二級(jí)導(dǎo)航的思路詳解
- 如何給phpcms v9增加類似于phpcms 2008中的關(guān)鍵詞表
- PHPCMS遭遇會(huì)員投稿審核無效的解決方法
- Ajax實(shí)現(xiàn)phpcms 點(diǎn)贊功能實(shí)例代碼
- PHPCMS2008廣告模板SQL注入漏洞修復(fù)
- phpcms配置列表頁以及獲得文章發(fā)布時(shí)間
- phpcms v9禁止提交信息到官網(wǎng)方法詳解
相關(guān)文章
在laravel中實(shí)現(xiàn)ORM模型使用第二個(gè)數(shù)據(jù)庫設(shè)置
今天小編就為大家分享一篇在laravel中實(shí)現(xiàn)ORM模型使用第二個(gè)數(shù)據(jù)庫設(shè)置,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2019-10-10利用ajax和PHP實(shí)現(xiàn)簡(jiǎn)單的流程管理
這篇文章主要為大家詳細(xì)介紹了ajax和PHP實(shí)現(xiàn)簡(jiǎn)單的流程管理,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-03-03在WordPress中使用wp-cron插件來設(shè)置定時(shí)任務(wù)
這篇文章主要介紹了在WordPress中使用wp-cron插件來設(shè)置定時(shí)任務(wù)的方法,文中給出了幾個(gè)常用的相關(guān)PHP函數(shù)和參數(shù),需要的朋友可以參考下2015-12-12