aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/start.php
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-24 14:22:01 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-24 14:22:01 +0000
commite744bf84bf766c720c92ff64ce5381de531db722 (patch)
tree0179c1a385c5f97250297be99e75507399915279 /mod/riverdashboard/start.php
parentf23e0746255a5f3845f8e8c8082b8c660c2ba934 (diff)
downloadelgg-e744bf84bf766c720c92ff64ce5381de531db722.tar.gz
elgg-e744bf84bf766c720c92ff64ce5381de531db722.tar.bz2
you can now replace the default dashboard with the new activity river, if required.
git-svn-id: https://code.elgg.org/elgg/trunk@2921 36083f99-b078-4883-b0ff-0f9b5a30f544
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');