Friday, December 15, 2006

Whacking MediaWiki's Monobook to Remove Logo

To get rid of the MediaWiki logo in the default monobook, do this.

  1. Edit skins/MonoBook.php and whack or comment out this section:
    <div class="portlet" id="p-logo">
    <a style="">text('logopath') ?>);"
    href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"
    title="<?php $this->msg('mainpage') ?>"></a>
    </div>

    This removes the logo gif and also the image hyperlink.

  2. Edit skins/monobook/main.css to change the following:
    #column-one {
    /* padding-top: 160px;*/
    padding-top: 40px
    }
    Use any value you like for the padding.

3 comments:

Jeff said...

Thanks for posting this. Very easy to modify. :)

t said...

Hmmm...my monobook code is as such:

div class="portlet" id="p-logo"
a style="background-image: url(? $this->text('logopath') ?);" echo htmlspecialchars this data['nav_urls']['mainpage']['hrf'])?"
title="$thismsg('mainpage') ?"/a /div

Brackets and some of the text removed so I can post here.


And although I do remove the monobook logo when I delete this section, it removes the formating of the page also. Any suggestions?

t said...

Hmmm...my monobook code is as such:

div class="portlet" id="p-logo"
a style="background-image: url(? $this->text('logopath') ?);" echo htmlspecialchars this data['nav_urls']['mainpage']['hrf'])?"
title="$thismsg('mainpage') ?"/a /div

Brackets and some of the text removed so I can post here.


And although I do remove the monobook logo when I delete this section, it removes the formating of the page also. Any suggestions?