社会专题
靓丽女人 黑白社会 硬件网络 天下军事 教育咨询 星新一代 汽车电子 幽默笑话 农村特色 有书有道 软件技术 玄幻奇幻 办公达人 便民服务 免费资源 代码效果 美文园地 寻医问药 健康保健 时尚酷玩 天文地理 科技科幻 美食天下 游山玩水 历史天空 制作教程
FLASH频道
女生游戏 益智游戏 有声艺术 有声故事 电脑运用 休闲游戏 MTV类 运动游戏
聚划算
商旅游玩 装潢装饰 家电家具 服装服饰 健康保健 二手特色 生活必备 数码产品
映讯频道
喜剧片 国内片 情感片 动作片 战争片 纪录之窗 欧美剧集 明星云集 动漫片 港澳台剧 大陆剧 科幻片 恐怖片 浓缩电影 教育教学 艺术无界 一技之长 邻国热剧
下载中心
音体美合 信息社政 英语外语 科学自然 常用软件 语文数学 手机软件 红绿软件
图片中心
制作美图 生活图片 美女欣赏 实物图片 艺术欣赏 风景欣赏
领券购
热销女装 热血男装 生活必须 电子电器 手机电脑 旅游出行 学习艺术 吃货优选
新闻中心
一语惊人 奇闻趣事 热点专栏 曝光台 消费警示 今日观察 IT业界 消费主张 动态备忘 专利之窗
关闭
当前位置:首页社会专题硬件网络
DEDE评论盖楼像腾讯、网易一样显示(5.5/5.6版)

修改步骤

一、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;

}

二、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;

}

提示:输入修改代码都可运行!
3
酒精度
51
顶一下
相关阅读
内容加载中……