/** * 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; } }
/** * Wrapper around custom template actions * * @author Anika Henke <*****@*****.**> */ function _tpl_action($type, $link = 0, $wrapper = 0) { switch ($type) { case 'discussion': if (tpl_getConf('discussionPage')) { _tpl_discussion(tpl_getConf('discussionPage'), tpl_getLang('discussion'), tpl_getLang('back_to_article'), $link, $wrapper); } break; case 'userpage': if (tpl_getConf('userPage')) { _tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper); } break; } }
/** * Wrapper around custom template actions * * @author Anika Henke <*****@*****.**> */ function _tpl_action($type, $link = 0, $wrapper = 0, $return = 0) { switch ($type) { case 'discussion': if (tpl_getConf('discussionPage')) { $output = _tpl_discussion(tpl_getConf('discussionPage'), tpl_getLang('discussion'), tpl_getLang('back_to_article'), $link, $wrapper, 1); if ($return) { return $output; } echo $output; } break; case 'userpage': if (tpl_getConf('userPage')) { $output = _tpl_userpage(tpl_getConf('userPage'), tpl_getLang('userpage'), $link, $wrapper, 1); if ($return) { return $output; } echo $output; } break; } }
echo tpl_getLang('user_tools'); ?> </h3> <ul> <?php /* the optional second parameter of tpl_action() switches between a link and a button, e.g. a button inside a <li> would be: tpl_action('edit',0,'li') */ if ($_SERVER['REMOTE_USER']) { echo '<li class="user">'; tpl_userinfo(); /* 'Logged in as ...' */ echo '</li>'; } tpl_action('admin', 1, 'li'); if (tpl_getConf('userNS')) { _tpl_userpage(tpl_getConf('userNS'), 1, 'li'); } tpl_action('profile', 1, 'li'); tpl_action('login', 1, 'li'); ?> </ul> </div> <?php } ?> <!-- SITE TOOLS --> <div id="dokuwiki__sitetools"> <h3 class="a11y"><?php echo tpl_getLang('site_tools'); ?>