From 8f95c7da0b0f36a92b55806a450e55a26c2e8ac3 Mon Sep 17 00:00:00 2001 From: duergner Date: Mon, 15 Mar 2004 16:56:37 +0000 Subject: [PATCH] *** empty log message *** --- lam/docs/modules-specification.htm | 23 +++++++++++++++++++---- lam/templates/help.php | 7 ++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lam/docs/modules-specification.htm b/lam/docs/modules-specification.htm index 4f3451d2..cc723d8b 100644 --- a/lam/docs/modules-specification.htm +++ b/lam/docs/modules-specification.htm @@ -422,11 +422,9 @@ Fields marked REQUIRED are neccessary under any circumstances. Fields mar OPTIONAL may be left out when not needed.
There are basically two different types of help entries that can be used. Internal help entries, that means the headline, text, etc is included in the help entry or external help entries, that means the help -entry has only a reference pointing to a HTML/PHP page that offers the help entry.
+entry has only a reference pointing to a HTML/PHP page that offers the help entry.
-


-

-

4.1. Internal help entries

+


4.1. Internal help entries

ext (REQUIRED)
Must be FALSE in this case.

@@ -440,6 +438,23 @@ placeholder for variables passed to this help entry. The placeholder must follow placeholder defined by the PHP printf function. HTML/CSS elements are allowed here as long as they follow the XHTML1.0 Strict specification.

+Variables (OPTIONAL) +
An array of variables used as arguments for the formated string submitted in the Text +field. This may be but must not be an assiciated array where each argument to be passed on is a +single row in the array. This array may only consist of types that can be passed as arguments to PHP's +printf function. +

+SeeAlso (OPTIONAL) +
An array of references to anonther related subjects. Each row of the array must contain a field +called "text" with the text that should be displayed and may contain a field called "link" which is used +as value for the href attribute of a HTML tag when set.
+


4.2. External help entries

+ext (REQUIRED) +
Must be TRUE in this case. +

+Link (REQUIRED) +
The complete filename of the file stored under the help/ directory which should be displayed +when this help entry is called. diff --git a/lam/templates/help.php b/lam/templates/help.php index 7211bf9e..7fc768a0 100644 --- a/lam/templates/help.php +++ b/lam/templates/help.php @@ -68,7 +68,7 @@ function displayHelp($helpEntry) { else { $helpVariables = array(); - while($current = current($helpEntry['variables'])) { + while($current = current($helpEntry['Variables'])) { array_push($helpVariables,$current); next($helpEntry['variables']); } @@ -77,9 +77,10 @@ function displayHelp($helpEntry) { $format = "

" . $helpEntry['Text'] . "

\n"; array_unshift($helpVariables,$format); call_user_func_array("printf",$helpVariables); - if($helpEntry["SeeAlso"] <> "") + while($current = current($helpEntry["SeeAlso"])) { - echo "

" . _("See also") . ": " . $helpEntry['SeeAlso'] . "

\n"; + echo "

" . ((isset($current['link']) ? "" : "") . _("See also") . ": " . $current['text'] . ((isset($current['link'])) ? "" : "") . "

\n"; + next($helpEntry["SeeAlso"]); } echoHTMLFoot(); }