X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FCologneBlue.php;h=c5b3b11d38b8262c5bf3bd0b0acd1f110c4f6203;hb=0bada1a7a511f4c64707c6acb580e78d39b5210f;hp=859db2c7946ac0685b269338b1e40f10952664e1;hpb=a0a8b770cc385891b51abd73a0e32fdfa5223c50;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index 859db2c794..c5b3b11d38 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -30,24 +30,28 @@ class SkinCologneBlue extends SkinLegacy { $rules = array(); if ( 2 == $qb ) { # Right - $rules[] = "#quickbar { position: absolute; right: 4px; }"; - $rules[] = "#article { margin-left: 4px; margin-right: 148px; }"; + $rules[] = "/* @noflip */#quickbar { position: absolute; right: 4px; }"; + $rules[] = "/* @noflip */#article { margin-left: 4px; margin-right: 148px; }"; + $rules[] = "/* @noflip */#footer { margin-right: 152px; }"; } elseif ( 1 == $qb ) { - $rules[] = "#quickbar { position: absolute; left: 4px; }"; - $rules[] = "#article { margin-left: 148px; margin-right: 4px; }"; + $rules[] = "/* @noflip */#quickbar { position: absolute; left: 4px; }"; + $rules[] = "/* @noflip */#article { margin-left: 148px; margin-right: 4px; }"; + $rules[] = "/* @noflip */#footer { margin-left: 152px; }"; } elseif ( 3 == $qb ) { # Floating left - $rules[] = "#quickbar { position:absolute; left:4px }"; - $rules[] = "#topbar { margin-left: 148px }"; - $rules[] = "#article { margin-left:148px; margin-right: 4px; }"; - $rules[] = "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;}"; # Hides from IE + $rules[] = "/* @noflip */#quickbar { position:absolute; left:4px }"; + $rules[] = "/* @noflip */#topbar { margin-left: 148px }"; + $rules[] = "/* @noflip */#article { margin-left:148px; margin-right: 4px; }"; + $rules[] = "/* @noflip */body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto; bottom:4px;}"; # Hides from IE + $rules[] = "/* @noflip */#footer { margin-left: 152px; }"; } elseif ( 4 == $qb ) { # Floating right - $rules[] = "#quickbar { position: fixed; right: 4px; }"; - $rules[] = "#topbar { margin-right: 148px }"; - $rules[] = "#article { margin-right: 148px; margin-left: 4px; }"; - $rules[] = "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;}"; # Hides from IE + $rules[] = "/* @noflip */#quickbar { position: fixed; right: 4px; }"; + $rules[] = "/* @noflip */#topbar { margin-right: 148px }"; + $rules[] = "/* @noflip */#article { margin-right: 148px; margin-left: 4px; }"; + $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE + $rules[] = "/* @noflip */#footer { margin-right: 152px; }"; } $style = implode( "\n", $rules ); - $out->addInlineStyle( $style ); + $out->addInlineStyle( $style, 'flip' ); } } @@ -64,12 +68,12 @@ class CologneBlueTemplate extends LegacyTemplate { ''; $s .= '
'; - $s .= ''; + $s .= ''; $s .= '' . wfMsg( 'sitetitle' ) . ''; $s .= '
'; + $s .= '
'; $s .= ''; $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . ''; @@ -77,10 +81,9 @@ class CologneBlueTemplate extends LegacyTemplate { $s .= ''; $s .= str_replace( '
', '', $this->otherLanguages() ); - $cat = ''; - if( $cat ) { - $s .= "
$cat\n"; - } + + $s .= $this->getSkin()->getCategories(); + $s .= '
' . $this->pageTitleLinks(); $s .= '
'; @@ -101,21 +104,15 @@ class CologneBlueTemplate extends LegacyTemplate { * @return string */ function doAfterContent(){ - global $wgLang; - $s = "\n
\n"; $s .= "\n\n\n"; - if ( 0 != $qb ) { + if ( $this->getSkin()->qbSetting() != 0 ) { $s .= $this->quickBar(); } return $s; @@ -145,7 +139,6 @@ class CologneBlueTemplate extends LegacyTemplate { * @return string */ function sysLinks() { - global $wgUser, $wgLang; $li = SpecialPage::getTitleFor( 'Userlogin' ); $lo = SpecialPage::getTitleFor( 'Userlogout' ); @@ -180,7 +173,7 @@ class CologneBlueTemplate extends LegacyTemplate { if( $this->extensionTabLinks() ) { $s[] = $this->extensionTabLinks(); } - if ( $wgUser->isLoggedIn() ) { + if ( $this->data['loggedin'] ) { $s[] = Linker::linkKnown( $lo, wfMsg( 'logout' ), @@ -196,7 +189,7 @@ class CologneBlueTemplate extends LegacyTemplate { ); } - return $wgLang->pipeList( $s ); + return $this->getSkin()->getLanguage()->pipeList( $s ); } /** @@ -206,10 +199,6 @@ class CologneBlueTemplate extends LegacyTemplate { * @return string */ function quickBar(){ - global $wgOut, $wgUser; - - $tns = $this->getSkin()->getTitle()->getNamespace(); - $s = "\n
"; $sep = '
'; @@ -235,16 +224,20 @@ class CologneBlueTemplate extends LegacyTemplate { } $s .= "\n
" . htmlspecialchars( $h ) . "
"; } - foreach ( $browseLinks as $link ) { - if ( $link['text'] != '-' ) { - $s .= "" . - htmlspecialchars( $link['text'] ) . '' . $sep; + if( is_array( $browseLinks ) ) { + foreach ( $browseLinks as $link ) { + if ( $link['text'] != '-' ) { + $s .= "" . + htmlspecialchars( $link['text'] ) . '' . $sep; + } } } $barnumber++; } - if ( $wgOut->isArticle() ) { + $user = $this->getSkin()->getUser(); + + if ( $this->data['isarticle'] ) { $s .= $this->menuHead( 'qbedit' ); $s .= '' . $this->editThisPage() . ''; @@ -253,16 +246,16 @@ class CologneBlueTemplate extends LegacyTemplate { wfMsg( 'edithelp' ) ); - if( $wgUser->isLoggedIn() ) { + if( $this->data['loggedin'] ) { $s .= $sep . $this->moveThisPage(); } - if ( $wgUser->isAllowed( 'delete' ) ) { + if ( $user->isAllowed( 'delete' ) ) { $dtp = $this->deleteThisPage(); if ( $dtp != '' ) { $s .= $sep . $dtp; } } - if ( $wgUser->isAllowed( 'protect' ) ) { + if ( $user->isAllowed( 'protect' ) ) { $ptp = $this->protectThisPage(); if ( $ptp != '' ) { $s .= $sep . $ptp; @@ -274,7 +267,7 @@ class CologneBlueTemplate extends LegacyTemplate { $s .= $this->talkLink() . $sep . $this->commentLink() . $sep . $this->printableLink(); - if ( $wgUser->isLoggedIn() ) { + if ( $this->data['loggedin'] ) { $s .= $sep . $this->watchThisPage(); } @@ -285,8 +278,10 @@ class CologneBlueTemplate extends LegacyTemplate { . $sep . $this->whatLinksHere() . $sep . $this->watchPageLinksLink(); - if( $tns == NS_USER || $tns == NS_USER_TALK ) { - $id = User::idFromName( $this->getSkin()->getTitle()->getText() ); + $title = $this->getSkin()->getTitle(); + $tns = $title->getNamespace(); + if ( $tns == NS_USER || $tns == NS_USER_TALK ) { + $id = User::idFromName( $title->getText() ); if( $id != 0 ) { $s .= $sep . $this->userContribsLink(); if( $this->getSkin()->showEmailUser( $id ) ) { @@ -298,20 +293,20 @@ class CologneBlueTemplate extends LegacyTemplate { } $s .= $this->menuHead( 'qbmyoptions' ); - if ( $wgUser->isLoggedIn() ) { + if ( $this->data['loggedin'] ) { $tl = Linker::link( - $wgUser->getTalkPage(), + $user->getTalkPage(), wfMsg( 'mytalk' ), array(), array(), array( 'known', 'noclasses' ) ); - if ( $wgUser->getNewtalk() ) { + if ( $user->getNewtalk() ) { $tl .= ' *'; } $s .= Linker::link( - $wgUser->getUserPage(), + $user->getUserPage(), wfMsg( 'mypage' ), array(), array(), @@ -319,7 +314,7 @@ class CologneBlueTemplate extends LegacyTemplate { ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' ) . $sep . Linker::link( - SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ), + SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ), wfMsg( 'mycontris' ), array(), array(), @@ -334,7 +329,7 @@ class CologneBlueTemplate extends LegacyTemplate { . Linker::specialLink( 'Newpages' ) . $sep . Linker::specialLink( 'Listfiles' ) . $sep . Linker::specialLink( 'Statistics' ); - if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) { + if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) { $s .= $sep . $this->getUploadLink(); } @@ -371,9 +366,9 @@ class CologneBlueTemplate extends LegacyTemplate { * @return string */ function searchForm( $label = '' ) { - global $wgRequest, $wgUseTwoButtonsSearchForm; + global $wgUseTwoButtonsSearchForm; - $search = $wgRequest->getText( 'search' ); + $search = $this->getSkin()->getRequest()->getText( 'search' ); $action = $this->data['searchaction']; $s = "
searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">"; if( $label != '' ) {