From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- skins/CologneBlue.php | 315 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 315 insertions(+) create mode 100644 skins/CologneBlue.php (limited to 'skins/CologneBlue.php') diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php new file mode 100644 index 00000000..b5f7c917 --- /dev/null +++ b/skins/CologneBlue.php @@ -0,0 +1,315 @@ +qbSetting(); + $mainPageObj = Title::newMainPage(); + + $s .= "\n
\n
" . + ""; + + $s .= "
"; + $s .= "escapeLocalURL() . "\">"; + $s .= "" . wfMsg( "sitetitle" ) . ""; + + $s .= ""; + $s .= $this->sysLinks(); + $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 .= "
\n"; + + $s .= "\n
\n
"; + + $notice = wfGetSiteNotice(); + if( $notice ) { + $s .= "\n
$notice
\n"; + } + $s .= $this->pageTitle(); + $s .= $this->pageSubtitle() . "\n"; + return $s; + } + + function doAfterContent() + { + global $wgOut; + + $s = "\n

\n"; + + $s .= "\n\n
\n"; + + if ( 0 != $qb ) { $s .= $this->quickBar(); } + return $s; + } + + function doGetUserStyles() { + global $wgOut; + $s = parent::doGetUserStyles(); + $qb = $this->qbSetting(); + + if ( 2 == $qb ) { # Right + $s .= "#quickbar { position: absolute; right: 4px; }\n" . + "#article { margin-left: 4px; margin-right: 148px; }\n"; + } else if ( 1 == $qb ) { + $s .= "#quickbar { position: absolute; left: 4px; }\n" . + "#article { margin-left: 148px; margin-right: 4px; }\n"; + } else if ( 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 + } else if ( 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; + } + + function sysLinks() { + global $wgUser, $wgContLang, $wgTitle; + $li = $wgContLang->specialPage("Userlogin"); + $lo = $wgContLang->specialPage("Userlogout"); + + $rt = $wgTitle->getPrefixedURL(); + if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { + $q = ""; + } else { + $q = "returnto={$rt}"; + } + + $s = "" . + $this->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ) + . " | " . + $this->specialLink( "specialpages" ) . " | "; + + if ( $wgUser->isLoggedIn() ) { + $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q ); + } else { + $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q ); + } + + /* show links to different language variants */ + global $wgDisableLangConversion; + $variants = $wgContLang->getVariants(); + if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) { + $actstr = ''; + foreach( $variants as $code ) { + $varname = $wgContLang->getVariantname( $code ); + if( $varname == 'disable' ) + continue; + $s .= ' | ' . $varname . ''; + } + } + + return $s; + } + + /** + * Compute the sidebar + * @access private + */ + function quickBar() + { + global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads; + + $tns=$wgTitle->getNamespace(); + + $s = "\n
"; + + $sep = "
"; + $s .= $this->menuHead( "qbfind" ); + $s .= $this->searchForm(); + + $s .= $this->menuHead( "qbbrowse" ); + + # Use the first heading from the Monobook sidebar as the "browse" section + $bar = $this->buildSidebar(); + $browseLinks = reset( $bar ); + + foreach ( $browseLinks as $link ) { + if ( $link['text'] != '-' ) { + $s .= "" . + htmlspecialchars( $link['text'] ) . '' . $sep; + } + } + + if ( $wgOut->isArticle() ) { + $s .= $this->menuHead( "qbedit" ); + $s .= "" . $this->editThisPage() . ""; + + $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) ); + + if( $wgUser->isLoggedIn() ) { + $s .= $sep . $this->moveThisPage(); + } + if ( $wgUser->isAllowed('delete') ) { + $dtp = $this->deleteThisPage(); + if ( "" != $dtp ) { + $s .= $sep . $dtp; + } + } + if ( $wgUser->isAllowed('protect') ) { + $ptp = $this->protectThisPage(); + if ( "" != $ptp ) { + $s .= $sep . $ptp; + } + } + $s .= $sep; + + $s .= $this->menuHead( "qbpageoptions" ); + $s .= $this->talkLink() + . $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(); + + if( $tns == NS_USER || $tns == NS_USER_TALK ) { + $id=User::idFromName($wgTitle->getText()); + if ($id != 0) { + $s .= $sep . $this->userContribsLink(); + if( $this->showEmailUser( $id ) ) { + $s .= $sep . $this->emailUserLink(); + } + } + } + $s .= $sep; + } + + $s .= $this->menuHead( "qbmyoptions" ); + if ( $wgUser->isLoggedIn() ) { + $name = $wgUser->getName(); + $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), + wfMsg( 'mytalk' ) ); + if ( $wgUser->getNewtalk() ) { + $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" ); + } else { + $s .= $this->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" ); + } + global $wgSiteSupportPage; + if( $wgSiteSupportPage) { + $s .= $sep."" + .wfMsg( "sitesupport" ).""; + } + + $s .= $sep . $this->makeKnownLinkObj( + Title::makeTitle( NS_SPECIAL, 'Specialpages' ), + wfMsg( 'moredotdotdot' ) ); + + $s .= $sep . "\n
\n"; + return $s; + } + + function menuHead( $key ) + { + $s = "\n
" . wfMsg( $key ) . "
"; + return $s; + } + + function searchForm( $label = "" ) + { + global $wgRequest; + + $search = $wgRequest->getText( 'search' ); + $action = $this->escapeSearchLink(); + $s = "
"; + if ( "" != $label ) { $s .= "{$label}: "; } + + $s .= "" + . "
"; + + return $s; + } +} + +?> -- cgit v1.2.3-54-g00ecf