','

',"\n"],'',$nstitle); } } $tagline = $conf['tagline']; if(tpl_getConf('doTaglineChangesByNamespace')){ $nstagline = tpl_include_page('nstagline', 0, 1); if ($nstagline) { $tagline = str_replace(['

','

',"\n"],'',$nstagline); } } // Initialize the logo $return .= ''; // Initialize the site branding $return .= '
'; $return .= '

'.$title.'

'; if($tagline){ $return .= '

'.$tagline.'

'; } $return .= '
'; return $return; } } /** * Generate the gravatar URL for a given email * * @return string */ if (!function_exists('tpl_getGravatarURL')) { function tpl_getGravatarURL($email, $size = 96) { return 'https://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?s='.$size; } } /** * Generate the HTML for a menu * * @return string */ if (!function_exists('tpl_getMenu')) { function tpl_getMenu($menu) { switch($menu){ case 'usermenu': return tpl_getUserMenu(); break; case 'sidebarmenu': return tpl_getSidebarMenu(); break; } } } /** * Generate the HTML for the user menu * * @return string */ if (!function_exists('tpl_getUserMenu')) { function tpl_getUserMenu() { global $lang,$ID,$conf,$INFO; $return = ''; $items = (new \dokuwiki\Menu\UserMenu())->getItems(); if(isset($INFO['userinfo'])){ $return .= ''; } else { $return .= '
'; foreach($items as $item) { $return .= '' .' ' .$item->getLabel() .''; } $return .= '
'; } return $return; } } /** * Generate the HTML for the sidebar menus * * @return string */ if (!function_exists('tpl_getSidebarMenu')) { function tpl_getSidebarMenu() { global $lang,$ID,$conf,$INFO; $userItems = (new \dokuwiki\Menu\UserMenu())->getItems(); $siteItems = (new \dokuwiki\Menu\SiteMenu())->getItems(); $return = ''; $return .= '
'; if(isset($INFO['userinfo'])){ $return .= '
'; $return .= ''; $return .= ''; $return .= '
'; } else { $return .= '
'; foreach($userItems as $item) { $return .= '' .' ' .$item->getLabel() .''; } $return .= '
'; } $return .= '
'; return $return; } }