diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/output/tagcloud.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index bb4600b47..e8fffa705 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -9,18 +9,20 @@ * @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) - * + * @uses $vars['value'] Sames as tagcloud + * @uses $vars['type'] Entity type + * @uses $vars['subtype'] Entity subtype */ if (!empty($vars['subtype'])) { - $subtype = "&subtype=" . urlencode($vars['subtype']); + $subtype = "&entity_subtype=" . urlencode($vars['subtype']); } else { $subtype = ""; } -if (!empty($vars['object'])) { - $object = "&object=" . urlencode($vars['object']); +if (!empty($vars['type'])) { + $type = "&entity_type=" . urlencode($vars['type']); } else { - $object = ""; + $type = ""; } if (empty($vars['tagcloud']) && !empty($vars['value'])) { @@ -45,7 +47,8 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { 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>"; + $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>"; } echo $cloud; }
\ No newline at end of file |