From 9bb7b4c8afddc734adfd2717d766d1711cf8127c Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 4 Dec 2010 13:07:09 +0000 Subject: blog sidebar html updates finished - uses modules! git-svn-id: http://code.elgg.org/elgg/trunk@7526 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/tagcloud.php | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'views/default/output/tagcloud.php') diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index d28fbf05f..b0737c6f1 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -31,26 +31,18 @@ if (empty($vars['tagcloud']) && !empty($vars['value'])) { if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { $counter = 0; - $cloud = "
"; $max = 0; - if ($context != 'tags') { - $title = elgg_echo('tagcloud'); - $cloud .= "

$title

"; - } - - $cloud .= '
'; - - foreach($vars['tagcloud'] as $tag) { + foreach ($vars['tagcloud'] as $tag) { if ($tag->total > $max) { $max = $tag->total; } } - $list = ''; - foreach($vars['tagcloud'] as $tag) { - if ($list != '') { - $list .= ', '; + $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; @@ -58,18 +50,26 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { $size = 100; } $url = elgg_get_site_url()."pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype"; - $list .= "tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . ""; + $cloud .= "tag)." ($tag->total)\" style=\"text-decoration:none;\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . ""; } - - $cloud .= "$list
"; - + if ($context != 'tags') { - $cloud .= '

'; - $cloud .= "All site tags"; + $text = elgg_echo('tagcloud:allsitetags'); + $cloud .= '

'; + $cloud .= "$text"; $cloud .= '

'; } $cloud .= elgg_view('tagcloud/extend'); - $cloud .= '
'; - echo $cloud; -} \ No newline at end of file + + if ($context != 'tags') { + $params = array( + 'title' => elgg_echo('tagcloud'), + 'body' => $cloud, + 'body_class' => 'elgg-tagcloud', + ); + echo elgg_view('layout_elements/module', $params); + } else { + echo "
$cloud
"; + } +} -- cgit v1.2.3