dokuwiki: how can I hide media manager link from non logged in users
one way is changing the template like this: in /lib/tpl/dokuwiki/tpl_header.php:
<?php
if ($INFO['isadmin']) {
tpl_action('recent', 1, 'li'); //recent changes
tpl_action('media', 1, 'li'); //media manager
tpl_action('index', 1, 'li'); //sitemap
}
?>
Not exactly what you're looking for (and maybe a bit late anyway), but here's a way to disable the Media Manager
link for all (including logged-in) users:
- go to admin panel, Configuration Settings;
- search for Disable DokuWiki actions (option name:
disableactions
); - in Other actions, add keyword
media
(see reference here).
Note that this will hide the link for everyone, but users with writing access can still launch the media manager by clicking on corresponding button when editing pages.
If no user is logged, $INFO["userinfo"] is empty
in /lib/tpl/dokuwiki/tpl_header.php replace
tpl_toolsevent('sitetools', array(
tpl_action('recent', true, 'li', true),
tpl_action('media', true, 'li', true),
tpl_action('index', true, 'li', true)
));
with
if(!empty($INFO["userinfo"])) {
tpl_toolsevent('sitetools', array(
tpl_action('recent', true, 'li', true),
tpl_action('media', true, 'li', true),
tpl_action('index', true, 'li', true)
));
}