From 18d00e176826a353503f889bb8ea157e5228304b Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 15 Apr 2010 17:07:13 +0000 Subject: Added granular access for views in ECML. Added 'usage' on keyword info. Updated docs. git-svn-id: http://code.elgg.org/elgg/trunk@5747 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/ecml/README.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'mod/ecml/README.txt') diff --git a/mod/ecml/README.txt b/mod/ecml/README.txt index c72e8c0c4..f57dc1b8d 100644 --- a/mod/ecml/README.txt +++ b/mod/ecml/README.txt @@ -90,7 +90,13 @@ CONTENTS: To register your own ECML keywords, reply to the 'get_keywords' hook of type 'ecml' and append to the passed array with a key that is - your keyword name and a value that is an array of a description and view. + your keyword name and a value that is an array of a view, a description, + and usage instructions. + + Optionally, the array can pass a 'restricted' => array() value of views + that this keyword is valid in. This is not overrideable by the admin + interface and is useful for forcing security on possibly dangerous + keywords. Arguments passed to the keyword are accessible to the keyword view via the $vars array. It is the responsibility of the custom view to parse @@ -111,7 +117,8 @@ CONTENTS: function buttonizer_ecml_keywords($hook, $type, $value, $params) { $value['buttonizer'] = array( 'view' => 'buttonizer/ecml/buttonizer', - 'description' => 'Makes your text a button! What could be better?' + 'description' => 'Makes your text a button! What could be better?', + 'usage' => 'Use [[buttonizer text="My text"]] to make "My text" a button!' ); return $value; @@ -129,6 +136,10 @@ CONTENTS: [[view src="buttonizer/ecml/buttonizer" text="This is my button!"]] + or even: + + [[view src="input/button" value="This is my button!" type="button"]] + but is much simpler for the user. -- cgit v1.2.3