diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 15:25:18 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-16 15:25:18 +0000 |
commit | c32f43bcac8ff4493ce387b078a57ba4fdd57063 (patch) | |
tree | e03ac4a5dfa832e5bcc0948619db7b0c2fb15e36 /mod/riverdashboard/start.php | |
parent | 6562e3311d64e5ddbe7183188d4dafddb3080e62 (diff) | |
download | elgg-c32f43bcac8ff4493ce387b078a57ba4fdd57063.tar.gz elgg-c32f43bcac8ff4493ce387b078a57ba4fdd57063.tar.bz2 |
Added activity ecml keyword.
git-svn-id: http://code.elgg.org/elgg/trunk@5774 36083f99-b078-4883-b0ff-0f9b5a30f544
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 |