/** * Prints the actions links * * @author Michael Klier <*****@*****.**> */ function tpl_actions() { $actions = array('admin', 'edit', 'history', 'recent', 'backlink', 'subscribe', 'subscribens', 'index', 'login', 'profile'); print '<div class="sidebar_box">' . DOKU_LF; print ' <ul>' . DOKU_LF; foreach ($actions as $action) { if (!actionOK($action)) { continue; } // start output buffering if ($action == 'edit') { // check if new page button plugin is available if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) { $npb = $npd->html_new_page_button(true); if ($npb) { print ' <li><div class="li">'; print $npb; print '</div></li>' . DOKU_LF; } } } ob_start(); print ' <li><div class="li">'; if (tpl_actionlink($action)) { print '</div></li>' . DOKU_LF; ob_end_flush(); } else { ob_end_clean(); } } print ' </ul>' . DOKU_LF; print '</div>' . DOKU_LF; }
/** * The loginform * * @author Andreas Gohr <*****@*****.**> */ function html_login() { global $lang; global $conf; global $ID; print p_locale_xhtml('login'); print '<div class="centeralign">' . NL; $form = new Doku_Form(array('id' => 'dw__login')); $form->startFieldset($lang['btn_login']); $form->addHidden('id', $ID); $form->addHidden('do', 'login'); $form->addElement(form_makeTextField('u', !$_REQUEST['http_credentials'] ? $_REQUEST['u'] : '', $lang['user'], 'focus__this', 'block')); $form->addElement(form_makePasswordField('p', $lang['pass'], '', 'block')); if ($conf['rememberme']) { $form->addElement(form_makeCheckboxField('r', '1', $lang['remember'], 'remember__me', 'simple')); } $form->addElement(form_makeButton('submit', '', $lang['btn_login'])); $form->endFieldset(); if (actionOK('register')) { $form->addElement('<p>' . $lang['reghere'] . ': ' . tpl_actionlink('register', '', '', '', true) . '</p>'); } if (actionOK('resendpwd')) { $form->addElement('<p>' . $lang['pwdforget'] . ': ' . tpl_actionlink('resendpwd', '', '', '', true) . '</p>'); } html_form('login', $form); print '</div>' . NL; }
} } } ?> <!-- end content --> </div> <!-- id="maincolContent" --> <div id="contentfooterNavigation" class="horizontalNavigation"> <?php if ($conf['useacl'] && $_SERVER['REMOTE_USER']) { echo '<ul >' . '<li >'; tpl_actionlink('edit'); echo '</li >' . '<li >'; tpl_actionlink('history'); echo '</li >' . '<li >'; tpl_actionlink('recent'); echo '</li >' . '</ul>'; } else { echo '<ul>' . '<li>'; echo tpl_pageinfo() . '</li >' . '<li>' . tpl_userinfo() . '</li >' . '</ul>'; } ?> </div> </div> <!--right column--> <?php writeMBPortlet($monobook['personal'], 'rightcol', '', 'rightcol'); ?> </div>
tpl_actionlink('login', '', '', '<img src="' . $DOKU_TPL . 'images/16/logged_in.png" title="Log In" alt="Log In"></img>'); ?> </div> </div> <div class="pagename"> :: <?php tpl_link(wl($ID, 'do=backlink'), tpl_pagename($ID)); ?> ~ <div class="logoicons"> <?php tpl_link(wl('disclaimer'), '<img src="' . $DOKU_TPL . 'images/20/info.png" title="Disclaimer" alt="Disclaimer"></img>', 'class="img16"'); tpl_link('feed.php?ns=blog&num=10&linkto=current&content=html', '<img src="' . $DOKU_TPL . 'images/rss.png" title="TLW RSS" alt="TLW RSS"></img>'); tpl_actionlink('edit', '', '', '<img src="' . $DOKU_TPL . 'images/20/edit.png" class="img16" title="Edit" alt="Edit"></img>'); tpl_actionlink('history', '', '', '<img src="' . $DOKU_TPL . 'images/20/history.png" class="img16" title="Previous versions" alt="Previous versions"></img>'); ?> </div> </div> <div class="clearer"></div> </div> <!-- header stop --> <?php /*old includehook*/ @(include dirname(__FILE__) . '/header.html'); ?> <div class="toprip"> </div>
?> </li> <li ><?php tpl_actionlink('login'); ?> </li> <li ><?php tpl_actionlink('subscription'); ?> </li> <li ><?php tpl_actionlink('admin'); ?> </li> <li ><?php tpl_actionlink('profile'); ?> </li> </ul> </div> <div class="headerPagename"> [[<?php tpl_link(wl($ID, 'do=backlink'), tpl_pagetitle($ID, true)); ?> ]] </div> <div class="headerLogo"> <?php
$loginUrl = Ld_Ui::getAdminUrl(array('module' => 'default', 'controller' => 'auth', 'action' => 'login')); if (empty($loginUrl)) { $loginUrl = wl($ID, 'do=login&sectok=' . getSecurityToken()); } if (empty($logoutUrl)) { $logoutUrl = wl($ID, 'do=logout&sectok=' . getSecurityToken()); } ?> <?php Ld_Ui::top_bar(array('loginUrl' => $loginUrl, 'logoutUrl' => $logoutUrl)); } else { ?> <div class="user-info"> <?php tpl_userinfo(); ?> <?php tpl_actionlink('subscription'); ?> <?php tpl_actionlink('profile'); ?> <?php tpl_actionlink('admin'); ?> <?php tpl_actionlink('login'); ?> </div> <?php }
/** * Wrapper around tpl_button() and tpl_actionlink() * * @author Anika Henke <*****@*****.**> * @param * @param bool $link link or form button? * @param bool $wrapper HTML element wrapper * @param bool $return return or print * @param string $pre prefix for links * @param string $suf suffix for links * @param string $inner inner HTML for links * @return bool|string */ function tpl_action($type, $link = false, $wrapper = false, $return = false, $pre = '', $suf = '', $inner = '') { $out = ''; if ($link) { $out .= tpl_actionlink($type, $pre, $suf, $inner, 1); } else { $out .= tpl_button($type, 1); } if ($out && $wrapper) { $out = "<{$wrapper}>{$out}</{$wrapper}>"; } if ($return) { return $out; } print $out; return $out ? true : false; }
<div>project:chorus</div> </div> <div class="menulist"> <ul><a href="/about"><div>about</div></a></ul> <ul><a href="/songs"><div>songs</div></a></ul> <ul><a href="/projects"><div>projects</div></a></ul> <ul><a href="/license"><div>license</div></a></ul> </div> <div id="menucontent" class="menucontent"> </div> <div class="menuright footerinc"> <?php tpl_actionlink('index', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_index.png" title="Index" alt="Index" class="icon"></img>'); tpl_actionlink('recent', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_recent.png" title="Recent" alt="Recent" class="icon"></img>'); tpl_actionlink('admin', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_admin.png" title="Admin" alt="Admin" class="icon"></img>'); tpl_actionlink('login', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_login.png" title="Log In" alt="Log In" class="icon"></img>'); tpl_actionlink('profile', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_profile.png" title="Profile" alt="Profile" class="icon"></img>'); ?> </div> </div> <a href="/"> <img src="<?php echo $DOKU_TPL; ?> images/projectchorus.png" alt="project:chorus" id="logo" /> </a> </div> </body>
<?php tpl_actionlink('profile'); ?> <br /> <?php tpl_actionlink('login'); ?> <br /> <?php tpl_actionlink('admin'); ?> <br /> <br /><br /> <?php tpl_actionlink('subscription'); ?> </div> </div> <?php } ?> <div class="clearer"> </div> <?php flush(); ?> <div class="doc"><?php tpl_pageinfo();
</head> <body class="h6e-layout"> <div class="dokuwiki"> <?php include dirname(__FILE__) . '/top.php'; ?> <div style="padding-bottom: .5em; padding-left: 30px;"> <b><?php tpl_link(wl(), $conf['title'], 'name="dokuwiki__top" id="dokuwiki__top" accesskey="h" title="[ALT+H]"'); ?> > <?php tpl_actionlink('backlink'); ?> </b> </div> <div class="<?php echo $page_type; ?> h6e-main-content"> <div style="float:right"> <?php tpl_searchform(); ?> </div>
?> </li> <li><?php tpl_actionlink('history', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_revisions.png" title="Old revisions" alt="Old revisions" />'); ?> </li> <li><?php tpl_actionlink('admin', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_admin.png" title="Admin" alt="Admin" />'); ?> </li> <li><?php tpl_actionlink('profile', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_profile.png" title="Profile" alt="Profile" />'); ?> </li> <li><?php tpl_actionlink('login', '', '', '<img src="' . $DOKU_TPL . 'images/icons/icon_login.png" title="Log In" alt="Log In" />'); ?> </li> <ul> <div class="no"><?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug(); ?> </div> </div> </body> </html>
<div class="dropdown"> <ul> <li><?php tpl_actionlink('edit'); ?> </li> <li><?php tpl_actionlink('history'); ?> </li> <li><?php tpl_link(wl($ID, 'do=backlink'), "Backlinks"); ?> </li> <li><?php tpl_actionlink('subscribe'); ?> </li> </ul> </div> </li> <li class="field"> <?php _tpl_draw_searchform(); ?> </li> </ul> </div> </nav> </div> <div class="row">
/** * Prints login dialog if user is not logged in or userinfo in other case */ function tpl_login_dialog() { global $ID; global $INFO; global $lang; if ($INFO['userinfo']) { print '<div id="userinfo">' . DOKU_LF; // TODO: insert avatar print '<div id="fn">' . DOKU_LF; print $INFO['userinfo']['name']; print '</div>'; print '<div id="actions">' . DOKU_LF; tpl_actionlink('profile'); print ' • ' . DOKU_LF; tpl_actionlink('login'); print '</div></div>' . DOKU_LF; } else { print '<div id="login__top">' . DOKU_LF; tpl_actionlink('login'); print ' • ' . DOKU_LF; print '<a href="' . wl($ID, 'do=register') . '" rel="nofollow" class="wikilink1">' . $lang['kunlaborejo_register'] . '</a>'; print '</div>' . DOKU_LF; } }
if (isset($_SERVER['REMOTE_USER'])) { // Logout tpl_actionlink('login', '<span id="system_logout" title="' . $lang['btn_logout'] . '"><span class="backendbutton"></span>', '</span>'); } else { // Login tpl_actionlink('login'); } } if (isset($_SERVER['REMOTE_USER'])) { if (actionOK('profile')) { echo ', '; tpl_actionlink('profile', '<span id="system_profile" title="' . $lang['btn_profile'] . '"><span class="backendbutton"></span>', '</span>'); } if (actionOK('admin')) { echo ', '; tpl_actionlink('admin', '<span id="system_admin" title="' . $lang['btn_admin'] . '"><span class="backendbutton"></span>', '</span>'); } } ?> </p> </div> <!-- /footer --> </div> <!-- /sitewrapper --> <?php /* provide DokuWiki housekeeping, required in all templates */ tpl_indexerWebBug(); ?> </body> </html>
/** * prints a horizontal navigation bar (composed of <li> items and some CSS tricks) * with the current active item highlited */ function tpl_tabnavi() { global $ID; global $ACT; global $conf; // afegit jordi global $lang; // afegit jordi global $auth; // afegit jordi global $USERINFO; // afegit jordi $buttons = array(); parse_str(tpl_getConf('navbar_buttons'), $buttons); echo "<ul>\n"; foreach ($buttons as $title => $pagename) { echo '<li'; // MODIFICAT JORDI // Afegim control, per mostrar/no mostrar opció "Autoria" segons si l'usuari està validat (hi ha nom d'usuari) o no if ($USERINFO[name] == "") { if ($title != "Autoria") { if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') { echo ' id="current"><div id="current_inner">' . $title . '</div>'; } else { echo '>'; tpl_link(wl($pagename), $title); } } } else { if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') { echo ' id="current"><div id="current_inner">' . $title . '</div>'; } else { echo '>'; tpl_link(wl($pagename), $title); } } echo "</li>\n"; } // MODIFICAT JORDI //always add link to recent page, unless $action id already 'recent' if (tpl_getConf('navbar_recent')) { if ($ACT == 'recent') { echo '<li id="current"><div id="current_inner">' . tpl_getConf('navbar_recent') . '</div></li>'; } else { echo '<li>'; tpl_actionlink('recent', '', '', tpl_getConf('navbar_recent')); echo "</li>\n"; } } echo "</ul>\n"; }
/** * Prints given sidebar box * * @author Michael Klier <*****@*****.**> */ function _sidebar_dispatch($sb, $pos) { global $lang; global $conf; global $ID; global $REV; global $INFO; $svID = $ID; // save current ID $svREV = $REV; // save current REV $pname = $this->getConf('pagename'); switch ($sb) { case 'main': $main_sb = $pname; if (@page_exists($main_sb)) { if (auth_quickaclcheck($main_sb) >= AUTH_READ) { $always = $this->getConf('main_always'); if ($always or !$always && !getNS($ID)) { print '<div class="main_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($main_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } } else { $out = $this->locale_xhtml('nosidebar'); $link = '<a href="' . wl($pname) . '" class="wikilink2">' . $pname . '</a>' . DOKU_LF; print '<div class="main_sidebar sidebar_box">' . DOKU_LF; print str_replace('LINK', $link, $out); print '</div>' . DOKU_LF; } break; case 'namespace': $user_ns = $this->getConf('user_ns'); $group_ns = $this->getConf('group_ns'); if (!preg_match("/^" . $user_ns . ":.*?\$|^" . $group_ns . ":.*?\$/", $svID)) { // skip group/user sidebars and current ID $ns_sb = $this->_getNsSb($svID); if ($ns_sb && auth_quickaclcheck($ns_sb) >= AUTH_READ) { print '<div class="namespace_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($ns_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } break; case 'user': $user_ns = $this->getConf('user_ns'); if (isset($INFO['userinfo']['name'])) { $user = $_SERVER['REMOTE_USER']; $user_sb = $user_ns . ':' . $user . ':' . $pname; if (@page_exists($user_sb)) { $subst = array('pattern' => array('/@USER@/'), 'replace' => array($user)); print '<div class="user_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($user_sb, $pos, $subst) . DOKU_LF; print '</div>'; } // check for namespace sidebars in user namespace too if (preg_match('/' . $user_ns . ':' . $user . ':.*/', $svID)) { $ns_sb = $this->_getNsSb($svID); if ($ns_sb && $ns_sb != $user_sb && auth_quickaclcheck($ns_sb) >= AUTH_READ) { print '<div class="namespace_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($ns_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } } break; case 'group': $group_ns = $this->getConf('group_ns'); if (isset($INFO['userinfo']['grps'])) { foreach ($INFO['userinfo']['grps'] as $grp) { $group_sb = $group_ns . ':' . $grp . ':' . $pname; if (@page_exists($group_sb) && auth_quickaclcheck(cleanID($group_sb)) >= AUTH_READ) { $subst = array('pattern' => array('/@GROUP@/'), 'replace' => array($grp)); print '<div class="group_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($group_sb, $pos, $subst) . DOKU_LF; print '</div>' . DOKU_LF; } } } else { $group_sb = $group_ns . ':all:' . $pname; if (@page_exists($group_sb) && auth_quickaclcheck(cleanID($group_sb)) >= AUTH_READ) { print '<div class="group_sidebar sidebar_box">' . DOKU_LF; print $this->p_sidebar_xhtml($group_sb, $pos, $subst) . DOKU_LF; print '</div>' . DOKU_LF; } } break; case 'toolbox': $actions = array('admin', 'edit', 'history', 'recent', 'backlink', 'subscribe', 'subscribens', 'index', 'login', 'profile'); print '<div class="toolbox_sidebar sidebar_box">' . DOKU_LF; print ' <ul>' . DOKU_LF; foreach ($actions as $action) { if (!actionOK($action)) { continue; } // start output buffering if ($action == 'edit') { // check if new page button plugin is available if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) { $npb = $npd->html_new_page_button(true); if ($npb) { print ' <li class="level1"><div class="li">'; print $npb; print '</div></li>' . DOKU_LF; } } } ob_start(); print ' <li><div class="li">'; if (tpl_actionlink($action)) { print '</div></li>' . DOKU_LF; ob_end_flush(); } else { ob_end_clean(); } } print ' </ul>' . DOKU_LF; print '</div>' . DOKU_LF; break; case 'trace': print '<div class="trace_sidebar sidebar_box">' . DOKU_LF; print ' <h1>' . $lang['breadcrumb'] . '</h1>' . DOKU_LF; print ' <div class="breadcrumbs">' . DOKU_LF; $conf['youarehere'] != 1 ? tpl_breadcrumbs() : tpl_youarehere(); print ' </div>' . DOKU_LF; print '</div>' . DOKU_LF; break; case 'extra': print '<div class="extra_sidebar sidebar_box">' . DOKU_LF; @(include dirname(__FILE__) . '/sidebar.html'); print '</div>' . DOKU_LF; break; default: // check for user defined sidebars if (@file_exists(DOKU_PLUGIN . 'sidebarng/sidebars/' . $sb . '/sidebar.php')) { print '<div class="' . $sb . '_sidebar sidebar_box">' . DOKU_LF; @(require_once DOKU_PLUGIN . 'sidebarng/sidebars/' . $sb . '/sidebar.php'); print '</div>' . DOKU_LF; } break; } // restore ID and REV $ID = $svID; $REV = $svREV; }
} ?> <?php if (empty($_SERVER['REMOTE_USER'])) { ?> <li> <span class="dw__actions dw-action-icon"> <?php $register_label = sprintf('<span class="%s">%s</span>', in_array('register', $navbar_labels) ? null : 'sr-only', $lang['btn_register']); $login_label = sprintf('<span class="%s">%s</span>', in_array('login', $navbar_labels) ? null : 'sr-only', $lang['btn_login']); $register_btn = tpl_actionlink('register', null, null, $register_label, true); $register_btn = str_replace('action', 'action btn btn-success navbar-btn', $register_btn); echo $register_btn; if (!bootstrap3_conf('hideLoginLink')) { $login_btn = tpl_actionlink('login', null, null, $login_label, true); $login_btn = str_replace('action', 'action btn btn-default navbar-btn', $login_btn); echo $login_btn; } ?> </span> </li> <?php } ?> </ul> <?php include_once dirname(__FILE__) . '/tpl_user_menu.php'; ?>
/** * Dispatches the given sidebar type to return the right content * * @author Michael Klier <*****@*****.**> */ function tpl_sidebar_dispatch($sb, $pos) { global $lang; global $conf; global $ID; global $REV; global $INFO; global $TOC; $svID = $ID; // save current ID $svREV = $REV; // save current REV $svTOC = $TOC; // save current TOC $pname = tpl_getConf('pagename'); switch ($sb) { case 'main': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } $main_sb = $pname; if (@page_exists($main_sb) && auth_quickaclcheck($main_sb) >= AUTH_READ) { $always = tpl_getConf('main_sidebar_always'); if ($always or !$always && !getNS($ID)) { print '<div class="main_sidebar sidebar_box">' . DOKU_LF; print p_sidebar_xhtml($main_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } elseif (!@page_exists($main_sb) && auth_quickaclcheck($main_sb) >= AUTH_CREATE) { if (@file_exists(DOKU_TPLINC . 'lang/' . $conf['lang'] . '/nonidebar.txt')) { $out = p_render('xhtml', p_get_instructions(io_readFile(DOKU_TPLINC . 'lang/' . $conf['lang'] . '/nosidebar.txt')), $info); } else { $out = p_render('xhtml', p_get_instructions(io_readFile(DOKU_TPLINC . 'lang/en/nosidebar.txt')), $info); } $link = '<a href="' . wl($pname) . '" class="wikilink2">' . $pname . '</a>' . DOKU_LF; print '<div class="main_sidebar sidebar_box">' . DOKU_LF; print str_replace('LINK', $link, $out); print '</div>' . DOKU_LF; } break; case 'namespace': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } $user_ns = tpl_getConf('user_sidebar_namespace'); $group_ns = tpl_getConf('group_sidebar_namespace'); if (!preg_match("/^" . $user_ns . ":.*?\$|^" . $group_ns . ":.*?\$/", $svID)) { // skip group/user sidebars and current ID $ns_sb = _getNsSb($svID); if ($ns_sb && auth_quickaclcheck($ns_sb) >= AUTH_READ) { print '<div class="namespace_sidebar sidebar_box">' . DOKU_LF; print p_sidebar_xhtml($ns_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } break; case 'user': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } $user_ns = tpl_getConf('user_sidebar_namespace'); if (isset($INFO['userinfo']['name'])) { $user = $_SERVER['REMOTE_USER']; $user_sb = $user_ns . ':' . $user . ':' . $pname; if (@page_exists($user_sb)) { $subst = array('pattern' => array('/@USER@/'), 'replace' => array($user)); print '<div class="user_sidebar sidebar_box">' . DOKU_LF; print p_sidebar_xhtml($user_sb, $pos, $subst) . DOKU_LF; print '</div>'; } // check for namespace sidebars in user namespace too if (preg_match('/' . $user_ns . ':' . $user . ':.*/', $svID)) { $ns_sb = _getNsSb($svID); if ($ns_sb && $ns_sb != $user_sb && auth_quickaclcheck($ns_sb) >= AUTH_READ) { print '<div class="namespace_sidebar sidebar_box">' . DOKU_LF; print p_sidebar_xhtml($ns_sb, $pos) . DOKU_LF; print '</div>' . DOKU_LF; } } } break; case 'group': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } $group_ns = tpl_getConf('group_sidebar_namespace'); if (isset($INFO['userinfo']['name'], $INFO['userinfo']['grps'])) { foreach ($INFO['userinfo']['grps'] as $grp) { $group_sb = $group_ns . ':' . $grp . ':' . $pname; if (@page_exists($group_sb) && auth_quickaclcheck(cleanID($group_sb)) >= AUTH_READ) { $subst = array('pattern' => array('/@GROUP@/'), 'replace' => array($grp)); print '<div class="group_sidebar sidebar_box">' . DOKU_LF; print p_sidebar_xhtml($group_sb, $pos, $subst) . DOKU_LF; print '</div>' . DOKU_LF; } } } break; case 'index': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } print '<div class="index_sidebar sidebar_box">' . DOKU_LF; print ' ' . p_index_xhtml($svID, $pos) . DOKU_LF; print '</div>' . DOKU_LF; break; case 'toc': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } if (auth_quickaclcheck($svID) >= AUTH_READ) { $toc = tpl_toc(true); // replace ids to keep XHTML compliance if (!empty($toc)) { $toc = preg_replace('/id="(.*?)"/', 'id="sb__' . $pos . '__\\1"', $toc); print '<div class="toc_sidebar sidebar_box">' . DOKU_LF; print $toc; print '</div>' . DOKU_LF; } } break; case 'toolbox': if (tpl_getConf('hideactions') && !isset($_SERVER['REMOTE_USER'])) { return; } if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { print '<div class="toolbox_sidebar sidebar_box">' . DOKU_LF; print ' <div class="level1">' . DOKU_LF; print ' <ul>' . DOKU_LF; print ' <li><div class="li">'; tpl_actionlink('login'); print ' </div></li>' . DOKU_LF; print ' </ul>' . DOKU_LF; print ' </div>' . DOKU_LF; print '</div>' . DOKU_LF; } else { $actions = array('admin', 'revert', 'edit', 'history', 'recent', 'backlink', 'subscription', 'index', 'login', 'profile', 'top'); print '<div class="toolbox_sidebar sidebar_box">' . DOKU_LF; print ' <div class="level1">' . DOKU_LF; print ' <ul>' . DOKU_LF; foreach ($actions as $action) { if (!actionOK($action)) { continue; } // start output buffering if ($action == 'edit') { // check if new page button plugin is available if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) { $npb = $npd->html_new_page_button(true); if ($npb) { print ' <li><div class="li">'; print $npb; print '</div></li>' . DOKU_LF; } } } ob_start(); print ' <li><div class="li">'; if (tpl_actionlink($action)) { print '</div></li>' . DOKU_LF; ob_end_flush(); } else { ob_end_clean(); } } print ' </ul>' . DOKU_LF; print ' </div>' . DOKU_LF; print '</div>' . DOKU_LF; } break; case 'trace': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } print '<div class="trace_sidebar sidebar_box">' . DOKU_LF; print ' <h1>' . $lang['breadcrumb'] . '</h1>' . DOKU_LF; print ' <div class="breadcrumbs">' . DOKU_LF; $conf['youarehere'] != 1 ? tpl_breadcrumbs() : tpl_youarehere(); print ' </div>' . DOKU_LF; print '</div>' . DOKU_LF; break; case 'extra': if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } print '<div class="extra_sidebar sidebar_box">' . DOKU_LF; @(include dirname(__FILE__) . '/' . $pos . '_sidebar.html'); print '</div>' . DOKU_LF; break; default: if (tpl_getConf('closedwiki') && !isset($_SERVER['REMOTE_USER'])) { return; } // check for user defined sidebars if (@file_exists(DOKU_TPLINC . 'sidebars/' . $sb . '/sidebar.php')) { print '<div class="' . $sb . '_sidebar sidebar_box">' . DOKU_LF; @(require_once DOKU_TPLINC . 'sidebars/' . $sb . '/sidebar.php'); print '</div>' . DOKU_LF; } break; } // restore ID, REV and TOC $ID = $svID; $REV = $svREV; $TOC = $svTOC; }
tpl_searchform(); ?> <ul> <li><?php tpl_actionlink('login'); ?> </li> <?php if ($user) { ?> <li><?php tpl_actionlink('profile'); ?> </li> <li><?php tpl_actionlink('admin'); ?> </li> <?php } ?> </ul> </div> <?php writeMBPortlet($monobook['copyright'], 'copyright', '', 'smallGreyListText'); ?> <!--Copyright--> </body> </html>
?> </li> <li> <?php tpl_pagelink($myDefaultPageAbout); ?> </li> <li> <?php tpl_pagelink($myDefaultPageContact); ?> </li> <li> <?php tpl_pagelink($myDefaultPagePrivacyPolice); ?> </li> <li> <?php tpl_actionlink('index'); ?> </li> <li> <?php $url = parse_url(DOKU_URL); $server = $url['host']; if (!empty($url['port'])) { $server .= ':' . $url['port']; } $server .= $url['path']; echo '<a href="' . DOKU_URL . '" title="Visit ' . DOKU_URL . '" >' . $server . ' </a>'; ?> </li> <li> <a target="_blank" href="<?php echo DOKU_BASE; ?>
echo " | "; tpl_actionlink("subscribe"); } if ((!empty($INFO["writable"]) || !empty($INFO["isadmin"]) || !empty($INFO["ismanager"])) && actionOK("media") && function_exists("media_managerURL")) { //new media manager is available on DokuWiki releases newer than 2011-05-25a "Rincewind" / since 2011-11-10 "Angua" RC1 echo " | "; tpl_actionlink("media"); } if (!empty($INFO["isadmin"]) || !empty($INFO["ismanager"])) { echo " | "; tpl_actionlink("admin"); } if (!empty($loginname) && actionOK("profile")) { //check if action is disabled echo " | "; tpl_actionlink("profile"); } echo " ]"; } else { echo " "; } ?> </div> <div class="clearer"></div> <div id="tmpl_footer_metainfo"> <!-- You are NOT allowed to remove the following prsnl10 and/or DokuWiki link/notice. Please respect this! --> <a href="http://andreas-haerter.com/" target="_blank">prsnl10</a> on <a href="http://www.dokuwiki.org/" target="_blank">DW</a> under the hood <?php if (!empty($INFO["exists"]) && tpl_getConf("prsnl10_showpageinfo")) { echo "  |  "; tpl_pageinfo();
break; } ?> </div> <div class="bar-right"> <?php switch (tpl_getConf('wiki_actionlinks')) { case 'buttons': tpl_button('backlink'); tpl_button('subscription'); tpl_button('top'); break; case 'links': tpl_actionlink('backlink'); tpl_actionlink('subscription'); tpl_actionlink('top'); break; } ?> </div> </div> <div class="clearer"></div> <?php } ?> <?php } ?> <?php } ?>
/** * prints a horizontal navigation bar (composed of <li> items and some CSS tricks) * with the current active item highlited */ function tpl_tabnavi() { global $ID; global $ACT; $buttons = array(); parse_str(tpl_getConf('navbar_buttons'), $buttons); echo "<ul>\n"; foreach ($buttons as $title => $pagename) { echo '<li'; if (strcasecmp($ID, $pagename) == 0 && $ACT == 'show') { echo ' id="current"><div id="current_inner">' . $title . '</div>'; } else { echo '> '; tpl_link(wl($pagename), $title); } echo "</li>\n"; } //always add link to recent page, unless $action id already 'recent' if (tpl_getConf('navbar_recent')) { if ($ACT == 'recent') { echo '<li id="current"><div id="current_inner">' . tpl_getConf('navbar_recent') . '</div></li> '; } else { echo '<li>'; tpl_actionlink('recent', '', '', tpl_getConf('navbar_recent')); echo "</li> \n"; } } echo "</ul>\n"; }