<?php
/*
Plugin Name: Henna's cool cats/tags
Plugin URI: http://hennadatta.com/blog/archives/2005/04/30/hennas-cool-catstags-for-wp-my-first-ever-wordpress-plugin/
Description: Displays the categories/tags in a cool linked up list with link icons to Technorati, del.icio.us and Flickr.
Version: 1
Author: Henna Datta
Author URI: http://hennadatta.com/
Original code/icons by: Mark Jaquith, Keith McDuffee and Jonathan Deutsch
*/

function hennaz_taglist() {
    $categories = get_the_category();
   
      if (empty($categories)) {
        _e('Untagged');
        return;
    }
$tlink = "http://www.technorati.com/tag/";
$timg = get_settings('siteurl') . '/wp-content/plugins/technosquare.gif';
$t_alt = "Technorati Tag";
$dlink = "http://del.icio.us/tag/";
$dimg = get_settings('siteurl') . '/wp-content/plugins/deliciousIconSaturated.gif';
$d_alt = "del.icio.us tag";
$flink = "http://www.flickr.com/photos/tags/";
$fimg = get_settings('siteurl') . '/wp-content/plugins/hennaz_flickr_icon.gif';
$f_alt = "Flickr tag";
/* $dllink = "http://de.lirio.us/rubric/entries/tags/";
$dlimg = get_settings('siteurl') . '/wp-content/plugins/deliciousIconSaturated.gif';
$dl_alt = "de.lirio.us tag"; */
    $thelist = '';
        $i = 1;
            foreach ($categories as $category) {
            $category->cat_name = $category->cat_name;
                          $thelist .= '<li><a href="' . get_category_link($category->category_id) . '" title="' . sprintf(__("View all posts tagged as %s"), $category->cat_name) . '">'.$category->cat_name.'</a>&nbsp;<a href="' . $tlink .$category->cat_name .'" rel="tag" title="' . sprintf(__("View tag:%s at Technorati"), $category->cat_name) . '">'.'<img src="' . $timg . '" border="0" alt="' . $t_alt . '"/>'.'</a>&nbsp;<a href="' . $dlink .$category->cat_name .'" rel="tag" title="' . sprintf(__("View tag:%s at del.icio.us"), $category->cat_name) . '">'.'<img src="' . $dimg . '" border="0" alt="' . $d_alt . '"/>'.'</a>&nbsp;<a href="' . $flink .$category->cat_name .'" rel="tag" title="' . sprintf(__("View tag:%s at Flickr"), $category->cat_name) . '">'.'<img src="' . $fimg . '" border="0" alt="' . $f_alt . '"/>'.'</a></li>';
                     ++$i;
        }
    echo apply_filters('the_category', $thelist);
}
?>
