Witam. Znalazłem w sieci skrypt do wyświetlania tgz. Tag Cloud na stronie ale nie bardzo mi chce działać.
<?PHP
function get_tag_data() {
$arr = Array('Actionscript' => 35, 'Adobe' => 22, 'Array' => 44, 'Background' => 43, 'Blur' => 18, 'Canvas' => 33, 'Class' => 15, 'Color Palette' => 11, 'Crop' => 42,
'Delimiter' => 13, 'Depth' => 34, 'Design' => 8, 'Encode' => 12, 'Encryption' => 30,
'Extract' => 28, 'Filters' => 42, 'Flash' => 32, 'Functions' => 19,
'Gaussian Blur' => 44, 'Grafix' => 49, 'Graphics' => 35, 'Hue' => 47, 'Illustrator' => 8,
'Image Ready' => 12, 'Javascript' => 47, 'Jpeg' => 15, 'Keyboard' => 18, 'Level' => 28,
'Liquify' => 30, 'Listener' => 10, 'Logo' => 12, 'Loops' => 22, 'Macromedia' => 26,
'Method' => 28, 'MySQL' => 18, 'Obfuscation' => 13, 'Object' => 39, 'Optimize' => 25,
'PDF' => 37, 'PHP' => 44, 'PSD' => 17, 'Photography' => 28, 'Photoshop' => 46,
'Revert' => 50, 'Saturation' => 35, 'Save as' => 28, 'Scope' => 11, 'Scripting' => 9,
'Security' => 41, 'Sharpen' => 49, 'Switch' => 41, 'Templates' => 11, 'Texture' => 22,
'Tool Palette' => 30, 'Variables' => 50);
return $arr;
}
function get_tag_cloud() {
}
$min_font_size = 12;
$max_font_size = 30;
$tags = get_tag_data();
$spread = $maximum_count - $minimum_count;
if($spread == 0) {
$spread = 1;
}
$cloud_html = '';
foreach ($tags as $tag => $count) {
$size = $min_font_size + ($count - $minimum_count)
* ($max_font_size - $min_font_size) / $spread;
$cloud_tags[] = '<a style="font-size: '. floor($size) . 'px' . '" class="tag_cloud" href="http://www.google.com/search?q=' . $tag
. '" title="'' . $tag . '' returned a count of ' . $count . '">'
}
$cloud_html = join("n", $cloud_tags) . "n"; return $cloud_html;
?>
Czy ktoś wie co jest z nim nie tak?
Ten post edytował allex 24.03.2007, 17:03:53