<?php
/**
- * See skin.doc
+ * See skin.txt
*
* @todo document
* @package MediaWiki
} 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 quickBar()
{
- global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads, $wgNavigationLinks;
+ global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads;
$tns=$wgTitle->getNamespace();
$s .= $this->menuHead( "qbbrowse" );
- 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 ( $wgOut->isArticle() ) {
$s .= $this->menuHead( "qbedit" );
$s .= "<strong>" . $this->editThisPage() . "</strong>";