=== Configurable Tag Cloud (CTC) Widget === Contributors: zarathos Tags: tags, tag cloud, widget Requires at least: 2.3 Tested up to: 2.3 Stable tag: trunk Display a tag cloud customized with your preferences in the sidebar. == Description == = IMPORTANT NOTES!!! = > 1. This widget is for Wordpress 2.3 ONLY! It relies on the new tagging > features of WP 2.3, so if you're still on 2.2, this won't work for you. I > suggest you upgrade as soon as possible. The best new feature in Wordpress 2.3 is the integration of tagging into the core of Wordpress. However, the tag cloud widget that is included leaves a lot to be desired. So, with time on my hands, I decided to whip up my own version of the tag cloud widget that lets you configure the tag cloud with all the customizations (well, almost, see below) the tag cloud template tag allows. You can find the widget home page (and leave comments) [here](http://reciprocity.be/ctc/). == Installation == 1. Upload `tag-cloud.php` to the `/wp-content/plugins/` directory (I like to keep all my widgets in a "widgets" folder under plugins, which works just fine). 2. Activate `Configurable Tag Cloud` through the 'Plugins' menu in Wordpress. 3. Go to the `Widgets` control panel, and drag the `CTC` button into your sidebar list, and configure the options to your liking. If you want to keep the defaults for the widget, just leave everything as-is (see FAQs for caveats). == Changelog == You can always find the most up-to-date information about the widget [here](http://reciprocity.be/ctc/). Version Date Changes -------------------------- 4.0 2008/02/15 Change: Added support for categories in the cloud. You can choose whether or not to show categories in the cloud, and whether to show empty categories. Fix: Not assigning any colors in the widget control panel or the template tag will now make the cloud links use the defined CSS link color. If only one color is supplied, your links will be that color. 3.2 2008/02/12 Fix: Fixed problem with spaces after tags being underlined if using underline style for links in CSS and not using post counts. Thanks to Eduard Roccatello pointing out the fix. 3.1 2008/02/06 Change: Added support for "Array" format. Thanks to Tim Einfeldt for request/testing. 3.0 2007/12/02 Change: Added option to show post count after each tag. Thanks to Dovydas for the request. Change: Ability to use as a regular Wordpress plugin. See below for PHP tag examples. Requested by too many people to mention here. Thank you all! 2.51 2007/10/19 Fix: Fixed bug that prevented tag count options from working. It came down to a bad variable name. Thank you to Paul & Joel for reporting the bug. 2.5 2007/10/16 Change: Added div surrounding tag cloud for styling purposes. Thanks to everyone who suggested it. Fix: Fixed bug that would produce "Divide by zero" errors on display if you didn't input anything for smallest and/or largest font size in config form. Thanks to Ryan for uncovering this whopper. 2.0 2007/10/03 Change: Added code necessary to enable coloring tag links by weight. Change: Stopped using Wordpress-native tag cloud function in favor of internal widget function to generate tag cloud. Change: Removed "Array" format. I'm not sure it would be of any use running in a widget. Change: Added brief help text to the right of each field in the form. 1.0 2007/09/22 Initial release of widget. Relied on WP tag cloud function to generate cloud. Thanks to all who sent bug reports and ideas for improvements. Please send me an email if I forgot to mention you here. == Frequently Asked Questions == = Does the plugin work with categories? = (New in 4.0) YES! After many failed attempts to make this work, I finally figured it out. By default, it doesn't display categories, but you can activate the option via the widget control panel (if using the widget), or using the `showcats` parameter for the template tag. You can also choose whether or not to show empty categories in the cloud. At present, there is no indication (other than the permalink) that a particular link in the cloud is a tag or a category. = Why are my tags black? = (New in 4.0) Because they're set to black in your theme's stylesheet. The function I'm using to generate the colors for the tag gradient used to return #000000 (black) if either (or both) of the color fields in the configuration form were left blank. This has been fixed in 4.0. Now, if you leave both fields blank, you get links in your cloud the same color as all other links in your page or sidebar (depending on how you have your links set up in your stylesheet). If you leave one or the other blank (i.e., you set a minimum color, but not a maximum, or vice versa), you get links of that color. = Will this work without widgets support? = (New in 3.0) YES! The function for the most part uses the same format as the stock Wordpress tag cloud function, with some notable additions. Listed below are the arguments and defaults for the ctc function. The function uses the standard query string format for arguments. ARGUMENT FUNCTION DEFAULT VALUE --------------------------------------------------------------------- smallest=# Smallest font size to use 8 largest=# Largest font size to use 22 unit=pt|em|%|px Unit for font size pt mincolor=#xxxxxx Low color for gradient #000000 maxcolor=#xxxxxx High color for gradient #000000 format=flat|list|array Format for tag cloud flat number=# Number of tags to show 45 orderby=name|count Sort field for tags name order=ASC|DESC Order of cloud ASC showcount=yes|no Show post count after tags no showcats=yes|no Show categories in the cloud no empty=yes|no Show empty categories no = EXAMPLE = This would show a cloud with font size from 10 to 18 pixels, a color gradient of #c0c0c0 to #000000, and post counts after each tag. = Array Example = This would give you the same output as the first example, but output to the page using an array. == Screenshots == 1. Configuration Form 2. Sample Output ("Site Tags" as title, color gradient from #217ece to #003663, font gradient from .875em-1.15em, post counts shown, categories shown, empty categories shown, sorted by name ascending)