GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing www.mediawiki.org — User:Subfader/Hide page tabs - MediaWiki This page describes how to hide page tabs. Some of the instructions may not work for your wiki. Use with caution. GenerallyThe following needs to be added to your MediaWiki:Common.css or your personal user css. No tab on all pages
No tab per namespaceThis hides the discussion tab for all pages on the Help namespace. Therefore you need to find out which number the desired namespace has.
The listing is found here: Help:Namespace#List of namespaces. Alternatively, check the source code of a page and scroll down to the body tag (it's stated in the body class). For the Help namespace it's the css class "ns-12": .ns-12 #ca-talk { display: none !important; }
No tab per page nameThis hides the [discussion] tab on certain pages. To find the page title for the css code; check the source code of your desired page and scroll down to the body tag (it's stated in the body class). .page-Help_Contents #ca-talk { display: none !important; }
Your Main Page title may be customized and not be "page-Main_Page". By Conditional clausesThis describes how to hide certain tabs for certain user group. Add the below coding to the end of the skin's head (e.g. Monobook.php above No tabs for certain pagesThis hides the [view source] tab on protected pages. <!-- No [view source] tab on protected pages -->
<?php global $wgTitle; if( $wgTitle->isProtected('edit') ) { ?>
<style type="text/css">
#ca-viewsource { display: none !important; }
</style>
<?php } ?>
No tabs for certain usersThis hides the [view source] tab for anonymous users. This makes sense if you have disabled editing for anonymous users. <!-- No [view source] tab for anonymous users -->
<?php global $wgUser; if( $wgUser->isAnon() ) { ?>
<style type="text/css">
#ca-viewsource { display: none !important; }
</style>
<?php } ?>
This hides the [view source] tab for users who are not allowed to edit pages. The user right <!-- No [view source] tab for users who can not edit -->
<?php global $wgUser; if( !$wgUser->isAllowed('edit') ) { ?>
<style type="text/css">
#ca-viewsource { display: none !important; }
</style>
<?php } ?>
In combinationThis hides the [view source] tab on protected pages to users who are not allowed to delete pages. <!-- No [view source] tab on protected pages for users who can not delete -->
<?php global $wgTitle, $wgUser; if( $wgTitle->isProtected('edit') && !$wgUser->isAllowed('delete') ) { ?>
<style type="text/css">
#ca-viewsource { display: block!important; }
</style>
<?php } ?>
Notes
See alsoExternal links | ||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |