/**
* Cologne Blue: A nicer-looking alternative to Standard.
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
* @todo document
* @file
* @ingroup Skins
if ( 2 == $qb ) { # Right
$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[] = "/* @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[] = "/* @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[] = "/* @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, /* flip css if RTL */true );
+ $out->addInlineStyle( $style, 'flip' );
}
}
'<table width="100%" border="0" cellspacing="0" cellpadding="8"><tr>';
$s .= '<td class="top" nowrap="nowrap">';
- $s .= '<a href="' . $mainPageObj->escapeLocalURL() . '">';
+ $s .= '<a href="' . htmlspecialchars( $mainPageObj->getLocalURL() ) . '">';
$s .= '<span id="sitetitle">' . wfMsg( 'sitetitle' ) . '</span></a>';
$s .= '</td><td class="top" id="top-syslinks" width="100%">';
$s .= $this->sysLinks();
- $s .= '</td></tr><tr><td class="top-linkcollection">';
+ $s .= '</td></tr><tr><td class="top-subheader">';
$s .= '<font size="-1"><span id="sitesub">';
$s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . '</span></font>';
$s .= '<font size="-1"><span id="langlinks">';
$s .= str_replace( '<br />', '', $this->otherLanguages() );
- $cat = '<div id="catlinks" class="catlinks">' . $this->getSkin()->getCategoryLinks() . '</div>';
- if( $cat ) {
- $s .= "<br />$cat\n";
- }
+
+ $s .= $this->getSkin()->getCategories();
+
$s .= '<br />' . $this->pageTitleLinks();
$s .= '</span></font>';
$s .= "\n<div id='footer'>";
$s .= '<table width="98%" border="0" cellspacing="0"><tr>';
- $qb = $this->getSkin()->qbSetting();
- if ( 1 == $qb || 3 == $qb ) { # Left
- $s .= $this->getQuickbarCompensator();
- }
$s .= '<td class="bottom">';
$s .= $this->bottomLinks();
- $s .= $this->getSkin()->getLang()->pipeList( array(
+ $s .= $this->getSkin()->getLanguage()->pipeList( array(
"\n<br />" . Linker::link(
Title::newMainPage(),
null,
$s .= "\n<br />" . $this->pageStats();
$s .= '</td>';
- if ( 2 == $qb ) { # Right
- $s .= $this->getQuickbarCompensator();
- }
$s .= "</tr></table>\n</div>\n</div>\n";
- if ( 0 != $qb ) {
+ if ( $this->getSkin()->qbSetting() != 0 ) {
$s .= $this->quickBar();
}
return $s;
);
}
- return $this->getSkin()->getLang()->pipeList( $s );
+ return $this->getSkin()->getLanguage()->pipeList( $s );
}
/**
* @return string
*/
function quickBar(){
- $tns = $this->getSkin()->getTitle()->getNamespace();
-
$s = "\n<div id='quickbar'>";
$sep = '<br />';
$barnumber++;
}
+ $user = $this->getSkin()->getUser();
+
if ( $this->data['isarticle'] ) {
$s .= $this->menuHead( 'qbedit' );
$s .= '<strong>' . $this->editThisPage() . '</strong>';
if( $this->data['loggedin'] ) {
$s .= $sep . $this->moveThisPage();
}
- if ( $this->getSkin()->getUser()->isAllowed( 'delete' ) ) {
+ if ( $user->isAllowed( 'delete' ) ) {
$dtp = $this->deleteThisPage();
if ( $dtp != '' ) {
$s .= $sep . $dtp;
}
}
- if ( $this->getSkin()->getUser()->isAllowed( 'protect' ) ) {
+ if ( $user->isAllowed( 'protect' ) ) {
$ptp = $this->protectThisPage();
if ( $ptp != '' ) {
$s .= $sep . $ptp;
. $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 ) ) {
$s .= $this->menuHead( 'qbmyoptions' );
if ( $this->data['loggedin'] ) {
$tl = Linker::link(
- $this->getSkin()->getUser()->getTalkPage(),
+ $user->getTalkPage(),
wfMsg( 'mytalk' ),
array(),
array(),
array( 'known', 'noclasses' )
);
- if ( $this->getSkin()->getUser()->getNewtalk() ) {
+ if ( $user->getNewtalk() ) {
$tl .= ' *';
}
$s .= Linker::link(
- $this->getSkin()->getUser()->getUserPage(),
+ $user->getUserPage(),
wfMsg( 'mypage' ),
array(),
array(),
) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' )
. $sep .
Linker::link(
- SpecialPage::getSafeTitleFor( 'Contributions', $this->getSkin()->getUser()->getName() ),
+ SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ),
wfMsg( 'mycontris' ),
array(),
array(),
. Linker::specialLink( 'Newpages' )
. $sep . Linker::specialLink( 'Listfiles' )
. $sep . Linker::specialLink( 'Statistics' );
- if( UploadBase::isEnabled() && UploadBase::isAllowed( $this->getSkin()->getUser() ) === true ) {
+ if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
$s .= $sep . $this->getUploadLink();
}