$out->addScript(
'<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
htmlspecialchars( $wgLocalStylePath ) .
- '/vector/csshover.htc")}</style><![endif]-->'
+ "/{$this->stylename}/csshover.htc\")}</style><![endif]-->"
);
}
* @param $out OutputPage object
*/
function setupSkinUserCss( OutputPage $out ){
- global $wgVectorExtraStyles;
-
parent::setupSkinUserCss( $out );
-
- // Append skin-specific styles
- $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
- $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' );
-
- // Add extra stylesheets
- // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
- if ( is_array( $wgVectorExtraStyles ) ) {
- foreach ( $wgVectorExtraStyles as $style ) {
- $out->addStyle( 'vector/' . $style, 'screen' );
- }
- }
+ $out->addModuleStyles( 'skins.vector' );
}
/**
} else {
$talkId = "{$subjectId}_talk";
}
- $currentId = $isTalk ? $talkId : $subjectId;
// Adds namespace links
$links['namespaces'][$subjectId] = $this->tabAction(
- $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
+ $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true
);
$links['namespaces'][$subjectId]['context'] = 'subject';
$links['namespaces'][$talkId] = $this->tabAction(
- $talkPage, 'vector-namespace-talk', $isTalk, '', true
+ $talkPage, 'talk', $isTalk, '', true
);
$links['namespaces'][$talkId]['context'] = 'talk';
);
// Checks if this is a current rev of talk page and we should show a new
// section link
- if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {
+ if ( ( $isTalk && $wgArticle && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {
// Checks if we should ever show a new section link
if ( !$wgOut->forceHideNewSectionLink() ) {
// Adds new section link
$wgUser->isAllowed( 'deletedhistory' ) &&
$wgUser->isAllowed( 'undelete' )
) {
- if( $n = $this->mTitle->isDeleted() ) {
+ $n = $this->mTitle->isDeleted();
+ if( $n ) {
$undelTitle = SpecialPage::getTitleFor( 'Undelete' );
$links['actions']['undelete'] = array(
'class' => false,
// Checks if the user is logged in
if ( $this->loggedin ) {
if ( $wgVectorUseIconWatch ) {
- $class = 'icon ';
+ $class = 'icon';
$place = 'views';
} else {
$class = '';
} else {
$links['namespaces']['special'] = array(
'class' => 'selected',
- 'text' => wfMsg( 'vector-namespace-special' ),
+ 'text' => wfMsg( 'nstab-special' ),
'href' => $wgRequest->getRequestURL()
);
}
* Outputs the entire contents of the XHTML page
*/
public function execute() {
- global $wgRequest, $wgOut, $wgContLang;
+ global $wgRequest, $wgLang;
$this->skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
}
}
// Reverse horizontally rendered navigation elements
- if ( $wgContLang->isRTL() ) {
+ if ( $wgLang->isRTL() ) {
$this->data['view_urls'] =
array_reverse( $this->data['view_urls'] );
$this->data['namespace_urls'] =
<!-- bodyContent -->
<div id="bodyContent">
<!-- tagline -->
- <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
+ <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
<!-- /tagline -->
<!-- subtitle -->
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
<div style="clear:both"></div>
</div>
<!-- /footer -->
+ <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
<!-- fixalpha -->
<script type="<?php $this->text('jsmimetype') ?>"> if ( window.isMSIE55 ) fixalpha(); </script>
<!-- /fixalpha -->
- <?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html( 'reporttime' ) ?>
<?php if ( $this->data['debug'] ): ?>
<!-- Debug output: <?php $this->text( 'debug' ); ?> -->
<div class="body">
<ul>
<?php foreach ( $this->data['language_urls'] as $langlink ): ?>
- <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php echo $langlink['text'] ?></a></li>
+ <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>" title="<?php echo htmlspecialchars( $langlink['title'] ) ?>"><?php echo $langlink['text'] ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<div class="body">
<?php if ( is_array( $content ) ): ?>
<ul>
- <?php foreach( $content as $key => $val ): ?>
+ <?php foreach( $content as $val ): ?>
<li id="<?php echo Sanitizer::escapeId( $val['id'] ) ?>"<?php if ( $val['active'] ): ?> class="active" <?php endif; ?>><a href="<?php echo htmlspecialchars( $val['href'] ) ?>"<?php echo $this->skin->tooltipAndAccesskey( $val['id'] ) ?>><?php echo htmlspecialchars( $val['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
* when UI is in RTL mode
*/
private function renderNavigation( $elements ) {
- global $wgContLang, $wgVectorUseSimpleSearch, $wgVectorShowVariantName;
+ global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
if ( !is_array( $elements ) ) {
$elements = array( $elements );
// If there's a series of elements, reverse them when in RTL mode
- } else if ( $wgContLang->isRTL() ) {
+ } else if ( wfUILang()->isRTL() ) {
$elements = array_reverse( $elements );
}
// Render elements
<div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg('namespaces') ?></h5>
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
- <li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
+ <?php foreach ($this->data['namespace_urls'] as $link ): ?>
+ <li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
<?php endforeach; ?>
</ul>
</div>
<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<?php if ( $wgVectorShowVariantName ): ?>
<h4>
- <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ): ?>
<?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
<?php echo htmlspecialchars( $link['text'] ) ?>
<?php endif; ?>
<h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
<div class="menu">
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ( $this->data['variant_urls'] as $key => $link ): ?>
+ <?php foreach ( $this->data['variant_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
<div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg('views') ?></h5>
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ( $this->data['view_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
+ <?php foreach ( $this->data['view_urls'] as $link ): ?>
+ <li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ? '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : htmlspecialchars( $link['text'] ) ) ?></a></span></li>
<?php endforeach; ?>
</ul>
</div>
<h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
<div class="menu">
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach ($this->data['action_urls'] as $key => $link ): ?>
+ <?php foreach ($this->data['action_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
<div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg('personaltools') ?></h5>
<ul<?php $this->html('userlangattributes') ?>>
- <?php foreach($this->data['personal_urls'] as $key => $item): ?>
+ <?php foreach($this->data['personal_urls'] as $item): ?>
<li <?php echo $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
<?php endforeach; ?>
</ul>
<h5<?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
- <?php if ( $wgVectorUseSimpleSearch ): ?>
+ <?php if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?>
<div id="simpleSearch">
<input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />
- <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>> </button>
+ <button id="searchButton" type='submit' name='button' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>><img src="<?php echo $GLOBALS['wgStylePath'] . "/{$this->skin->stylename}/images/search-" . ( $GLOBALS['wgContLang']->isRTL() ? 'rtl' : 'ltr' ) . '.png?' . $GLOBALS['wgStyleVersion'] ?>" alt="<?php $this->msg( 'searchbutton' ) ?>" /></button>
</div>
<?php else: ?>
<input id="searchInput" name="search" type="text" <?php echo $this->skin->tooltipAndAccesskey( 'search' ); ?> <?php if( isset( $this->data['search'] ) ): ?> value="<?php $this->text( 'search' ) ?>"<?php endif; ?> />