Adding a Tag Cloud to a website

I have use this as a test tool for one of my college technical event website.
source
http://www.lotsofcode.com/php/tutorials/tag-cloud
Its described clearly with a demo & a tutorial on how to add the tag cloud using PHP to a website. Adding hyperlinks to the tags ( tag cloud with links) is also easily customizable. It might be a bit confusing on the source site and here is how one can crack it.
After downloading the zip file from the source site,
Upload the css and worldcloud.class files on to your server. Before uploading example-with-links.php you might want to customize it according to your site needs.
Here is how one can proceed!
The array of tags can be edited and the display would be w.r.t “more the repetition of the word in the array the better its density of that tag on the site”
Open example-with-links.php and select
<?php
require ‘classes/wordcloud.class.php’;
?>
and add the above lines before <html> tag in the site you want to insert the tag cloud.
then similarly add the <head> ….. </head> and <body> …</body> codes from the example-with-links.php to your site source.
find > echo ‘ <a href=”path/to/tags/’.
replace it with your desired path.
for instance in my case <a href=”/events/’.
Note : The hyperlink path should be same as the tag name. And remember to save the file as .php and not .html.
I hope its clear!
October 18, 2007 at 9:48 pm
I am glad you found the script useful. If you have any ideas on how to improve the script please run them by me … Thanks.