In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the method of DedeCMS keyword replacement, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
How to replace the DedeCMS keyword? A perfect solution to the problem of DedeCMS keyword replacement
Problem description
There is an error in the keyword replacement of dream-weaving content: if you have two keywords, such as "CIT" (www.cit.cn/tags/cit.html) and "CIT Information Network" (www.cit.cn), but when the article is replaced, we find that there will be a problem, and the link becomes:
CIT information network
Solution
This kind of nesting error is not good for SEO or user experience. Here we have a solution, that is, replace the shorter one first, and then match the longer one, so that the system will first replace the keyword CIT instead of the CIT information network.
Modify the code
In fact, it is very simple to modify the code, we go directly to the include/arc.archives.class.php file, in 1226 lines of code, that is:
/ / for highlighting only, the maximum number of function _ highlight ($string, $words, $result, $pre) {global $cfg_replace_num; $string = str_replace ('', $string) may not be reached after multiple replacements.
Add a piece of code later so that it becomes
/ / for highlighting purposes, the maximum number of function _ highlight ($string, $words, $result, $pre) {global $cfg_replace_num; $string = str_replace ('",'', $string); uasort ($words,create_function ('$a, $baked recovery return strlen ($a) > strlen ($b);')
Summary
DedeCMS is indeed a sharp weapon for SEO enthusiasts, and how to use it well still needs to be pondered deeply.
The above is all the content of the method of DedeCMS keyword replacement, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.