aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/start.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-09 04:48:16 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-07-09 04:48:16 +0000
commit6005959c37acf42042be7281521d1f37ff56e677 (patch)
tree3547fe1270645135e16f3b5bc5b0fefc1c4939d4 /mod/ecml/start.php
parent1f1b9957ec0527da781611fdf312b0475bb90aa4 (diff)
downloadelgg-6005959c37acf42042be7281521d1f37ff56e677.tar.gz
elgg-6005959c37acf42042be7281521d1f37ff56e677.tar.bz2
Added ecml help for web service embeds.
git-svn-id: http://code.elgg.org/elgg/trunk@6668 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/start.php')
-rw-r--r--mod/ecml/start.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 1c1bbd3fd..68b9f7360 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -86,9 +86,25 @@ function ecml_init() {
* @param array $page
*/
function ecml_help_page_handler($page) {
- $content = elgg_view('ecml/help');
- $body = elgg_view_layout('one_column_with_sidebar', $content);
- echo page_draw(elgg_echo('ecml:help'), $body);
+ if (!isset($page[0]) || empty($page[0])) {
+ $content = elgg_view('ecml/help');
+ $body = elgg_view_layout('one_column_with_sidebar', $content);
+ echo page_draw(elgg_echo('ecml:help'), $body);
+ } else {
+ // asking for detailed help about a keyword
+ $keyword = $page[0];
+ $content = elgg_view('ecml/keyword_help', array('keyword' => $keyword));
+
+ if (get_input('ajax', FALSE)) {
+ echo $content;
+ exit;
+ } else {
+ $body = elgg_view_layout('one_column_with_sidebar', $content);
+ echo page_draw(elgg_echo('ecml:help'), $body);
+ }
+ }
+
+ return TRUE;
}
/**
@@ -261,7 +277,7 @@ function ecml_embed_web_services_hook($hook, $type, $value, $params) {
// we're using a view override for this section's content
// so only need to pass the name.
$value['web_services'] = array(
- 'name' => elgg_echo('embed:web_services')
+ 'name' => elgg_echo('ecml:embed:web_services')
);
return $value;