***SORRY*** new preference to disable "jump to" links (forgive my sin oh lord [brion...
[lhc/web/wiklou.git] / skins / Standard.php
index 44c1a4f..9e20e1a 100644 (file)
@@ -40,6 +40,9 @@ class SkinStandard extends Skin {
                if ( 3 == $this->qbSetting() ) { # Floating left
                        $s .= "<style type='text/css'>\n" .
                          "@import '{$wgStylePath}/common/quickbar.css';\n</style>\n";
+               } else if ( 4 == $this->qbSetting() ) { # Floating right        
+                       $s .= "<style type='text/css'>\n" .
+                         "@import '{$wgStylePath}/common/quickbar-right.css';\n</style>\n";
                }
                $s .= parent::getUserStyles();
                return $s;
@@ -62,7 +65,10 @@ class SkinStandard extends Skin {
                        $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
                          "border-right: 1px solid gray; }\n" .
                          "#article { margin-left: 152px; margin-right: 4px; }\n";
-               }
+               } else if ( 4 == $qb) {
+                       $s .= "#quickbar { border-right: 1px solid gray; }\n" .
+                         "#article { margin-right: 152px; margin-left: 4px; }\n";
+               }       
                return $s;
        }
 
@@ -132,7 +138,7 @@ class SkinStandard extends Skin {
 
        function quickBar() {
                global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgContLang;
-               global $wgEnableUploads, $wgRemoteUploads, $wgNavigationLinks;
+               global $wgEnableUploads, $wgRemoteUploads;
 
                $fname =  'Skin::quickBar';
                wfProfileIn( $fname );
@@ -145,17 +151,18 @@ class SkinStandard extends Skin {
                $s .= "\n" . $this->logoText() . "\n<hr class='sep' />";
 
                $sep = "\n<br />";
-
-               foreach ( $wgNavigationLinks as $link ) {
-                       $msg = wfMsgForContent( $link['href'] );
-                       $text = wfMsg( $link['text'] );
-                       if ( $msg != '-' && $text != '-' ) {
-                               $s .= '<a href="' . $this->makeInternalOrExternalUrl( $msg ) . '">' .
-                                       htmlspecialchars( $text ) . '</a>' . $sep;
+               
+               # 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( $wgUser->isLoggedIn() ) {
                        $s.= $this->specialLink( 'watchlist' ) ;
                        $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),