aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/blog/views/default/blog/sidebar_menu.php3
-rw-r--r--mod/tagcloud/tagcloud.php2
-rw-r--r--mod/tagcloud/views/default/tagcloud/css.php10
-rw-r--r--views/default/css.php3
-rw-r--r--views/default/output/tagcloud.php9
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 "<h3>".elgg_echo('tagcloud')."</h3><div class='tagcloud sidebar'>{$tags}</div><a href=\"".$CONFIG->wwwroot."mod/tagcloud/tagcloud.php\">".elgg_echo('tagcloud:allsitetags')."</a>";
+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 = "<div class='tagcloud site'>".display_tagcloud(0, 100, 'tags')."</div>";
+$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(<?php echo $vars['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 .= "<h3>".elgg_echo('tagcloud')."</h3><div class='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 .= "<a href=\"{$url}\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
+
+ $cloud .= "</div>";
echo $cloud;
} \ No newline at end of file