Design tag cloud
You are looking for a design Web2 tag clouds to spice up your web site such as the one on your left,
here is a script I did adapt to match the needs I had for my web site.
The tag clouds reflect which video tag have been researched during the last 2 days, and show the 50 most popular one.
Color and size changes based on the number of research.
1. Create a mysql database
Create a table (tags) with 3 fields, id, tag and date. You can use the mysql code below to do it :
2. Download the script
Click here to download
Save the file on your server with the file extention .php
Here is a demo of what you'll get with this script.
3. Change the following variables in the file
$mydb_host = "enter the host name";
$mydb_user = "enter the user name";
$mydb_pass = "enter the database password";
$mydb_name = "type here the database name";
Now you should see you tag cloud, but make sure that there are some records in your database. Enjoy!
4. Option settings
You can easily change the following settings in order to adapt the tag cloud to your webpage :
Size of the could - modify the line width: 144px;of the .could css
Color - change the color codes within the CSS section for each size (tag_cloud8:link)
Order of the words i.e the above cloud is sorted by counts. To have that result, just remove the line
ksort($arr);
Number of words change the LIMIT 50 to the number of words you'd like to see
Size of the words change $min_size = 8; and $max_size = 30;Be careful if you increase the size
make sure to create the additional line in the CSS.
Density change line-height:10px; in the CSS, this will modify the height between the lines.