$content['footer'] = loadTemplate('sponsor_footer', true);
// 'You are here' navigation
-$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), false, false);
+$content['you_are_here'] = addMenuDescription('sponsor', getWhat(), true);
// Load main sponsor template
loadTemplate('sponsor_main', false, $content);
}
// Add menu description pending on given file name (without path!)
-function addMenuDescription ($accessLevel, $FQFN, $return = false, $output = true) {
+function addMenuDescription ($accessLevel, $FQFN, $return = false) {
// Use only filename of the FQFN...
$file = basename($FQFN);
$search = substr($search, 0, -4);
} // END - i
- // Get the title from menu
- $ret = getTitleFromMenu($accessLevel, $search, $type, $AND);
-
- // Shall we return it?
- if ($return === true) {
- // Return title
- return $ret;
- } elseif (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) {
+ if (((isExtensionInstalledAndNewer('sql_patches', '0.2.3')) && (getConfig('youre_here') == 'Y')) || ((isAdmin()) && ($modCheck == 'admin'))) {
// Output HTML code
$OUT = $prefix . "<strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=" . $modCheck . '&' . $type . '=' . $search.$LINK_ADD . "\">" . $ret . "</a></strong>\n";
$GLOBALS['nav_depth'] = '0';
// Run the filter chain
- $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ""));
+ $ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ''));
+
+ // Add additional content
$OUT .= $ret['content'];
} // END - if
}
// Return or output HTML code?
- if ($output === true) {
- // Output HTML code here
- outputHtml($OUT);
- } else {
+ if ($return === true) {
// Return HTML code
return $OUT;
+ } else {
+ // Output HTML code here
+ outputHtml($OUT);
}
}
// Exclude admin and member's area
if (($mod != 'admin') && ($mod != 'login')) {
// Construct dynamic description
- $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . addMenuDescription('guest', 'what-'.$what, true);
+ $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', $what);
// Output it directly
outputHtml('<meta name="description" content="' . $DESCR . '" />');