]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
ECML uses the brand new granular view hooks.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 13 Apr 2010 19:37:55 +0000 (19:37 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 13 Apr 2010 19:37:55 +0000 (19:37 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@5726 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/ecml/start.php

index 7bb5f919f35c1362d66b6d629a5b43a29cab9402..07d30949a4bce7d43d73f7f4bfdb105213afe624 100644 (file)
@@ -30,9 +30,6 @@ function ecml_init() {
        register_page_handler('ecml_admin', 'ecml_admin_page_handler');
        register_elgg_event_handler('pagesetup', 'system', 'ecml_pagesetup');
 
-       // parse views for keywords
-       register_plugin_hook('display', 'view', 'ecml_parse_view');
-
        // show ECML-enabled icon on free-text input areas
        elgg_extend_view('input/longtext',  'ecml/input_ext');
        elgg_extend_view('input/plaintext', 'ecml/input_ext');
@@ -45,6 +42,10 @@ function ecml_init() {
        // Wants array('view_name' => 'Short Description')
        $CONFIG->ecml_parse_views = trigger_plugin_hook('get_views', 'ecml', NULL, array());
 
+       foreach ($CONFIG->ecml_parse_views as $view => $desc) {
+               register_plugin_hook('view', $view, 'ecml_parse_view');
+       }
+
        // provide a few built-in ecml keywords.
        // @todo could pull this out into an array here to save an API call.
        register_plugin_hook('get_keywords', 'ecml', 'ecml_keyword_hook');