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') . ""; } if ($context != 'tags') { $cloud .= '

'; $cloud .= elgg_view_icon('tag'); $cloud .= elgg_view('output/url', array( 'href' => 'tags', 'text' => elgg_echo('tagcloud:allsitetags'), )); $cloud .= '

'; } $cloud .= elgg_view('tagcloud/extend'); if ($context != 'tags') { echo elgg_view_module('aside', elgg_echo('tagcloud'), $cloud, array('class' => 'elgg-tagcloud')); } else { echo "
$cloud
"; } }