Tumblr Tag Cloud

Since tagging is such an integral part of tumbling, I went looking for a good tag cloud script.

I found an okay one on Mashable, but I wanted to do one better. If you look to the right you can see the fruits of my labor ===>

I haven’t optimized this much and like Tumblr, sometimes the cloud is slow to load, but if you want a nice clump of tags, sized by use, you can give my script a go by pasting the code below into the Info section of Tumblr’s customization page for your site:

<script type=”text/javascript” src=”http://theclearingband.com/tumblr/tagcloud.js”></script>
<div id=”tagcloud” style=”width: 220px;”>Loading cloud…</div>

The “width:220px” may need to be adjusted depending on your site layout.

Also, a quick note on tags, it will only present a tag if it’s been used at least twice. I do this because it cuts down on silly, one-time-only tags we all started using because it was funny on Twitter.

Update - 6/16

The above script can run for a long time if you have a lot of posts on your tumblr. When I wrote it, I had few posts, my blog is low volume so this wasn’t a problem. As time passes and posts pile up, the script is running too slow for my tastes so I made a modified version:

<script type=”text/javascript” src=”http://theclearingband.com/tumblr/tagcloud2.js”></script>
<div id=”tagcloud” style=”width: 220px;”>Loading cloud…</div>

This script grabs tags from the last 400 posts, not the whole shebang but healthy clump of cloud nonetheless.

Update - 7/31

Hey visitors, consider throwing a follow-bone my way. It’s true, my posts are *very* random, but I post infrequently so I’m Dashboard-Safe! :)

Tuesday, August 10, 2010 — 36 notes
  1. petesimon posted this