Monday, March 22, 2010

Remove 'My Talk' and User Page in Mediawiki

1. Find the file 'includes/SkinTemplate.php'

2. Search for the function "function buildPersonalUrls()"

3. Comment out accordingly, i.e.

/*$personal_urls['userpage'] = array(
'text' => $this->username,
'href' => &$this->userpageUrlDetails['href'],
'class' => $this->userpageUrlDetails['exists']?false:'new',
'active' => ( $this->userpageUrlDetails['href'] == $pageurl )
);*/
$usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage);
/*$personal_urls['mytalk'] = array(
'text' => wfMsg('mytalk'),
'href' => &$usertalkUrlDetails['href'],
'class' => $usertalkUrlDetails['exists']?false:'new',
'active' => ( $usertalkUrlDetails['href'] == $pageurl )
);*/
$href = self::makeSpecialUrl( 'Preferences' );
$personal_urls['preferences'] = array(
'text' => wfMsg( 'mypreferences' ),
'href' => $href,
'active' => ( $href == $pageurl )
);
$href = self::makeSpecialUrl( 'Watchlist' );
$personal_urls['watchlist'] = array(
'text' => wfMsg( 'mywatchlist' ),
'href' => $href,
'active' => ( $href == $pageurl )
);

3 comments:

  1. Words fail to describe how much I love you for this.

    ReplyDelete
  2. Anonymous12:09 PM

    Thank you!

    ReplyDelete
  3. Thank you so much.

    ReplyDelete