class SkinVector extends SkinTemplate {
/* Functions */
+ var $skinname = $stylename = 'vector',
+ $template = 'VectorTemplate';
/**
* Initializes output page and sets up skin-specific parameters
* @param object $out Output page object to initialize
*/
public function initPage( OutputPage $out ) {
- global $wgStylePath;
+ global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
parent::initPage( $out );
- $this->skinname = 'vector';
- $this->stylename = 'vector';
- $this->template = 'VectorTemplate';
// Append skin-specific styles
$out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
$wgStylePath .
'/vector/csshover.htc")}</style><![endif]-->'
);
+ // Append common IE fixes, which perhaps should be included in all
+ // skins, but for now it seems each skin needs to include them
+ // explicitly
+ $out->addScript(
+ '<!--[if lt IE 7]><script type="' . $wgJsMimeType . '" src="' .
+ $wgStylePath .
+ '/common/IEFixes.js?' .
+ $wgStyleVersion .
+ '"></script>' .
+ '<meta http-equiv="imagetoolbar" content="no" /><![endif]-->'
+ );
}
/**
* Builds a structured array of links used for tabs and menus
* when UI is in RTL mode
*/
private function renderNavigation( $elements ) {
- global $wgContLang, $wgUseTwoButtonsSearchForm;
+ global $wgContLang, $wgVectorUseSimpleSearch, $wgStylePath;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
<div class="menu">
<ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo str_replace( ' ', ' ', htmlspecialchars( $link['text'] ) ) ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<div class="menu">
<ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['action_urls'] as $key => $link ): ?>
- <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
+ <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo str_replace( ' ', ' ', htmlspecialchars( $link['text'] ) ) ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<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 ): ?>
+ <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='fulltext' <?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?>> </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; ?> />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg( 'searcharticle' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
- <?php if ( $wgUseTwoButtonsSearchForm ): ?>
<input type="submit" name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg( 'searchbutton' ) ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
- <?php else: ?>
- <div><a href="<?php $this->text( 'searchaction' ) ?>" rel="search"><?php $this->msg( 'powersearch-legend' ) ?></a></div>
<?php endif; ?>
</form>
</div>