aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-02 21:20:49 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-06-02 21:20:49 +0000
commit2c5c43f9a632b05d5557f980e83bcecdd3f1332a (patch)
tree6445d34a1ad106e069b2ad7e479e5ad35833585c /engine
parent81decf8b30a6814f7e0514fdacbadb1368fe306d (diff)
downloadelgg-2c5c43f9a632b05d5557f980e83bcecdd3f1332a.tar.gz
elgg-2c5c43f9a632b05d5557f980e83bcecdd3f1332a.tar.bz2
Moving new Site Tags functionality out of Tagcloud plugin and into core.
git-svn-id: http://code.elgg.org/elgg/trunk@6332 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/tags.php24
1 files changed, 21 insertions, 3 deletions
diff --git a/engine/lib/tags.php b/engine/lib/tags.php
index 8d67a89bb..ce1fbbf93 100644
--- a/engine/lib/tags.php
+++ b/engine/lib/tags.php
@@ -357,9 +357,12 @@ function display_tagcloud($threshold = 1, $limit = 10, $metadata_name = "", $ent
elgg_deprecated_notice('display_cloud() was deprecated by elgg_view_tagcloud()!', 1.8);
- return elgg_view("output/tagcloud",array('value' => get_tags($threshold, $limit, $metadata_name, $entity_type, $entity_subtype, $owner_guid, $site_guid, $start_ts, $end_ts),
- 'type' => $entity_type,
- 'subtype' => $entity_subtype));
+ $tags = get_tags($threshold, $limit, $metadata_name, $entity_type, $entity_subtype, $owner_guid, $site_guid, $start_ts, $end_ts);
+ return elgg_view('output/tagcloud', array(
+ 'value' => $tags,
+ 'type' => $entity_type,
+ 'subtype' => $entity_subtype,
+ ));
}
/**
@@ -402,3 +405,18 @@ function elgg_get_registered_tag_metadata_names() {
// register the standard tags metadata name
elgg_register_tag_metadata_name('tags');
+
+register_page_handler('tags', 'elgg_tagcloud_page_handler');
+function elgg_tagcloud_page_handler($page) {
+ global $CONFIG;
+
+ switch ($page[0]) {
+ default:
+ $title = elgg_view_title(elgg_echo('tags:site_cloud'));
+ $tags = display_tagcloud(0, 100, 'tags');
+ $body = elgg_view_layout('one_column_with_sidebar', $title . $tags);
+
+ page_draw(elgg_echo('tags:site_cloud'), $body);
+ break;
+ }
+}