婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > dedecms 評論蓋樓實現樓層數,類似騰訊、網易的評

dedecms 評論蓋樓實現樓層數,類似騰訊、網易的評

POST TIME:2019-09-30 17:02

修改步驟
一、5.5版本(5.6版本請往下看)
1、修改/plus/feedback_ajax.php文件的第131行(如果你沒改過)
下面是修改之前的代碼:
$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}');//查找評論中樓層數
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);
}
$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技術有限,有更好的實現方法請指正,經以上修改失敗請回帖,修改成功后記得頂個貼^_^
二、5.6版本
1、修改/templets/plus/feedback_quote.htm文件的第94行(如果你沒改過)
下面是修改之前的代碼:

代碼如下:
<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}'.$row['username'].' 的原帖:{/title}{content}'.$row['msg'].'{/content}{/quote}';
floors = substr_count($row['msg'], '{title}');//計算評論中樓層數
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;
}




收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 平乐县| 泸定县| 马关县| 宁陕县| 永年县| 山阳县| 江安县| 丰县| 鹤岗市| 锡林浩特市| 伊金霍洛旗| 东海县| 浏阳市| 乌兰县| 杨浦区| 托里县| 上思县| 临沭县| 邵阳市| 鞍山市| 绍兴市| 南涧| 和政县| 唐河县| 清丰县| 英吉沙县| 大竹县| 晋城| 桐城市| 江川县| 石家庄市| 社旗县| 淮南市| 湘乡市| 新乡市| 明水县| 铁岭市| 定日县| 永城市| 多伦县| 长宁县|