[Mediawiki-l] removing tabs for non-logged in users

Chris McBride mcbride at triplicate.org
Sat Apr 15 13:59:05 UTC 2006


Hello,I am attempting to customize my wiki (savorywiki.com) so that non-logged in users do not see any non-content related links. I am trying to remove the edit/view source, history, etc. tabs from the top of the pages and found instructions here - http://meta.wikimedia.org/wiki/Layout_customization - for doing so (my changes are noted below). Making these changes removed the tabs from the pages in the main namespace, but did not remove them on the Main Page or other category pages. Is there an easy way to remove these tabs from these other pages?
Thanks,
Chris
I removed the "edit" and "discussion" tabs for non-logged in users by editing the file /includes/SkinTemplate.php, changing:                 if( $this->iscontent ) {
to:               
                if( $wgUser->getId() != 0 && $this->iscontent ) {
I removed the "special page" tab by editing the file: /includes/SkinTemplate.php, changing:
 /* show special page tab */

                        $content_actions['article'] = array(
                                'class' => 'selected',
                                'text' => wfMsg('specialpage'),
                                'href' => $wgRequest->getRequestURL(), // @bug 2457, 2510
                        );to:
        /* show special page tab 

                        $content_actions['article'] = array(
                                'class' => 'selected',
                                'text' => wfMsg('specialpage'),
                                'href' => $wgRequest->getRequestURL(), // @bug 2457, 2510
                        );*/






More information about the MediaWiki-l mailing list