benjamin Good morning, I would like to add a new button near the login button in dokuwiki. This new button will be just a link (a kind of <a href>) which would be different if I'm logged or not. I didn't find anything about this feature, could you help me please ? Thanks a lot !
chi Edit the main.php of your template, find tpl_button('login') and add sth. like: <?php if(isset($_SERVER['REMOTE_USER'])) { ?> <a href="">if logged in</a> <?php } else { ?> <a href="">if logged out</a> <?php }>
chi benjamin wrote Thanks for your answer chi but what about creating this button ? Well, what exactly do you want to know? This question is very vague.
mcpeter Many thanks for this :) chi:1256732880 wrote Edit the main.php of your template, find tpl_button('login') and add sth. like: <?php if(isset($_SERVER['REMOTE_USER'])) { ?> <a href="">if logged in</a> <?php } else { ?> <a href="">if logged out</a> <?php }>
cdelves Hello Where abouts do we add this exactly? I am using the mmClean template, and I want a login/out button at the top menu bar...Currently I have two seperate ones, one for login one for logout Thanks :) ---- EDIT: Hello I decided to add this ( <?php tpl_button('login')?> ) to the following file: \apps\dokuwiki\htdocs\lib\tpl\mmclean\main.php - Underneat this div class: <div class="topbar"> Seems to work