]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
ECML is parsed on the activity stream.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 10 Jun 2010 20:59:39 +0000 (20:59 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 10 Jun 2010 20:59:39 +0000 (20:59 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6447 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/riverdashboard/languages/en.php
mod/riverdashboard/start.php

index 1ee5aab8dc3b7d96d2a8531283e6a8c650db120c..34afe91769fa18c5e3960732e1d0c2c499ffec54 100644 (file)
@@ -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]'
 );
index 3f4c8da5613dffba851cd614c0c4070c743e4b8e..7c7332be8f8e4bce59baa84c96212641aa14181d 100644 (file)
@@ -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');