total > $max) { $max = $tag->total; } } $cloud = ''; foreach ($vars['tagcloud'] as $tag) { if ($cloud != '') { $cloud .= ', '; } // protecting against division by zero warnings $size = round((log($tag->total) / log($max + .0001)) * 100) + 30; if ($size < 100) { $size = 100; } $url = elgg_get_site_url()."search?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype"; $url = elgg_format_url($url); $cloud .= "tag)." ($tag->total)\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . ""; } $cloud .= elgg_view('tagcloud/extend'); echo "
$cloud
"; }