Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dokuwiki: how can I hide media manager link from non logged in users

Tags:

dokuwiki

In dokuwiki how can I hide "media manager" link or any other link on the top, from non logged in users?

like image 840
sivann Avatar asked Mar 23 '13 17:03

sivann


3 Answers

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
                }
            ?>
like image 65
sivann Avatar answered Nov 04 '22 01:11

sivann


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.

like image 3
Qeole Avatar answered Nov 04 '22 02:11

Qeole


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)
                ));
             }
like image 2
escobrice Avatar answered Nov 04 '22 01:11

escobrice