Windows Vista Tips: How to Resize a Partition
Windows Vista Tips: How to Resize a Partition
Posted using ShareThis
Windows Vista Tips: Delete Temporary Files
Windows Vista Tips: Delete Temporary Files
Posted using ShareThis
Windows Vista Tips: Disable User Access Control
Windows Vista Tips: Disable User Access Control
Posted using ShareThis
More links on CSS
Posted using ShareThis
How to build your own tag cloud
I was developing a site for one of our client. The client need a tag cloud for the site. Then i started searching for a tag cloud in the net, but can’t find a suitable one for me. So i decided why not build my own tag cloud. Then i started coding a tag cloud for my own.
The main process is done by the code below:
/*
*Author: A.H.M. Rakibul Islam
*Email: rubelonline@yahoo.com
*Build Date: 23-07-2008
*/
$thistag = $_GET['tag']; //Getting the tag
$result = mysql_query(”select * from tags where tag = ‘$thistag’”);
while($row = mysql_fetch_assoc($result))
{
if($row['tag'] == $thistag) //if $thistag matches with existing tag
{
if($row['hit'] < 30) // and is less the 30 hit then update the hit = hit +1, because this hit is eventually be the font size;
{
$updated_hit = $row['hit'] + 1;
mysql_query(”UPDATE `tags` SET `hit` = ‘$updated_hit’ WHERE `tag` =’$thistag’”);
$updated = 1;
}//end of if($row['hit'] < 30)
}//end of if($row['tag'] == $thistag)
}//end of while($row = mysql_fetch_assoc($result))
if(!isset($updated)) //If $updated != 1, that means it is a new tag and it will then need to inserted to the table with it’s respective link
{
$arr = explode(”#”,$_SERVER['REQUEST_URI']); //capturing the current address to create link for the tag
$link = “http://localhost$arr[0]“; //it will create http://localhost/sitename, which creates respective link for the tags
//$link = “http://mysite.com$arr[0]“; //for real webserver
$hit = 10; //Initializing the hit from 10 because it will be also the initial font size of the cloud
mysql_query(”INSERT INTO `tags` ( `id` , `tag` , `link` , `hit` )
VALUES ( ”, ‘$thistag’, ‘$link’, ‘$hit’ );”);
}
And for showing the cloud i wrote the following code:
CSS Box Model and it’s Hacks
1) Box Modle By W3C
http://www.w3.org/TR/css3-box/
http://www.w3.org/TR/REC-CSS2/box.html
2) The Box Model
http://www.ilovejackdaniels.com/css/box-model/
3) Make better Web pages by understanding the CSS box model
http://articles.techrepublic.com.com/5100-10878_11-6105783.html
4) Basic Box Model
http://redmelon.net/tstme/box_model/
5) Box Model Hack
http://tantek.com/CSS/Examples/boxmodelhack.html
6) CSS Positioning: The Box Model
http://www.brainjar.com/css/positioning/
7) Box model tweaking
http://www.quirksmode.org/css/box.html
The IE box model and Doctype modes
http://css.maxdesign.com.au/listamatic/about-boxmodel.htm
9) Extra: DTD Explained
http://www.ilovejackdaniels.com/html/dtds-explained
Leave a Comment
Leave a Comment
Leave a Comment




