fixed seeAlso

This commit is contained in:
Roland Gruber 2007-10-11 17:50:07 +00:00
parent 86cac8064c
commit 8cfb499518
2 changed files with 4 additions and 8 deletions

View File

@ -184,8 +184,8 @@ $helpArray = array (
/* This is a sample help entry. Just copy this line an modify the values between the [] brackets. /* This is a sample help entry. Just copy this line an modify the values between the [] brackets.
"[HelpNumber]" => array ("ext" => "FALSE", "Headline" => _("[Headline]"), "Text" => _("[Text]"), "SeeAlso" => "[SeeAlso link]"), "[HelpNumber]" => array ("ext" => "FALSE", "Headline" => _("[Headline]"), "Text" => _("[Text]"), "SeeAlso" => array('link' => "[SeeAlso link]", 'text' => '[link text]')),
"999" => array ("ext" => "FALSE", "Headline" => _("This is a sample entry"), "Text" => _("Sample text"), "SeeAlso" => "http://lam.sf.net"), "999" => array ("ext" => "FALSE", "Headline" => _("This is a sample entry"), "Text" => _("Sample text"), "SeeAlso" => array('link' => "http://lam.sf.net", 'text' => 'Project page')),
If help text is located in an extra file then the file must be stored in help directory. If help text is located in an extra file then the file must be stored in help directory.

View File

@ -103,12 +103,8 @@ function displayHelp($helpEntry,$helpVariables) {
$format = " <p class=\"help\">" . $helpEntry['Text'] . "</p>\n"; $format = " <p class=\"help\">" . $helpEntry['Text'] . "</p>\n";
array_unshift($helpVariables,$format); array_unshift($helpVariables,$format);
call_user_func_array("printf",$helpVariables); call_user_func_array("printf",$helpVariables);
if(isset($helpArray['SeeAlso']) && is_array($helpArray['SeeAlso'])) { if(isset($helpEntry['SeeAlso']) && is_array($helpEntry['SeeAlso'])) {
while($current = current($helpEntry["SeeAlso"])) echo ' <p class="help">' . _('See also') . ': <a class="helpSeeAlso" href="' . $helpEntry['SeeAlso']['link'] . '">' . $helpEntry['SeeAlso']['text'] . '</a></p>';
{
echo ' <p class="help">' . (( isset($current['link'])) ? '<a class="helpSeeAlso" href="' . $current['link'] . '">' : '') . _('See also') . ': ' . $current['text'] . (( isset($current['link'])) ? '</a>' : '') . '</p>\n';
next($helpEntry["SeeAlso"]);
}
} }
echoHTMLFoot(); echoHTMLFoot();
} }