[Paid accounts] Inserting a tag cloud in the sidebar or on the tag page

May 25, 2006 18:34


The code in this tutorial will create tag clouds, which can be inserted into a box in the sidebar, or into the tag page. A tag cloud is an alphabetised list of tags where the most commonly used tags are depicted in a larger font or otherwise emphasized.

To do that, the tags have to be divided into different categories according to their number of ( Read more... )

!tutorial, sidebar, tags

Leave a comment

xheather June 2 2006, 08:18:32 UTC
when I do this, along with the tutorial that moves my tags below my metadata, it totally kills my layout in IE. Any clue as to why this happens? Thanks in advance...

Reply

afuna June 2 2006, 19:19:07 UTC
The division by zero? It happens in all browsers, since it has to do with S2 :)

Please make your theme layer viewable, and give us the link.

Reply

snakeling June 2 2006, 19:58:57 UTC
I just realised that if someone has the same number of uses for all tags, $max_use_count - $min_use_count will be 0 and give an error message. But it's easy to debug. Once $max_use_count and $min_use_count have been determined, you only have to add something like:
if ($min_use_count == $max_use_count)
{
$max_use_count = $max_use_count + 1;
}And how much do you want to bet that the OP's problem is that she's logged in in Firefox and so have no problems because she has a lot of tags, but she isn't logged in in IE, and thus sees only her unique tag with one use?

I'm going to add the line right now :)

Reply

afuna June 3 2006, 11:49:35 UTC
Nice catch :) Perhaps add a note at the bottom of the post stating that it has been updated for the sake of those who used the code earlier?

And hee! So it is the browser's fault, and yet it's not :D

Reply

snakeling June 4 2006, 22:30:01 UTC
Done :)

Reply


Leave a comment

Up