aboutsummaryrefslogtreecommitdiff
path: root/mod/tagcloud/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/tagcloud/start.php')
-rw-r--r--mod/tagcloud/start.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/mod/tagcloud/start.php b/mod/tagcloud/start.php
index d026163a0..9cd9164f6 100644
--- a/mod/tagcloud/start.php
+++ b/mod/tagcloud/start.php
@@ -1,18 +1,28 @@
<?php
- function tagcloud_init() {
- add_widget_type('tagcloud', elgg_echo('tagcloud:widget:title'), elgg_echo('tagcloud:widget:description'));
-
- // Extend CSS
+/**
+ *
+ */
+
+
+function tagcloud_init() {
+ add_widget_type('tagcloud', elgg_echo('tagcloud:widget:title'), elgg_echo('tagcloud:widget:description'));
+
elgg_extend_view('css','tagcloud/css');
+ register_page_handler('tagcloud', 'tagcloud_page_handler');
+}
+
+function tagcloud_page_handler($page) {
+ global $CONFIG;
- if(is_plugin_enabled('blog')) {
- // extend blog sidebar with a tag-cloud
- }
- if(is_plugin_enabled('bookmarks')) {
- // extend bkmrks sidebar with a tag-cloud
- }
-
- }
+ switch ($page[0]) {
+ default:
+ $title = elgg_view_title(elgg_echo('tagcloud:site:title'));
+ $tags = display_tagcloud(0, 100, 'tags');
+ $body = elgg_view_layout('one_column', $title . $tags);
- register_elgg_event_handler('init', 'system', 'tagcloud_init');
-?>
+ page_draw(elgg_echo('tagcloud:site:title'), $body);
+ break;
+ }
+}
+
+register_elgg_event_handler('init', 'system', 'tagcloud_init');