In dokuwiki how can I hide "media manager" link or any other link on the top, 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:
disableactions
);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)
));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With