In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method of realizing the number of floors in dedecms. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
How does dedecms realize the number of floors?
DEDE comment effect:
The effect of the modification:
Modify step
I. version 5.5 (version 5.6, please read below)
1. Modify line 131 of / plus/feedback_ajax.php file (if you haven't changed it)
Here is the code before the modification:
$qmsg ='{quote} {title}'. $row ['username']. The original post: {/ title} {content}'. $row ['msg'].' {/ content} {/ quote}'
The following is the modified code:
The code is as follows:
/ / $qmsg ='{quote} {title}'. $row ['username']. The original post: {/ title} {content}'. $row ['msg'].' {/ content} {/ quote}'; $floors = substr_count ($row ['msg'],' {title}'); / / find the number of floors in the comment if ($floors > 0) {$floors + = 1th floor floorboards html ='{floor}'. $floors. '{/ floor}';} else {$floor_html ='{floor} 1 {/ floor}';} $quotetitle ='{title} reference'. $row ['username']. The comments. $floor_html.'{/ title}'; $oldquote =''; / / the previous reference $quotemsg = $row ['msg']; if ($floors > 0) {$oldquoteend = strrpos ($quotemsg,' {/ quote}') + 8 oldquoteend = substr ($quotemsg, 0, $oldquoteend); $quotemsg = substr ($quotemsg, $oldquoteend);} $qmsg ='{quote}'. $oldquote. $quotetitle. '{content}'. $quotemsg. '{/ content} {/ quote}'
2. In line 516 of the / include/channelunit.func.php file, insert two lines of code before the return $quote; code
Here is the code before the modification:
Return $quote
The following is the modified code:
The code is as follows:
$quote = str_replace ('{floor}','', $quote); $quote = str_replace ('{/ floor}','', $quote); return $quote
3. Add the following CSS code at the end of the / templets/style/dedecms.css file (anywhere)
The code is as follows:
.floor {float:right;padding-right:10px;}
4. PHP technology is limited. If there is a better way to implement it, please correct it. If you failed to modify the above, please reply. Remember to post the top ^ _ ^ after the modification is successful.
II. Version 5.6
1. Modify line 94 of the / templets/plus/feedback_quote.htm file (if you haven't changed it)
Here is the code before the modification:
The code is as follows:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.