diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-15 02:34:52 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-15 02:34:52 +0000 |
commit | c7ef93621e50dc3d6ded212e076de510ec2a263f (patch) | |
tree | ecec9580e4cfe6fdb8b5857dae2078eec81aacc2 /mod/ecml/ecml_functions.php | |
parent | 527c9dca0b5d71513adff8c7f8df6b88315bc6cf (diff) | |
download | elgg-c7ef93621e50dc3d6ded212e076de510ec2a263f.tar.gz elgg-c7ef93621e50dc3d6ded212e076de510ec2a263f.tar.bz2 |
Updated ECML docs.
Removed the _ as a valid keyword character (it looks funny).
Added the media sites in start.php.
Fixed bug that prevented [[view]] from working. Consequently, [[view]] now requires a src="" attribute.
git-svn-id: http://code.elgg.org/elgg/trunk@5740 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/ecml_functions.php')
-rw-r--r-- | mod/ecml/ecml_functions.php | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/mod/ecml/ecml_functions.php b/mod/ecml/ecml_functions.php index f0dcafa24..e818a8f99 100644 --- a/mod/ecml/ecml_functions.php +++ b/mod/ecml/ecml_functions.php @@ -42,9 +42,11 @@ function ecml_parse_view_match($matches) { break; case 'view': - // parses this into an acceptable array for $vars. - $info = ecml_keywords_parse_view_params($params_string); - $content = elgg_view($info['view'], $info['vars']); + // src is a required attribute of view + $vars = ecml_keywords_tokenize_params($params_string); + $vars['ecml_keyword'] = $keyword; + $vars['ecml_params_string'] = $params_string; + $content = elgg_view($vars['src'], $vars); break; @@ -166,28 +168,6 @@ function ecml_keywords_tokenize_params($string) { } /** - * Extract the view and vars for view: keyword - * - * @param $string - * @return array views, vars - */ -function ecml_keywords_parse_view_params($string) { - $vars = ecml_keywords_tokenize_params($string); - - // the first element key is the view - $var_keys = array_keys($vars); - $view = $var_keys[0]; - - $info = array( - 'view' => $view, - 'vars' => $vars - ); - - return $info; - -} - -/** * Returns an options array suitable for using in elgg_get_entities() * * @param string $string "name=value, name2=value2" |