Someone on the Movable Type ProNet list asked how to import their del.icio.us tag cloud into thier blog a couple days ago, and since I'm stuck here on the couch, I'd see if I could figure out an easy way to do it... and you know what, there is!
All you need to install is the very cool MTGetXML plugin, and create yourself a new index template. The important bit to add is this:
<ul class="tags">
<MTGetXML keeproot="0"
location="http://USERNAME:PASSWORD@del.icio.us/api/tags/get?"
cache="60">
<MTGetXMLElement name="tag">
<li style="font-size:<MTGetXMLValue name="count">em">
<a href="http://del.icio.us/USERNAME/<MTGetXMLValue name="tag" encode_url="1">" title="<MTGetXMLValue name="count"> links">
<MTGetXMLValue name="tag">
</a>
</li>
</MTGetXMLElement>
</ul>
Here's what my CSS looks like to get my tag cloud to look the way it does:
ul.tags {
list-style:none;
text-align:justify;
}
ul.tags li {
display:inline;
padding:0 .3em;
}
And in case you missed the link earlier, here's what it looks like. Enjoy!
Update: And because I couldn't sleep, I did the same thing with my categories. It was a little more involved (because I have some categories with more than 100 entries in them, I didn't map them right to font sizes, so I had to do MATH!). I kinda like it. It takes some PHP (for the math bits), but it's almost as easy. I'll post my template for it later.
| Your Name: | |
| Your E-mail: | |
| Your Site: | |
| Your Comment: | |
You can use Textile formatting in your comments (but no HTML). Here's a quick cheatsheet:
This is the personal site and weblog of Kevin Lawver and Jen Lawver. The views expressed on this site are our's and not those of our family, friends or employers. license
Powered by: Movable Type
Hosted by DreamHost
jyoseph said: