Incremented counter to force users to update their cached css. Since zwinger was...
[lhc/web/wiklou.git] / skins / CologneBlue.php
index d1ef094..969526d 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 if( !defined( 'MEDIAWIKI' ) )
-       die();
+       die( -1 );
 
 /**
  * @todo document
@@ -18,7 +18,7 @@ if( !defined( 'MEDIAWIKI' ) )
 class SkinCologneBlue extends Skin {
 
        function getStylesheet() {
-               return "common/cologneblue.css";
+               return "common/cologneblue.css?1";
        }
        function getSkinName() {
                return "cologneblue";
@@ -30,7 +30,7 @@ class SkinCologneBlue extends Skin {
                $s = "";
                $qb = $this->qbSetting();
                $mainPageObj = Title::newMainPage();
-               
+
                $s .= "\n<div id='content'>\n<div id='topbar'>" .
                  "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
 
@@ -97,7 +97,7 @@ class SkinCologneBlue extends Skin {
                if ( 0 != $qb ) { $s .= $this->quickBar(); }
                return $s;
        }
-       
+
        function doGetUserStyles() {
                global $wgOut, $wgStyleSheetPath;
                $s = parent::doGetUserStyles();
@@ -109,15 +109,20 @@ class SkinCologneBlue extends Skin {
                } else if ( 1 == $qb ) {
                        $s .= "#quickbar { position: absolute; left: 4px; }\n" .
                          "#article { margin-left: 148px; margin-right: 4px; }\n";
-               } else if ( 3 == $qb ) { # Floating
+               } 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");
@@ -126,10 +131,10 @@ class SkinCologneBlue extends Skin {
                $rt = $wgTitle->getPrefixedURL();
                if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
                        $q = "";
-               } else { 
-                       $q = "returnto={$rt}"; 
+               } else {
+                       $q = "returnto={$rt}";
                }
-               
+
                $s = "" .
                  $this->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) )
                  . " | " .
@@ -167,7 +172,7 @@ class SkinCologneBlue extends Skin {
 
        /**
         * Compute the sidebar
-        * @private
+        * @access private
         */
        function quickBar()
        {
@@ -183,6 +188,17 @@ class SkinCologneBlue extends Skin {
 
                $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 .= "<a href=\"{$link['href']}\">" .
+                                       htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                       }
+               }
+
                if ( $wgOut->isArticle() ) {
                        $s .= $this->menuHead( "qbedit" );
                        $s .= "<strong>" . $this->editThisPage() . "</strong>";
@@ -208,7 +224,7 @@ class SkinCologneBlue extends Skin {
 
                        $s .= $this->menuHead( "qbpageoptions" );
                        $s .= $this->talkLink()
-                         . $sep . $this->commentLink() 
+                         . $sep . $this->commentLink()
                          . $sep . $this->printableLink();
                        if ( $wgUser->isLoggedIn() ) {
                                $s .= $sep . $this->watchThisPage();
@@ -220,7 +236,7 @@ class SkinCologneBlue extends Skin {
                          . $this->historyLink()
                          . $sep . $this->whatLinksHere()
                          . $sep . $this->watchPageLinksLink();
-                         
+
                        if( $tns == NS_USER || $tns == NS_USER_TALK ) {
                                $id=User::idFromName($wgTitle->getText());
                                if ($id != 0) {
@@ -247,7 +263,7 @@ class SkinCologneBlue extends Skin {
                          . $sep . $tl
                          . $sep . $this->specialLink( "watchlist" )
                          . $sep . $this->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, "Contributions" ),
-                               wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )            
+                               wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )
                          . $sep . $this->specialLink( "preferences" )
                          . $sep . $this->specialLink( "userlogout" );
                } else {
@@ -255,9 +271,9 @@ class SkinCologneBlue extends Skin {
                }
 
                $s .= $this->menuHead( "qbspecialpages" )
-                 . $this->specialLink( "newpages" ) 
-                 . $sep . $this->specialLink( "imagelist" ) 
-                 . $sep . $this->specialLink( "statistics" ) 
+                 . $this->specialLink( "newpages" )
+                 . $sep . $this->specialLink( "imagelist" )
+                 . $sep . $this->specialLink( "statistics" )
                  . $sep . $this->bugReportsLink();
                if ( $wgUser->isLoggedIn() && $wgEnableUploads ) {
                        $s .= $sep . $this->specialLink( "upload" );
@@ -267,7 +283,7 @@ class SkinCologneBlue extends Skin {
                        $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
                              .wfMsg( "sitesupport" )."</a>";
                }
-               
+
                $s .= $sep . $this->makeKnownLinkObj(
                        Title::makeTitle( NS_SPECIAL, 'Specialpages' ),
                        wfMsg( 'moredotdotdot' ) );