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
On 14/08/05, Yongho Kim yokima@gmail.com wrote:
- 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 ;)]
- 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.
On 14/08/05, Yongho Kim yokima@gmail.com wrote:
- 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 ;)]
- 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.
On 14/08/05, Yongho Kim yokima@gmail.com wrote:
- 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 ;)]
- 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]
My apologies for posting this message three times - I received a bounce message each time, but it seems they had in fact reached the list... :|
On 15/08/05, Rowan Collins rowan.collins@gmail.com wrote:
On 14/08/05, Yongho Kim yokima@gmail.com wrote:
- 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 ;)]
- 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]
mediawiki-l@lists.wikimedia.org