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

Rowan Collins rowan.collins at gmail.com
Mon Aug 15 19:59:50 UTC 2005


On 14/08/05, Yongho Kim <yokima at gmail.com> wrote:
> 1. So is there a display: tag that reverts display:none;

This help? http://www.w3schools.com/css/pr_class_display.asp [Google
is your friend ;)]

> 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:
[...]
> 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

Maybe you need a "global $wgUser;" statement first - PHP requires you
to import global variables into the local scope, so it's possibly
assuming that you mean a separate, local, variable called $wgUser.

Meanwhile, there is also a function $wgUser->isLoggedIn() as a "more
legible" version of that same check.

-- 
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list