" .
- "
"; - $s .= "escapeLocalURL() . "\">"; - $s .= "" . wfMsg( "sitetitle" ) . ""; + $s .= ' | '; + $s .= ''; + $s .= '' . wfMsg( 'sitetitle' ) . ''; - $s .= " | "; + $s .= ' | '; $s .= $this->sysLinks(); - $s .= " |
"; + $s .= ' | |||
'; - $s .= ""; - $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . ""; - $s .= " | " ; + $s .= ''; + $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . ''; + $s .= ' | ';
- $s .= "" ;
- $s .= str_replace ( " " , "" , $this->otherLanguages() ); - $cat = $this->getCategoryLinks(); - if( $cat ) $s .= " $cat\n"; - $s .= " " . $this->pageTitleLinks(); - $s .= ""; + $s .= ''; + $s .= str_replace( ' ', '', $this->otherLanguages() ); + $cat = $this->getSkin()->getCategoryLinks(); + if( $cat ) { + $s .= " $cat\n"; + } + $s .= ' ' . $this->pageTitleLinks(); + $s .= ''; $s .= " |
";
- $notice = wfGetSiteNotice();
+ $notice = $this->getSkin()->getSiteNotice();
if( $notice ) {
$s .= "\n
$notice
\n";
}
@@ -65,128 +95,124 @@ class SkinCologneBlue extends Skin {
return $s;
}
- function doAfterContent()
- {
- global $wgOut;
+ function doAfterContent(){
+ global $wgLang;
$s = "\n\n"; $s .= "\n
";
- $s .= "
"; + $s .= ' | ';
$s .= $this->bottomLinks();
- $s .= "\n " . $this->makeKnownLink( wfMsgForContent( "mainpage" ) ) . " | " - . $this->aboutLink() . " | " - . $this->searchForm( wfMsg( "qbfind" ) ); + $s .= $wgLang->pipeList( array( + "\n " . $this->getSkin()->link( + Title::newMainPage(), + null, + array(), + array(), + array( 'known', 'noclasses' ) + ), + $this->getSkin()->aboutLink(), + $this->searchForm( wfMsg( 'qbfind' ) ) + ) ); $s .= "\n " . $this->pageStats(); - $s .= " | ";
+ $s .= '';
if ( 2 == $qb ) { # Right
$s .= $this->getQuickbarCompensator();
}
$s .= "
";
- $sep = "
"; - $s .= $this->menuHead( "qbfind" ); + $sep = '
'; + $s .= $this->menuHead( 'qbfind' ); $s .= $this->searchForm(); - $s .= $this->menuHead( "qbbrowse" ); + $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 ) { @@ -197,48 +223,51 @@ class SkinCologneBlue extends Skin { } if ( $wgOut->isArticle() ) { - $s .= $this->menuHead( "qbedit" ); - $s .= "" . $this->editThisPage() . ""; + $s .= $this->menuHead( 'qbedit' ); + $s .= '' . $this->editThisPage() . ''; - $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) ); + $s .= $sep . $this->getSkin()->linkKnown( + Title::newFromText( wfMsgForContent( 'edithelppage' ) ), + wfMsg( 'edithelp' ) + ); if( $wgUser->isLoggedIn() ) { $s .= $sep . $this->moveThisPage(); } - if ( $wgUser->isAllowed('delete') ) { + if ( $wgUser->isAllowed( 'delete' ) ) { $dtp = $this->deleteThisPage(); - if ( "" != $dtp ) { + if ( $dtp != '' ) { $s .= $sep . $dtp; } } - if ( $wgUser->isAllowed('protect') ) { + if ( $wgUser->isAllowed( 'protect' ) ) { $ptp = $this->protectThisPage(); - if ( "" != $ptp ) { + if ( $ptp != '' ) { $s .= $sep . $ptp; } } $s .= $sep; - $s .= $this->menuHead( "qbpageoptions" ); + $s .= $this->menuHead( 'qbpageoptions' ); $s .= $this->talkLink() - . $sep . $this->commentLink() - . $sep . $this->printableLink(); + . $sep . $this->commentLink() + . $sep . $this->printableLink(); if ( $wgUser->isLoggedIn() ) { $s .= $sep . $this->watchThisPage(); } $s .= $sep; - $s .= $this->menuHead("qbpageinfo") - . $this->historyLink() - . $sep . $this->whatLinksHere() - . $sep . $this->watchPageLinksLink(); + $s .= $this->menuHead( 'qbpageinfo' ) + . $this->historyLink() + . $sep . $this->whatLinksHere() + . $sep . $this->watchPageLinksLink(); if( $tns == NS_USER || $tns == NS_USER_TALK ) { - $id=User::idFromName($wgTitle->getText()); - if ($id != 0) { + $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(); } } @@ -246,70 +275,96 @@ class SkinCologneBlue extends Skin { $s .= $sep; } - $s .= $this->menuHead( "qbmyoptions" ); + $s .= $this->menuHead( 'qbmyoptions' ); if ( $wgUser->isLoggedIn() ) { - $name = $wgUser->getName(); - $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), - wfMsg( 'mytalk' ) ); + $tl = $this->getSkin()->link( + $wgUser->getTalkPage(), + wfMsg( 'mytalk' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); if ( $wgUser->getNewtalk() ) { - $tl .= " *"; + $tl .= ' *'; } - $s .= $this->makeKnownLinkObj( $wgUser->getUserPage(), - wfMsg( "mypage" ) ) - . $sep . $tl - . $sep . $this->specialLink( "watchlist" ) - . $sep . $this->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, "Contributions" ), - wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) ) - . $sep . $this->specialLink( "preferences" ) - . $sep . $this->specialLink( "userlogout" ); + $s .= $this->getSkin()->link( + $wgUser->getUserPage(), + wfMsg( 'mypage' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $tl . $sep . $this->getSkin()->specialLink( 'Watchlist' ) + . $sep . + $this->getSkin()->link( + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), + wfMsg( 'mycontris' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $this->getSkin()->specialLink( 'Preferences' ) + . $sep . $this->getSkin()->specialLink( 'Userlogout' ); } else { - $s .= $this->specialLink( "userlogin" ); + $s .= $this->getSkin()->specialLink( 'Userlogin' ); } - $s .= $this->menuHead( "qbspecialpages" ) - . $this->specialLink( "newpages" ) - . $sep . $this->specialLink( "imagelist" ) - . $sep . $this->specialLink( "statistics" ) - . $sep . $this->bugReportsLink(); - if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { - $s .= $sep . $this->specialLink( "upload" ); + $s .= $this->menuHead( 'qbspecialpages' ) + . $this->getSkin()->specialLink( 'Newpages' ) + . $sep . $this->getSkin()->specialLink( 'Listfiles' ) + . $sep . $this->getSkin()->specialLink( 'Statistics' ); + if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { + $s .= $sep . $this->getUploadLink(); } + global $wgSiteSupportPage; - if( $wgSiteSupportPage) { - $s .= $sep."" - .wfMsg( "sitesupport" ).""; + + if( $wgSiteSupportPage ) { + $s .= $sep . '' + . wfMsg( 'sitesupport' ) . ''; } - $s .= $sep . $this->makeKnownLinkObj( - Title::makeTitle( NS_SPECIAL, 'Specialpages' ), - wfMsg( 'moredotdotdot' ) ); + $s .= $sep . $this->getSkin()->link( + SpecialPage::getTitleFor( 'Specialpages' ), + wfMsg( 'moredotdotdot' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); $s .= $sep . "\n
\n";
return $s;
}
- function menuHead( $key )
- {
+ function menuHead( $key ) {
$s = "\n"; - $s .= $this->menuHead( "qbfind" ); + $sep = '
'; + $s .= $this->menuHead( 'qbfind' ); $s .= $this->searchForm(); - $s .= $this->menuHead( "qbbrowse" ); + $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 ) { @@ -197,48 +223,51 @@ class SkinCologneBlue extends Skin { } if ( $wgOut->isArticle() ) { - $s .= $this->menuHead( "qbedit" ); - $s .= "" . $this->editThisPage() . ""; + $s .= $this->menuHead( 'qbedit' ); + $s .= '' . $this->editThisPage() . ''; - $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) ); + $s .= $sep . $this->getSkin()->linkKnown( + Title::newFromText( wfMsgForContent( 'edithelppage' ) ), + wfMsg( 'edithelp' ) + ); if( $wgUser->isLoggedIn() ) { $s .= $sep . $this->moveThisPage(); } - if ( $wgUser->isAllowed('delete') ) { + if ( $wgUser->isAllowed( 'delete' ) ) { $dtp = $this->deleteThisPage(); - if ( "" != $dtp ) { + if ( $dtp != '' ) { $s .= $sep . $dtp; } } - if ( $wgUser->isAllowed('protect') ) { + if ( $wgUser->isAllowed( 'protect' ) ) { $ptp = $this->protectThisPage(); - if ( "" != $ptp ) { + if ( $ptp != '' ) { $s .= $sep . $ptp; } } $s .= $sep; - $s .= $this->menuHead( "qbpageoptions" ); + $s .= $this->menuHead( 'qbpageoptions' ); $s .= $this->talkLink() - . $sep . $this->commentLink() - . $sep . $this->printableLink(); + . $sep . $this->commentLink() + . $sep . $this->printableLink(); if ( $wgUser->isLoggedIn() ) { $s .= $sep . $this->watchThisPage(); } $s .= $sep; - $s .= $this->menuHead("qbpageinfo") - . $this->historyLink() - . $sep . $this->whatLinksHere() - . $sep . $this->watchPageLinksLink(); + $s .= $this->menuHead( 'qbpageinfo' ) + . $this->historyLink() + . $sep . $this->whatLinksHere() + . $sep . $this->watchPageLinksLink(); if( $tns == NS_USER || $tns == NS_USER_TALK ) { - $id=User::idFromName($wgTitle->getText()); - if ($id != 0) { + $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(); } } @@ -246,70 +275,96 @@ class SkinCologneBlue extends Skin { $s .= $sep; } - $s .= $this->menuHead( "qbmyoptions" ); + $s .= $this->menuHead( 'qbmyoptions' ); if ( $wgUser->isLoggedIn() ) { - $name = $wgUser->getName(); - $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), - wfMsg( 'mytalk' ) ); + $tl = $this->getSkin()->link( + $wgUser->getTalkPage(), + wfMsg( 'mytalk' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); if ( $wgUser->getNewtalk() ) { - $tl .= " *"; + $tl .= ' *'; } - $s .= $this->makeKnownLinkObj( $wgUser->getUserPage(), - wfMsg( "mypage" ) ) - . $sep . $tl - . $sep . $this->specialLink( "watchlist" ) - . $sep . $this->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, "Contributions" ), - wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) ) - . $sep . $this->specialLink( "preferences" ) - . $sep . $this->specialLink( "userlogout" ); + $s .= $this->getSkin()->link( + $wgUser->getUserPage(), + wfMsg( 'mypage' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $tl . $sep . $this->getSkin()->specialLink( 'Watchlist' ) + . $sep . + $this->getSkin()->link( + SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), + wfMsg( 'mycontris' ), + array(), + array(), + array( 'known', 'noclasses' ) + ) . $sep . $this->getSkin()->specialLink( 'Preferences' ) + . $sep . $this->getSkin()->specialLink( 'Userlogout' ); } else { - $s .= $this->specialLink( "userlogin" ); + $s .= $this->getSkin()->specialLink( 'Userlogin' ); } - $s .= $this->menuHead( "qbspecialpages" ) - . $this->specialLink( "newpages" ) - . $sep . $this->specialLink( "imagelist" ) - . $sep . $this->specialLink( "statistics" ) - . $sep . $this->bugReportsLink(); - if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { - $s .= $sep . $this->specialLink( "upload" ); + $s .= $this->menuHead( 'qbspecialpages' ) + . $this->getSkin()->specialLink( 'Newpages' ) + . $sep . $this->getSkin()->specialLink( 'Listfiles' ) + . $sep . $this->getSkin()->specialLink( 'Statistics' ); + if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { + $s .= $sep . $this->getUploadLink(); } + global $wgSiteSupportPage; - if( $wgSiteSupportPage) { - $s .= $sep."" - .wfMsg( "sitesupport" ).""; + + if( $wgSiteSupportPage ) { + $s .= $sep . '' + . wfMsg( 'sitesupport' ) . ''; } - $s .= $sep . $this->makeKnownLinkObj( - Title::makeTitle( NS_SPECIAL, 'Specialpages' ), - wfMsg( 'moredotdotdot' ) ); + $s .= $sep . $this->getSkin()->link( + SpecialPage::getTitleFor( 'Specialpages' ), + wfMsg( 'moredotdotdot' ), + array(), + array(), + array( 'known', 'noclasses' ) + ); $s .= $sep . "\n
" . wfMsg( $key ) . "
"; return $s; } - function searchForm( $label = "" ) - { - global $wgRequest; + function searchForm( $label = '' ) { + global $wgRequest, $wgUseTwoButtonsSearchForm; $search = $wgRequest->getText( 'search' ); - $action = $this->escapeSearchLink(); - $s = ""; + $s .= "searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\"" + . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />" + . "searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( 'searcharticle' ) ) . "\" />"; + + if( $wgUseTwoButtonsSearchForm ) { + $s .= "searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( 'search' ) ) . "\" />\n"; + } else { + $s .= '\n"; + } + + $s .= ''; + + // Ensure unique id's for search boxes made after the first + $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1; return $s; } } - -?>