aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/riverdashboard/start.php')
-rw-r--r--mod/riverdashboard/start.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index bc318552b..5da7f3122 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -12,14 +12,40 @@
function riverdashboard_init() {
+ global $CONFIG;
+
+ // Register and optionally replace the dashboard
+ if (get_plugin_setting('useasdashboard', 'riverdashboard') == 'yes')
+ register_page_handler('dashboard','riverdashboard_page_handler');
+
+ // Page handler
+ register_page_handler('riverdashboard','riverdashboard_page_handler');
+
extend_view('css','riverdashboard/css');
- //register_page_handler('dashboard','riverdashboard_dashboard');
+ // Activity main menu
+ if (isloggedin())
+ {
+ add_menu(elgg_echo('Activity'), $CONFIG->wwwroot . "mod/riverdashboard/");
+ }
add_widget_type('river_widget',elgg_echo('river:widget:title'), elgg_echo('river:widget:description'));
}
+ /**
+ * Page handler for riverdash
+ *
+ * @param unknown_type $page
+ */
+ function riverdashboard_page_handler($page)
+ {
+ global $CONFIG;
+
+ @include(dirname(__FILE__) . "/index.php");
+ return true;
+ }
+
function riverdashboard_dashboard() {
include(dirname(__FILE__) . '/index.php');