This plugin allows the creation of tag clouds based on GIF images.
Each word in the taglist is converted to an image. The images may vary in size, orientation and color. The images are then positioned in a condense way, resulting in Wordle-like tag-clouds.
To use the image-style tag-clouds set the format parameter of
image. For convenience a shortcode is provided
[imagecloud] that will insert the tag-cloud with the image format option set anywhere within a post or page. The imagecloud shortcode will accept all arguments that
wp_tag_cloud accepts plus the few additional ones described below.
To control the image creation a few extra options are provided that may be provided with
wp_tag_cloud or the
[imagecloud] shortcode. These are:
- fgcolor: The color of the texts in the images. Must be in the format “#AABBCC”.
- fgcolor2: A second foreground color. When this is set, the tag text color will be a color between fgcolor and fgcolor2, depending on the tag count (occurance). Must be in the format “#AABBCC”.
- bgcolor: The background color of the texts. Must be in the format “#AABBCC”.
- transparent: set to true if you wish to make the image transparent. Do not forget to set the bgcolor also to prevent strange text-edge colors as the texts will be anti-aliased.
- margin: set to the amount of pixels added around each tag.
- font: set to the file location or url of the TrueType font (TTF) file to be used to create the tags.
- percentup: percentage of words that is to be rotated 90 degrees.
Installation of ImageCloud is straightforward:
- Extract the zip-file in your plugins directory (typically ‘/wp-content/plugins/’). Or through the automatic install functions of WordPress.
- Activate the plugin through the ‘Plugins’ menu in WordPress
After installation make sure you adapt your theme to use the image format as argument to
wp_tag_cloud. Or use the [imagecloud] shortcode anywhere in a page or post.
Make sure you have proper tags on your post. One way to add these is by deriving them from the texts in your blog, for example by using the Text2Tag.
- Can you provide me with an example?
Add the following text to a page to add the image-based tag-cloud. This cloud will have tags that have different shades of gray depending on their occurance.
[imagecloud fgcolor=”CCCCCC” fgcolor2=”000000″ bgcolor=”FFFFFF”]
- I don’t like the cloud created. Can I recreate it?
The current version has no specific option-page to do so. Clouds are regenerated when:
- the corresponding taxonomy (tags) are changed.
- The cache is empty. You can clear the cache by removing all files from the cache directory (inside the imagecloud directory in your plugins directory).
- What is the algorithm you use?
Regrettably, the Wordle algorithms are not made public. Therefore I had to create one myself. The algorithm used is pretty straightforward. Images are rotated based by chance based on the percentup variable. All images are then positioned one by one around the center of the cloud. There is some randomness in the positioning as I’ve learned that this will actually improve the layout of the cloud.
This algorithm is very simple and improvements can definitly be made! Any suggestion is welcome…
Contributors & Developers
“ImageCloud” is open source software. The following people have contributed to this plugin.Contributors
- fixed another issue with query encoding. Spaces are better supported now.
- Increases PHP timeout to 5 minutes (if necessary) to give the plugin more time for layout and image generation.
- fixed query encoding bug. Special chars in words are now better supported.
- Initial version