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.
"[HelpNumber]" => array ("ext" => "FALSE", "Headline" => _("[Headline]"), "Text" => _("[Text]"), "SeeAlso" => "[SeeAlso link]"),
"999" => array ("ext" => "FALSE", "Headline" => _("This is a sample entry"), "Text" => _("Sample text"), "SeeAlso" => "http://lam.sf.net"),
"[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" => 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.

View File

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