$notice
\n";
}
@@ -65,6 +97,9 @@ class SkinCologneBlue extends Skin {
return $s;
}
+ /**
+ * @return string
+ */
function doAfterContent(){
global $wgLang;
@@ -73,22 +108,22 @@ class SkinCologneBlue extends Skin {
$s .= "\n";
$s .= '
'; + $s .= ' | ';
$s .= $this->bottomLinks();
$s .= $wgLang->pipeList( array(
- "\n " . $this->link( + "\n " . Linker::link( Title::newMainPage(), null, array(), array(), array( 'known', 'noclasses' ) ), - $this->aboutLink(), + $this->getSkin()->aboutLink(), $this->searchForm( wfMsg( 'qbfind' ) ) ) ); @@ -106,36 +141,15 @@ class SkinCologneBlue extends Skin { return $s; } - function reallyGenerateUserStylesheet() { - $s = parent::reallyGenerateUserStylesheet(); - $qb = $this->qbSetting(); - - if ( 2 == $qb ) { # Right - $s .= "#quickbar { position: absolute; right: 4px; }\n" . - "#article { margin-left: 4px; margin-right: 148px; }\n"; - } elseif ( 1 == $qb ) { - $s .= "#quickbar { position: absolute; left: 4px; }\n" . - "#article { margin-left: 148px; margin-right: 4px; }\n"; - } elseif ( 3 == $qb ) { # Floating left - $s .= "#quickbar { position:absolute; left:4px } \n" . - "#topbar { margin-left: 148px }\n" . - "#article { margin-left:148px; margin-right: 4px; } \n" . - "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE - } elseif ( 4 == $qb ) { # Floating right - $s .= "#quickbar { position: fixed; right: 4px; } \n" . - "#topbar { margin-right: 148px }\n" . - "#article { margin-right: 148px; margin-left: 4px; } \n" . - "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE - } - return $s; - } - + /** + * @return string + */ function sysLinks() { global $wgUser, $wgLang; $li = SpecialPage::getTitleFor( 'Userlogin' ); $lo = SpecialPage::getTitleFor( 'Userlogout' ); - $rt = $this->mTitle->getPrefixedURL(); + $rt = $this->getSkin()->getTitle()->getPrefixedURL(); if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { $q = array(); } else { @@ -143,20 +157,20 @@ class SkinCologneBlue extends Skin { } $s = array( - $this->mainPageLink(), - $this->linkKnown( + $this->getSkin()->mainPageLink(), + Linker::linkKnown( Title::newFromText( wfMsgForContent( 'aboutpage' ) ), wfMsg( 'about' ) ), - $this->linkKnown( + Linker::linkKnown( Title::newFromText( wfMsgForContent( 'helppage' ) ), wfMsg( 'help' ) ), - $this->linkKnown( + Linker::linkKnown( Title::newFromText( wfMsgForContent( 'faqpage' ) ), wfMsg( 'faq' ) ), - $this->specialLink( 'specialpages' ) + Linker::specialLink( 'Specialpages' ) ); /* show links to different language variants */ @@ -167,14 +181,14 @@ class SkinCologneBlue extends Skin { $s[] = $this->extensionTabLinks(); } if ( $wgUser->isLoggedIn() ) { - $s[] = $this->linkKnown( + $s[] = Linker::linkKnown( $lo, wfMsg( 'logout' ), array(), $q ); } else { - $s[] = $this->linkKnown( + $s[] = Linker::linkKnown( $li, wfMsg( 'login' ), array(), @@ -188,11 +202,13 @@ class SkinCologneBlue extends Skin { /** * Compute the sidebar * @access private + * + * @return string */ function quickBar(){ global $wgOut, $wgUser; - $tns = $this->mTitle->getNamespace(); + $tns = $this->getSkin()->getTitle()->getNamespace(); $s = "\n ";
@@ -203,24 +219,38 @@ class SkinCologneBlue extends Skin {
$s .= $this->menuHead( 'qbbrowse' );
# Use the first heading from the Monobook sidebar as the "browse" section
- $bar = $this->buildSidebar();
+ $bar = $this->getSkin()->buildSidebar();
unset( $bar['SEARCH'] );
unset( $bar['LANGUAGES'] );
unset( $bar['TOOLBOX'] );
- $browseLinks = reset( $bar );
- foreach ( $browseLinks as $link ) {
- if ( $link['text'] != '-' ) {
- $s .= "" .
- htmlspecialchars( $link['text'] ) . '' . $sep;
+ $barnumber = 1;
+ foreach ( $bar as $heading => $browseLinks ) {
+ if ( $barnumber > 1 ) {
+ $headingMsg = wfMessage( $heading );
+ if ( $headingMsg->exists() ) {
+ $h = $headingMsg->text();
+ } else {
+ $h = $heading;
+ }
+ $s .= "\n " . htmlspecialchars( $h ) . ""; + } + if( is_array( $browseLinks ) ) { + foreach ( $browseLinks as $link ) { + if ( $link['text'] != '-' ) { + $s .= "" . + htmlspecialchars( $link['text'] ) . '' . $sep; + } + } } + $barnumber++; } if ( $wgOut->isArticle() ) { $s .= $this->menuHead( 'qbedit' ); $s .= '' . $this->editThisPage() . ''; - $s .= $sep . $this->linkKnown( + $s .= $sep . Linker::linkKnown( Title::newFromText( wfMsgForContent( 'edithelppage' ) ), wfMsg( 'edithelp' ) ); @@ -258,10 +288,10 @@ class SkinCologneBlue extends Skin { . $sep . $this->watchPageLinksLink(); if( $tns == NS_USER || $tns == NS_USER_TALK ) { - $id = User::idFromName( $this->mTitle->getText() ); + $id = User::idFromName( $this->getSkin()->getTitle()->getText() ); if( $id != 0 ) { $s .= $sep . $this->userContribsLink(); - if( $this->showEmailUser( $id ) ) { + if( $this->getSkin()->showEmailUser( $id ) ) { $s .= $sep . $this->emailUserLink(); } } @@ -271,8 +301,7 @@ class SkinCologneBlue extends Skin { $s .= $this->menuHead( 'qbmyoptions' ); if ( $wgUser->isLoggedIn() ) { - $name = $wgUser->getName(); - $tl = $this->link( + $tl = Linker::link( $wgUser->getTalkPage(), wfMsg( 'mytalk' ), array(), @@ -283,30 +312,30 @@ class SkinCologneBlue extends Skin { $tl .= ' *'; } - $s .= $this->link( + $s .= Linker::link( $wgUser->getUserPage(), wfMsg( 'mypage' ), array(), array(), array( 'known', 'noclasses' ) - ) . $sep . $tl . $sep . $this->specialLink( 'watchlist' ) + ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' ) . $sep . - $this->link( + Linker::link( SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), wfMsg( 'mycontris' ), array(), array(), array( 'known', 'noclasses' ) - ) . $sep . $this->specialLink( 'preferences' ) - . $sep . $this->specialLink( 'userlogout' ); + ) . $sep . Linker::specialLink( 'Preferences' ) + . $sep . Linker::specialLink( 'Userlogout' ); } else { - $s .= $this->specialLink( 'userlogin' ); + $s .= Linker::specialLink( 'Userlogin' ); } $s .= $this->menuHead( 'qbspecialpages' ) - . $this->specialLink( 'newpages' ) - . $sep . $this->specialLink( 'listfiles' ) - . $sep . $this->specialLink( 'statistics' ); + . Linker::specialLink( 'Newpages' ) + . $sep . Linker::specialLink( 'Listfiles' ) + . $sep . Linker::specialLink( 'Statistics' ); if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { $s .= $sep . $this->getUploadLink(); } @@ -318,7 +347,7 @@ class SkinCologneBlue extends Skin { . wfMsg( 'sitesupport' ) . ''; } - $s .= $sep . $this->link( + $s .= $sep . Linker::link( SpecialPage::getTitleFor( 'Specialpages' ), wfMsg( 'moredotdotdot' ), array(), @@ -330,16 +359,24 @@ class SkinCologneBlue extends Skin { return $s; } + /** + * @param $key string + * @return string + */ function menuHead( $key ) { $s = "\n" . wfMsg( $key ) . ""; return $s; } + /** + * @param $label string + * @return string + */ function searchForm( $label = '' ) { global $wgRequest, $wgUseTwoButtonsSearchForm; $search = $wgRequest->getText( 'search' ); - $action = $this->escapeSearchLink(); + $action = $this->data['searchaction']; $s = " |