*/ function _tpl_userpage($userPage, $title, $link=0, $wrapper=0) { if (!$_SERVER['REMOTE_USER']) return; global $conf; $userPage = str_replace('@USER@', $_SERVER['REMOTE_USER'], $userPage); if ($wrapper) echo "<$wrapper>"; if ($link) tpl_pagelink($userPage, $title); else echo html_btn('userpage', $userPage, '', array(), 'get', 0, $title); if ($wrapper) echo ""; } /** * Wrapper around custom template actions * * @author Anika Henke */ function _tpl_action($type, $link=0, $wrapper=0) { switch ($type) { case 'userpage': if (tpl_getConf('userPage')) { _tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper); } break; } } /* dokubootstrap-yeti related functions ********************************************************************/ function _tpl_toc_to_twitter_bootstrap_event_hander_dump_level($data, $firstlevel=false) { if (count($data) == 0) { return ''; } //dw($data); $out = ''; return $out; } function _tpl_toc_to_twitter_bootstrap_event_hander(&$event, $param) { global $conf; //This is tied to the specific format of the DokuWiki TOC. echo _tpl_toc_to_twitter_bootstrap_event_hander_dump_level($event->data, true); } function _tpl_toc_to_twitter_bootstrap() { //Force generation of TOC, request that the TOC is returned as HTML, but then ignore the returned string. The hook will instead dump out the TOC. global $EVENT_HANDLER; $EVENT_HANDLER->register_hook('TPL_TOC_RENDER', 'AFTER', NULL, '_tpl_toc_to_twitter_bootstrap_event_hander'); tpl_toc(true); } function _tpl_output_page_tools($showTools = true, $element = 'li'){ global $lang; if ($showTools) { echo ''; } } function _tpl_output_search_bar() { //Modified from the official tpl_searchform function. global $lang; global $ACT; global $QUERY; // don't print the search form if search action has been disabled if(!actionOk('search')) return false; print ''; return true; } /** * Define how the user related content is shown. * When not logged in, login / register is shown * When logged in the user's name is printed with a dropdown of user related options * * @author Paul in 't Hout **/ function _tpl_userinfo($element='li') { global $INFO; if(isset($_SERVER['REMOTE_USER'])) { echo ''; }else{ tpl_action('login', 1, $element, 0, '', '', 'Login / Register'); } } // debug web function dw($message) { print "
";
        if (is_array($message)) {
                print_r($message);
        }else{
                print $message;
        }
        print "
";
}