dedecms 評(píng)論蓋樓實(shí)現(xiàn)樓層數(shù),類(lèi)似騰訊、網(wǎng)易的評(píng)
導(dǎo)讀:DEDE技術(shù)DEDE技術(shù)DEDE評(píng)論蓋樓實(shí)現(xiàn)樓層數(shù),類(lèi)似騰訊、網(wǎng)易的評(píng)論(5.5/5.6版),喜歡的朋友可以參考下。dede免費(fèi)模板織夢(mèng)模板免費(fèi)下裁。
DEDE評(píng)論效果: 修改后的效果:
修改步驟 一、5.5版本(5.6版本請(qǐng)往下看) 1、修改/plus/feedback_ajax.php文件的第131行(如果你沒(méi)改過(guò)) 下面是修改之前的代碼: $qmsg = '{quote}{title}'.$row['username'].' 的原帖:{/title}{content}'.$row['msg'].'{/content}{/quote}'; 下面是修改后的代碼: 代碼如下: //$qmsg = '{quote}{title}'.$row['username'].' 的原帖:{/title}{content}'.$row['msg'].'{/content}{/quote}'; $floors = substr_count($row['msg'], '{title}');//查找評(píng)論中樓層數(shù) if ($floors > 0) { $floors += 1; $floor_html = '{floor}' . $floors . '{/floor}'; } else { $floor_html = '{floor}1{/floor}'; } $quotetitle = '{title}引用' . $row['username'] . '的評(píng)論'. $floor_html .'{/title}'; $免費(fèi)織夢(mèng)模板oldquote = '';//以前的引用 $quotemsg = $row['msg']; if ($floors > 0) { $oldquoteend = strrpos($quotemsg, '{/quote}') + 8; $oldquote = substr($quotemsg, 0, $oldquoteend); $quotemsg = substr($quotemsg, $oldquoteend); } $qmsg = '{quote}' . $oldquote . $quotetitle . '{content}' . $quotemsg . '{/content}{/quote}'; 2、在/include/channelunit.func.php文件的516行,就是在return $quote;代碼前插入兩行代碼 下面是修改之前的代碼: return $quote; 下面是修改之后的代碼: 代碼如下: $quote = str_replace('{floor}','<span class="floor">',$quote); $quote = str_replace('{/floor}','</span>',$quote); return $quote; 3、在/templets/style/dedecms.css文件末尾加入下面的CSS代碼(任意位置均可) 代碼如下: .floor { float:right; padding-right:10px; } 4、PHP技術(shù)有限,有更好的實(shí)現(xiàn)方法請(qǐng)指正,經(jīng)以上修改失敗請(qǐng)回帖,修改成功后記得頂個(gè)貼^_^ 二、5.6版本 1、修改/templets/plus/feedback_quote.htm文件的第94行(如果你沒(méi)改過(guò)) 下面是修改之前的代碼: 代碼如下: <input type="hidden" name="quotemsg" value="{quote}<?php echo '{title}'.$row['username'].' 的原帖:{/title}{content}'.$row['msg'].'{/content}'; ?>{/quote}" /> 下面是修改后的代碼: 代碼如下: <input type="hidden" name="quotemsg" value="<?php //echo '{quote}{title}dede織夢(mèng)模板'.$row['username'].' 的原帖:{/title}{content}'.$row['msg'].'{/content}{/quote}'; floors = substr_count($row['msg'], '{title}');//計(jì)算評(píng)論中樓層數(shù) if ($floors > 0) { $floors += 1; $floor_html = '{floor}' . $floors . '{/floor}'; } else { $floor_html = '{floor}1{/floor}'; } $quotetitle = '{title}' . $row['username'] . '的原帖'. $floor_html .'{/title}'; $oldquote = '';//以前的引用 $quotemsg = $row['msg']; if ($floors > 0) { $oldquoteend = strrpos($quotemsg, '{/quote}') + 8; $oldquote = substr($quotemsg, 0, $oldquoteend); $quotemsg = substr($quotemsg, $oldquoteend); } echo '{quote}' . $oldquote . $quotetitle . '{content}' . $quotemsg . '{/content}{/quote}'; ?>" /> 2、在/include/channelunit.func.php文件的519行,就是在return $quote;代碼前插入兩行代碼 下面是修改之前的代碼: return $quote; 下面是修改之后的代碼: 代碼如下: $quote = str_replace('{floor}','<span class="floor">',$quote); $quote = str_replace('{/floor}','</span>',$quote); return $quote; 3、修改/templets/default/style/page.css文件的第1169行 下面是修改之前的代碼: 代碼如下: .decmt-content .decmt-box,.dede_comment .decmt-box .decmt-box { background:#FFE; border:1px solid #CCC; margin:6px auto; } 下面是修改之后的代碼: 代碼如下: /* .decmt-content .decmt-box,.dede_comment */.decmt-box .decmt-box { background:#FFE; border:1px solid #CCC; margin:6px auto; } .floor{ float:right; padding-right:10px; } .decmt-title{ margin-bottom:5px; }
關(guān)鍵詞標(biāo)簽: DEDE技術(shù) 騰訊 網(wǎng)易
聲明: 本文由我的SEOUC技術(shù)文章主頁(yè)發(fā)布于:2023-07-21 ,文章dedecms 評(píng)論蓋樓實(shí)現(xiàn)樓層數(shù),類(lèi)似騰訊、網(wǎng)易的評(píng)主要講述騰訊,網(wǎng)易,DEDE技術(shù)網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請(qǐng)保留鏈接: http://www.bifwcx.com/article/web_33115.html
為你推薦與dedecms 評(píng)論蓋樓實(shí)現(xiàn)樓層數(shù),類(lèi)似騰訊、網(wǎng)易的評(píng)相關(guān)的文章
-
dedecms首頁(yè)中文章列表無(wú)刷新頂、踩的實(shí)現(xiàn)
(120)人喜歡 2023-07-21 -
織夢(mèng)網(wǎng)站地圖Sitemap+百度Ping推送功能實(shí)現(xiàn)
(160)人喜歡 2023-07-21 -
DeDecms后臺(tái)設(shè)置及網(wǎng)站地圖seo優(yōu)化,織夢(mèng)技
(50)人喜歡 2023-07-21 -
DedeCMS模板制作自定義表單時(shí)添加驗(yàn)證碼的
(166)人喜歡 2023-07-21 -
織夢(mèng)標(biāo)簽:sonchannel 子欄目調(diào)用,織夢(mèng)教程
(103)人喜歡 2023-07-21 -
在織夢(mèng)cms中使用繁體轉(zhuǎn)簡(jiǎn)體的函數(shù)BIG5To
(186)人喜歡 2023-07-21