aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/riverdashboard/languages/en.php5
-rw-r--r--mod/riverdashboard/start.php16
2 files changed, 20 insertions, 1 deletions
diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php
index 1ee5aab8d..34afe9176 100644
--- a/mod/riverdashboard/languages/en.php
+++ b/mod/riverdashboard/languages/en.php
@@ -41,7 +41,10 @@ $english = array(
// likes and comments
'riverdashboard:n_more_comments' => '+%s more',
- // ecml
+ // ecml desc
+ 'riverdashboard:ecml:riverdashboard' => 'River Dashboard',
+
+ // ecml keywords
'riverdashboard:ecml:desc:activity' => 'Recent Activity',
'riverdashboard:ecml:desc:usage' => '[activity user=username limit=limit type=type subtype=subtype]'
);
diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php
index 3f4c8da56..7c7332be8 100644
--- a/mod/riverdashboard/start.php
+++ b/mod/riverdashboard/start.php
@@ -18,6 +18,8 @@ function riverdashboard_init() {
// 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');
+
+ register_plugin_hook('get_views', 'ecml', 'riverdashboard_ecml_views_hook');
}
/**
@@ -67,4 +69,18 @@ function riverdashboard_ecml_keywords_hook($hook, $type, $value, $params) {
return $value;
}
+/**
+ * Register the activity front page with ECML.
+ *
+ * @param unknown_type $hook
+ * @param unknown_type $entity_type
+ * @param unknown_type $return_value
+ * @param unknown_type $params
+ */
+function riverdashboard_ecml_views_hook($hook, $entity_type, $return_value, $params) {
+ $return_value['riverdashboard/container'] = elgg_echo('riverdashboard:ecml:riverdashboard');
+
+ return $return_value;
+}
+
register_elgg_event_handler('init', 'system', 'riverdashboard_init');