EDIT – this article was written in reference to Cloudy version 0.4. See the end of this article for a copy of my customised source code along with installation instructions.
I’ve hacked the source a little bit to make each word in the Cloudy cloud clickable. Clicking a word searches my blog for that word. Here’s what I did: (I hope these blockquotes will show HTML code!) I scrolled to the bottom of the source just after the 4 lines starting with this code:
if ($val >= $this->range………….
I then found the folliowing line of code:
$this->my_cloudy_text .= “<span style=\”font-size: $font_size%;\”><a title=\”I have used ‘$key’ $val times!\” name=\”$key\” class=\”cloudy\”>$key</a></span> “
At this point in the code the string variable “$key” contains one word in the cloud. I performed a search on my blog which showed the format of a URL crafted to perform a search. It’s basically http://blog.yourdomain.com/index.php?s=searchterm
So I just added an HREF option to the A tag. The following code is crafted for my site, so just replace my domain name with yours:
$this->my_cloudy_text .= “<span style=\”font-size: $font_size%;\”> < a href=\”http://blog.demodulated.com/index.php?s=$key\” title=\”I have used ‘$key’ $val times!\” name=\”$key\” class=\”cloudy\”>$key</a></span> “;
Enjoy, and many many thanks to Chris Compton for this excellent and superbly documented lump of code!
Note – don’t try to copy and paste this code because WordPress converts double quotes to fancy quotes. Pasting this code won’t work. Just insert the bolded href command above into the appropriate place.
EDIT – You may download an exact copy of my customised source code here.Â Right-click this link and save the file as “cloudy.php”, then upload it to /blogdir/wp-content/plugins/, and activate it.Â Look near the bottom of the file for the code I edited – I left a comment just above it so it should be perfectly clear what you need to do.
Note that this is an unofficial, unsupported hack of the source code.Â In general you should not trust source code coming from anyone but the original developer, and if you’re smart you’ll even be suspicious of that.Â Even WordPress’s official source code has been infiltrated in the recent past.Â The onus is on YOU to read over this source code before implementing it.
NEITHER MYSELF NOR THE ORIGINAL AUTHOR ARE ACCOUNTABLE FOR DAMAGE CAUSED BY THIS SOURCE CODE!!!