In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you about the dede tag cloud to generate tag tags, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
How does dede tag cloud generate tag tags?
How dede tag Cloud generates tag tags of different colors and sizes
Friends who do tag tags on the website must know that what I want to explain in this article is the use of dede tag cloud and how to generate tag tags of different colors and sizes. Interested friends can refer to it.
Recommended study: dream weaving cms
1. Select the template of the page you want to add, and generally add the following code to the home page index.htm
The code is as follows:
Tags tag cloud {dede:tag row='45' getall='1' sort='hot'} [field:tag /] {/ dede:tag} * or (test passed) * popular tag {dede:tag row='35' sort='month'} [field:tag /] {/ dede:tag}
2. Add the following function to / include/common.func.php.
The code is as follows:
Function getTagStyle () {$minFontSize=8; / / minimum font size, you can change $maxFontSize=18; / / maximum font size as needed, and you can change return 'font-size:'. ($minFontSize+lcg_value () * (abs ($maxFontSize-$minFontSize).' px;color:#'.dechex (rand (0255)) .dechex (rand (0196)) .dechex (rand (0255));}
The function is used to output random styles, including font-size and color.
If you want to specify that only a few font sizes are displayed instead of being completely random, change the above function code to:
The code is as follows:
Function getTagStyle () {$sizearray = array); / / Custom font size, you can modify return 'font-size:'.$ sizearray as needed.' pt;color:#'.dechex (rand (0255)) .dechex (rand (0196)) .dechex (rand (0255));}
3. Generate the following to see the effect!
Finally, let's take a look at the effect picture: effect picture.
The above is all the contents of the method of generating tag tags by dede tag cloud. 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.