[Mediawiki-l] Hiding p-cactions and p-personal for the general public

Yongho Kim yokima at gmail.com
Sun Aug 14 16:14:19 UTC 2005


At mnfr.org, I am trying to hide #p-cactions, #p-personal and
.editsection for the readership, so that it looks like a "normal"
website. So I hid them by using display:none; then I wish there was
something like display:show; so that I can insert it under
User:Admin/monobook.css so that when admins log in, they are able to
see those divs again.

1. So is there a display: tag that reverts display:none;

or

2. What is the IF statement within monobook.php that will return true
if the user is logged in? I googled for it on mail.wikipedia.org and
found  if($wgUser->getID()!=0) and applied it as follows:

<?php if (!($wgUser->getID()!=0)) { ?>
<style type="text/css">/*<![CDATA[*/
@import "/style/menuhide.css"; /** menuhide.css contains #p-cactions {
display:none; } etc/*
]]>*/</style><?php } ?>

but it returns

Fatal error: Call to a member function on a non-object in
/home/mpkbnet/public_html/mnfr.org/wikien/skins/MonoBook.php on line
71

Help! Thank you.

The installed MediaWiki version is 1.5beta4

yongho



More information about the MediaWiki-l mailing list