|
Location: Web development - PHP License: The Intelliproject Open License (IPOL) Another way to calculate tag cloud sizesPosted by Panos KyriakakisSome time ago i found somewhere i cant remember this tag cloud sizes calculation which gives better results |
Skill: IntermediatePosted: 21/11/2008Views: 748Rating: 3.00 /5Popularity: 1.43 |
| Sign Up to vote for this article |
Some time ago I wanted to implement a tag cloud in my current project i searched the web for a better calculation for tag sizes and i found this one. It is a bit addopted to my case.
The $tags array holds any info needed for each tag and a field named 'counter' which is the number of occurences of the tag. That one is the mandatory and actualy used by this code. The function adds one more named 'size' which is the size in percentage. Yes the css uses % in font size.
The comments in the code makes it clear, just simple calculations after all.
Nice calculation. Just wanted to share it. I will try to locate the original source again.
This article, along with any associated source code and files, is licensed under The Intelliproject Open License (IPOL)
| Panos Kyriakakis
| Panos started coding on a Sinclair ZX-Spectrum +2 in 1987 or 1988, move to pcs and GW-Basic then to CA-Clipper, fortran, pascal, c, VB4, VB5, VB6, asp and landed to PHP about 5 years ago. Those 20 years many small and big project were build. These day he tries to polish and give to public an accounting service for small bussines in Greece. It is in beta version and sales force is setting up. Published a couple open source libs and try to maintain my site. Location: |
Sign up to post message on the article message board!