?
Solved

MediaWiki Remove Sidebar When Not Logged in

Posted on 2007-10-11
2
Medium Priority
?
1,634 Views
Last Modified: 2010-11-02
I don't want the sidebar to display until after a user has logged in.

I found out how to do that with the toolbox: http://meta.wikimedia.org/wiki/Layout_customization#How_do_I_remove_the_toolbox_for_users_that_are_not_logged_in.3F

But I can't find a similar article regarding the sidebar.

Is there a way to not display the sidebar until after a user logs in to my Mediawiki 1.11.0?

Thanks.
0
Comment
Question by:gateguard
2 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 2000 total points
ID: 20080331
Hi,

You can edit the MonoBook.php skin and add an if statement around the while sidebar.

It starts with the following code around line 150
<script type="<?php $this->text('jsmimetype') ?>"> if(window.isMSIE55) fixalpha(); </script>

And ends at about line 227 - 229 with:
      </ul>
    </div>
  </div>

You can build an if statement around it like:

<script type="<?php $this->text('jsmimetype') ?>"> if(window.isMSIE55) fixalpha(); </script>
<?php if($this->data['loggedin']) { ?>
...
...
...
      </ul>
    </div>
  </div>
<?php } ?>

You can choose to include or exclude the first script statement inside the if statement. I think it is safer to have the if statement start just after the script tag.

Kind regards

-r-
0
 

Author Comment

by:gateguard
ID: 20106026
It worked.  Thank you.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question