From a540eee93088628adeb3127227f401592ce4403c Mon Sep 17 00:00:00 2001 From: pete Date: Fri, 14 May 2010 07:51:41 +0000 Subject: Updated core tagcloud view markup/css. git-svn-id: http://code.elgg.org/elgg/trunk@6043 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/blog/sidebar_menu.php | 3 +-- mod/tagcloud/tagcloud.php | 2 +- mod/tagcloud/views/default/tagcloud/css.php | 10 ---------- views/default/css.php | 3 +++ views/default/output/tagcloud.php | 9 +++++++-- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/mod/blog/views/default/blog/sidebar_menu.php b/mod/blog/views/default/blog/sidebar_menu.php index 5d051640b..ecd232c52 100644 --- a/mod/blog/views/default/blog/sidebar_menu.php +++ b/mod/blog/views/default/blog/sidebar_menu.php @@ -63,6 +63,5 @@ if ($page_owner) { } // tag-cloud display -$tags = display_tagcloud(0, 50, 'tags'); -echo "

".elgg_echo('tagcloud')."

wwwroot."mod/tagcloud/tagcloud.php\">".elgg_echo('tagcloud:allsitetags').""; +echo display_tagcloud(0, 50, 'tags'); ?> \ No newline at end of file diff --git a/mod/tagcloud/tagcloud.php b/mod/tagcloud/tagcloud.php index 564e839e3..c40cc095b 100644 --- a/mod/tagcloud/tagcloud.php +++ b/mod/tagcloud/tagcloud.php @@ -7,7 +7,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); $title = elgg_view_title(elgg_echo('tagcloud:site:title')); -$tags = "
".display_tagcloud(0, 100, 'tags')."
"; +$tags = display_tagcloud(0, 100, 'tags'); //select the correct canvas area $body = elgg_view_layout("one_column_with_sidebar", $title . $tags, $sidebar); diff --git a/mod/tagcloud/views/default/tagcloud/css.php b/mod/tagcloud/views/default/tagcloud/css.php index 00e972c8a..37f887075 100644 --- a/mod/tagcloud/views/default/tagcloud/css.php +++ b/mod/tagcloud/views/default/tagcloud/css.php @@ -4,13 +4,3 @@ */ ?> -.tagcloud { - text-align:justify; - font-size:1.0em; /* default font-size for single page tagcloud */ -} -.tagcloud.site a { - margin-right:0.2em; -} -.tagcloud.sidebar { - font-size:0.7em; /* reset default size for sidebar tagclouds */ -} \ No newline at end of file diff --git a/views/default/css.php b/views/default/css.php index dd1e1449d..dba14194a 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -238,6 +238,9 @@ h2 { padding:1px 0 0 16px; font-size: 90%; } +.tagcloud { + text-align:justify; +} .ajax_loader { background-color: white; background-image: url(_graphics/ajax_loader_bw.gif); diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index e8fffa705..2296c01fe 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -33,6 +33,9 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { $counter = 0; $cloud = ""; $max = 0; + + $cloud .= "

".elgg_echo('tagcloud')."

"; + foreach($vars['tagcloud'] as $tag) { if ($tag->total > $max) { $max = $tag->total; @@ -44,11 +47,13 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { } // protecting against division by zero warnings $size = round((log($tag->total) / log($max + .0001)) * 100) + 30; - if ($size < 60) { - $size = 60; + if ($size < 100) { + $size = 100; } $url = $vars['url'] . "pg/search/?q=". urlencode($tag->tag) . "&search_type=tags{$type}{$subtype}"; $cloud .= "tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . ""; } + + $cloud .= "
"; echo $cloud; } \ No newline at end of file -- cgit v1.2.3