diff options
Diffstat (limited to 'mod/riverdashboard/start.php')
-rw-r--r-- | mod/riverdashboard/start.php | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php index 1377afc37..c57d88d80 100644 --- a/mod/riverdashboard/start.php +++ b/mod/riverdashboard/start.php @@ -1,6 +1,8 @@ <?php /** * Elgg river dashboard plugin + * + * @package RiverDashboard */ function riverdashboard_init() { @@ -11,12 +13,16 @@ function riverdashboard_init() { } else { // Activity main menu add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "mod/riverdashboard/"); - } + } // Page handler register_page_handler('riverdashboard','riverdashboard_page_handler'); elgg_extend_view('css','riverdashboard/css'); + + // add an activity stream ECML keyword + // we'll restrict it to use in sitepages's custom_frontpage + register_plugin_hook('get_keywords', 'ecml', 'riverdashboard_ecml_keywords_hook'); } - + /** * Page handler for riverdash * @@ -27,7 +33,7 @@ function riverdashboard_page_handler($page){ include(dirname(__FILE__) . "/index.php"); return true; } - + function riverdashboard_dashboard() { include(dirname(__FILE__) . '/index.php'); } @@ -48,4 +54,25 @@ function elgg_make_river_comment($entity){ } } -register_elgg_event_handler('init','system','riverdashboard_init'); + +/** + * Register activity keyword. + * + * @param unknown_type $hook + * @param unknown_type $type + * @param unknown_type $value + * @param unknown_type $params + * @return unknown_type + */ +function riverdashboard_ecml_keywords_hook($hook, $type, $value, $params) { + $value['activity'] = array( + 'view' => "riverdashboard/ecml/activity", + 'description' => elgg_echo('riverdashboard:ecml:desc:activity'), + 'usage' => elgg_echo('riverdashboard:ecml:usage:activity'), + 'restricted' => array('sitepages/custom_frontpage') + ); + + return $value; +} + +register_elgg_event_handler('init', 'system', 'riverdashboard_init');
\ No newline at end of file |