From e744bf84bf766c720c92ff64ce5381de531db722 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 24 Feb 2009 14:22:01 +0000 Subject: 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 --- mod/riverdashboard/languages/en.php | 1 + mod/riverdashboard/start.php | 28 +++++++++++++++++++++- .../views/default/settings/riverdashboard/edit.php | 11 +++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mod/riverdashboard/views/default/settings/riverdashboard/edit.php (limited to 'mod/riverdashboard') diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php index 21b418719..a5226d6b9 100644 --- a/mod/riverdashboard/languages/en.php +++ b/mod/riverdashboard/languages/en.php @@ -4,6 +4,7 @@ 'mine' => 'Mine', 'filter' => 'Filter', + 'riverdashboard:useasdashboard' => "Replace the default dashboard with this activity river?", /** * Site messages 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'); diff --git a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php new file mode 100644 index 000000000..0cf677fb1 --- /dev/null +++ b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php @@ -0,0 +1,11 @@ + +

+ + + + +

-- cgit v1.2.3