Home > CMS Tutorial > DEDECMS > body text

How to add floor number to Dreamweaver review

藏色散人
Release: 2019-11-15 10:38:00
Original
2067 people have browsed it

How to add floor number to Dreamweaver review

怎么给织梦评论加上楼层号?

给织梦评论加上楼层号

网上搜索了下有关织梦评论加上楼层号的办法,大多比较复杂,织梦猫给大家介绍一种最简单有效的办法。

首先我们需要调整织梦评论楼层显示的顺序,织梦默认的顺序最后发布的评论显示在最上面,我们需要改成最先发布的显示在最上面,最后发布的就显示在最下面。

推荐学习:dedecms教程

这个很好改,打开/plus/feedback_ajax.php,将下面这句SQL语句中的DESC去掉或者改成ASC即可。

$querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex 
       FROM `dede_feedback` fb LEFT JOIN `dede_member` mb on mb.mid = fb.mid 
WHERE fb.aid='$aid' AND fb.ischeck='1' ORDER BY fb.id DESC";
Copy after login

然后在下面找到“while($fields = $dsql->GetArray('fb'))”,在这句代码的上面加入“$i=0;”

在while循环里加入“$i++;”,这样每次循环输出楼层时,$i就会自动增加1,如下图所示:

然后在显示楼层的地方(从第303行开始),输入“楼”即可。

The above is the detailed content of How to add floor number to Dreamweaver review. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!