Now my problem is,my table cannot handle to many keywords it change my style of my page and make it horrible for eye!
How can i fix showing example just 50 last keyword and "bold" most searched keywords using as Top Tags!?
ill publish below code that belon to "tags"
at index.php:
Code: Select all
<tr><td>
<div id="wrapper" class="wrapper">
Keywords:<br />
<?php print tag_cloud(); ?>
</div>
</td>
</tr>Code: Select all
function tag_cloud() {
$min_size = 15;
$max_size = 40;
$tags = tag_info();
$minimum_count = min(array_values($tags));
$maximum_count = max(array_values($tags));
$spread = $maximum_count - $minimum_count;
if($spread == 0) {
$spread = 1;
}
$cloud_html = '';
$cloud_tags = array();
$step = ($max_size - $min_size)/($spread);
foreach ($tags as $tag => $count) {
$size = $min_size + ($count - $minimum_count)
* $step;
// $size = ($max_size + $min_size)/$spread;
$cloud_tags[] = '<a style="font-size: '. floor($size) . 'px'
. '" class="tag_cloud" href="'. $CFG['domain'] . 'index.php?search=' . $tag . '&x=0&y=0'
. '" title="This tag \'' . $tag . '\' is searched ' . $count . ' times">'
. htmlspecialchars(stripslashes($tag)) . '</a>';
}
$cloud_html = join("\n", $cloud_tags) . "\n";
return $cloud_html;
}
Code: Select all
.tag_cloud
{padding: 3px; text-decoration: none;
font-family: verdana; }
.tag_cloud:link { }
.tag_cloud:hover { font-weight:bold; }
.tag_cloud:active { }
div.wrapper{
position:absolute;
height:200px;
width:400px;http://img30.picoodle.com/img/img30/4/1 ... 4e5d81.jpg