Managing Tab Controls (Talk, Edit, etc.)

From Zanecorpwiki

Jump to: navigation, search

This is not necessary for later versions of MediaWiki. (=> 1.15.1?)

The tab controls at the top (in monobook at least) of the content area have ids, like 'ca-edit', 'ca-talk', etc. Look at the source, or better yet, use Firebug to figure out what they are.

Once you've done that, you can edit the CSS files. If you only care about (or lock users down to) monobook, then go into 'skins/monobook/main.css' and find the stylings for the controls. add in:

display: none;

Note that, as of 1.13.4, there is (AFAIK) no good way to disable some of this stuff. For instance, the discussion/talk feature can't be turned off. It is possible to require login to edit MediaWiki, and doing so will actually cause the right thing to happen in recent versions of MediaWiki.[notes 1]

To conditionally hide these, you'll need to add some style in the head. Right before the close of the element in the relevant style page, such as Monobook.php:

<?php if (!$this-data['loggedin']) { ?>
  style media=screen type=text/css!--
    li#ca-edit, .editsection { display: none; }
  --/style
<?php } ?>


Notes

  1. True as of 1.13.4. In 1.9.4, it was necessary to conditionally hide based on logged in status.