From 4199940b13fd119a368c616c4c9b4ab549bd49e5 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 13 Apr 2010 19:37:55 +0000 Subject: ECML uses the brand new granular view hooks. git-svn-id: http://code.elgg.org/elgg/trunk@5726 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/ecml/start.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/ecml/start.php b/mod/ecml/start.php index 7bb5f919f..07d30949a 100644 --- a/mod/ecml/start.php +++ b/mod/ecml/start.php @@ -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'); -- cgit v1.2.3