aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/tagcloud.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /views/default/output/tagcloud.php
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/output/tagcloud.php')
-rw-r--r--views/default/output/tagcloud.php98
1 files changed, 49 insertions, 49 deletions
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
index 10da20034..27d49b089 100644
--- a/views/default/output/tagcloud.php
+++ b/views/default/output/tagcloud.php
@@ -1,52 +1,52 @@
-<?php
-
- /**
- * Elgg tagcloud
- * Displays a tagcloud
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg tagcloud
+ * Displays a tagcloud
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag)
- *
- */
-
- if (!empty($vars['subtype'])) {
- $subtype = "&subtype=" . urlencode($vars['subtype']);
- } else {
- $subtype = "";
- }
- if (!empty($vars['object'])) {
- $object = "&object=" . urlencode($vars['object']);
- } else {
- $object = "";
- }
-
- if (empty($vars['tagcloud']) && !empty($vars['value']))
- $vars['tagcloud'] = $vars['value'];
-
- if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
-
- $counter = 0;
- $cloud = "";
- $max = 0;
- foreach($vars['tagcloud'] as $tag) {
- if ($tag->total > $max) {
- $max = $tag->total;
- }
- }
- foreach($vars['tagcloud'] as $tag) {
- if (!empty($cloud)) $cloud .= ", ";
- $size = round((log($tag->total) / log($max)) * 100) + 30;
- if ($size < 60) $size = 60;
- $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
- }
- echo $cloud;
-
- }
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @uses $vars['tagcloud'] An array of stdClass objects with two elements: 'tag' (the text of the tag) and 'total' (the number of elements with this tag)
+ *
+ */
+
+ if (!empty($vars['subtype'])) {
+ $subtype = "&subtype=" . urlencode($vars['subtype']);
+ } else {
+ $subtype = "";
+ }
+ if (!empty($vars['object'])) {
+ $object = "&object=" . urlencode($vars['object']);
+ } else {
+ $object = "";
+ }
+
+ if (empty($vars['tagcloud']) && !empty($vars['value']))
+ $vars['tagcloud'] = $vars['value'];
+
+ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
+
+ $counter = 0;
+ $cloud = "";
+ $max = 0;
+ foreach($vars['tagcloud'] as $tag) {
+ if ($tag->total > $max) {
+ $max = $tag->total;
+ }
+ }
+ foreach($vars['tagcloud'] as $tag) {
+ if (!empty($cloud)) $cloud .= ", ";
+ $size = round((log($tag->total) / log($max)) * 100) + 30;
+ if ($size < 60) $size = 60;
+ $cloud .= "<a href=\"" . $vars['url'] . "search/?tag=". urlencode($tag->tag) . $object . $subtype . "\" style=\"font-size: {$size}%\" title=\"".addslashes($tag->tag)." ({$tag->total})\" style=\"text-decoration:none;\">" . htmlentities($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
+ }
+ echo $cloud;
+
+ }
+
?> \ No newline at end of file