3 * Vector - Branch of MonoBook which has many usability improvements and
4 * somewhat cleaner code.
11 if( !defined( 'MEDIAWIKI' ) ) {
16 * SkinTemplate class for Vector skin
19 class SkinVector
extends SkinTemplate
{
22 var $skinname = 'vector', $stylename = 'vector',
23 $template = 'VectorTemplate', $useHeadElement = true;
26 * Initializes output page and sets up skin-specific parameters
27 * @param $out OutputPage object to initialize
29 public function initPage( OutputPage
$out ) {
30 global $wgLocalStylePath;
32 parent
::initPage( $out );
34 // Append CSS which includes IE only behavior fixes for hover support -
35 // this is better than including this in a CSS fille since it doesn't
36 // wait for the CSS file to load before fetching the HTC file.
38 '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
39 htmlspecialchars( $wgLocalStylePath ) .
40 "/{$this->stylename}/csshover.htc\")}</style><![endif]-->"
45 * Load skin and user CSS files in the correct order
47 * @param $out OutputPage object
49 function setupSkinUserCss( OutputPage
$out ){
50 parent
::setupSkinUserCss( $out );
51 $out->addModuleStyles( 'skins.vector' );
55 * Builds a structured array of links used for tabs and menus
59 function buildNavigationUrls() {
60 global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
61 global $wgDisableLangConversion, $wgVectorUseIconWatch;
63 wfProfileIn( __METHOD__
);
66 'namespaces' => array(),
73 $action = $wgRequest->getVal( 'action', 'view' );
74 $section = $wgRequest->getVal( 'section' );
76 // Checks if page is some kind of content
77 if( $this->iscontent
) {
78 // Gets page objects for the related namespaces
79 $subjectPage = $this->mTitle
->getSubjectPage();
80 $talkPage = $this->mTitle
->getTalkPage();
82 // Determines if this is a talk page
83 $isTalk = $this->mTitle
->isTalkPage();
85 // Generates XML IDs from namespace names
86 $subjectId = $this->mTitle
->getNamespaceKey( '' );
88 if ( $subjectId == 'main' ) {
91 $talkId = "{$subjectId}_talk";
94 // Adds namespace links
95 $links['namespaces'][$subjectId] = $this->tabAction(
96 $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true
98 $links['namespaces'][$subjectId]['context'] = 'subject';
99 $links['namespaces'][$talkId] = $this->tabAction(
100 $talkPage, 'talk', $isTalk, '', true
102 $links['namespaces'][$talkId]['context'] = 'talk';
104 // Adds view view link
105 if ( $this->mTitle
->exists() ) {
106 $links['views']['view'] = $this->tabAction(
107 $isTalk ?
$talkPage : $subjectPage,
108 'vector-view-view', ( $action == 'view' ), '', true
112 wfProfileIn( __METHOD__
. '-edit' );
114 // Checks if user can...
116 // edit the current page
117 $this->mTitle
->quickUserCan( 'edit' ) &&
120 $this->mTitle
->exists() ||
121 // or they can create one here
122 $this->mTitle
->quickUserCan( 'create' )
125 // Builds CSS class for talk page links
126 $isTalkClass = $isTalk ?
' istalk' : '';
128 // Determines if we're in edit mode
130 ( $action == 'edit' ||
$action == 'submit' ) &&
131 ( $section != 'new' )
133 $links['views']['edit'] = array(
134 'class' => ( $selected ?
'selected' : '' ) . $isTalkClass,
135 'text' => $this->mTitle
->exists()
136 ?
wfMsg( 'vector-view-edit' )
137 : wfMsg( 'vector-view-create' ),
139 $this->mTitle
->getLocalURL( $this->editUrlOptions() )
141 // Checks if this is a current rev of talk page and we should show a new
143 if ( ( $isTalk && $wgArticle && $wgArticle->isCurrent() ) ||
( $wgOut->showNewSectionLink() ) ) {
144 // Checks if we should ever show a new section link
145 if ( !$wgOut->forceHideNewSectionLink() ) {
146 // Adds new section link
147 //$links['actions']['addsection']
148 $links['views']['addsection'] = array(
149 'class' => 'collapsible ' . ( $section == 'new' ?
'selected' : false ),
150 'text' => wfMsg( 'vector-action-addsection' ),
151 'href' => $this->mTitle
->getLocalURL(
152 'action=edit§ion=new'
157 // Checks if the page has some kind of viewable content
158 } elseif ( $this->mTitle
->hasSourceText() ) {
159 // Adds view source view link
160 $links['views']['viewsource'] = array(
161 'class' => ( $action == 'edit' ) ?
'selected' : false,
162 'text' => wfMsg( 'vector-view-viewsource' ),
164 $this->mTitle
->getLocalURL( $this->editUrlOptions() )
167 wfProfileOut( __METHOD__
. '-edit' );
169 wfProfileIn( __METHOD__
. '-live' );
171 // Checks if the page exists
172 if ( $this->mTitle
->exists() ) {
173 // Adds history view link
174 $links['views']['history'] = array(
175 'class' => 'collapsible ' . ( ( $action == 'history' ) ?
'selected' : false ),
176 'text' => wfMsg( 'vector-view-history' ),
177 'href' => $this->mTitle
->getLocalURL( 'action=history' ),
181 if( $wgUser->isAllowed( 'delete' ) ) {
182 $links['actions']['delete'] = array(
183 'class' => ( $action == 'delete' ) ?
'selected' : false,
184 'text' => wfMsg( 'vector-action-delete' ),
185 'href' => $this->mTitle
->getLocalURL( 'action=delete' )
188 if ( $this->mTitle
->quickUserCan( 'move' ) ) {
189 $moveTitle = SpecialPage
::getTitleFor(
190 'Movepage', $this->thispage
192 $links['actions']['move'] = array(
193 'class' => $this->mTitle
->isSpecial( 'Movepage' ) ?
195 'text' => wfMsg( 'vector-action-move' ),
196 'href' => $moveTitle->getLocalURL()
201 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
202 $wgUser->isAllowed( 'protect' )
204 if ( !$this->mTitle
->isProtected() ) {
205 $links['actions']['protect'] = array(
206 'class' => ( $action == 'protect' ) ?
208 'text' => wfMsg( 'vector-action-protect' ),
210 $this->mTitle
->getLocalURL( 'action=protect' )
214 $links['actions']['unprotect'] = array(
215 'class' => ( $action == 'unprotect' ) ?
217 'text' => wfMsg( 'vector-action-unprotect' ),
219 $this->mTitle
->getLocalURL( 'action=unprotect' )
224 // article doesn't exist or is deleted
226 $wgUser->isAllowed( 'deletedhistory' ) &&
227 $wgUser->isAllowed( 'undelete' )
229 $n = $this->mTitle
->isDeleted();
231 $undelTitle = SpecialPage
::getTitleFor( 'Undelete' );
232 $links['actions']['undelete'] = array(
235 'vector-action-undelete',
237 $wgLang->formatNum( $n )
239 'href' => $undelTitle->getLocalURL(
240 'target=' . urlencode( $this->thispage
)
247 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
248 $wgUser->isAllowed( 'protect' )
250 if ( !$this->mTitle
->getRestrictions( 'create' ) ) {
251 $links['actions']['protect'] = array(
252 'class' => ( $action == 'protect' ) ?
254 'text' => wfMsg( 'vector-action-protect' ),
256 $this->mTitle
->getLocalURL( 'action=protect' )
260 $links['actions']['unprotect'] = array(
261 'class' => ( $action == 'unprotect' ) ?
263 'text' => wfMsg( 'vector-action-unprotect' ),
265 $this->mTitle
->getLocalURL( 'action=unprotect' )
270 wfProfileOut( __METHOD__
. '-live' );
272 * The following actions use messages which, if made particular to
273 * the Vector skin, would break the Ajax code which makes this
274 * action happen entirely inline. Skin::makeGlobalVariablesScript
275 * defines a set of messages in a javascript object - and these
276 * messages are assumed to be global for all skins. Without making
277 * a change to that procedure these messages will have to remain as
278 * the global versions.
280 // Checks if the user is logged in
281 if ( $this->loggedin
) {
282 if ( $wgVectorUseIconWatch ) {
289 $mode = $this->mTitle
->userIsWatching() ?
'unwatch' : 'watch';
290 $links[$place][$mode] = array(
291 'class' => $class . ( ( $action == 'watch' ||
$action == 'unwatch' ) ?
' selected' : false ),
292 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message
293 'href' => $this->mTitle
->getLocalURL( 'action=' . $mode )
296 // This is instead of SkinTemplateTabs - which uses a flat array
297 wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
299 // If it's not content, it's got to be a special page
301 $links['namespaces']['special'] = array(
302 'class' => 'selected',
303 'text' => wfMsg( 'nstab-special' ),
304 'href' => $wgRequest->getRequestURL()
308 // Gets list of language variants
309 $variants = $wgContLang->getVariants();
310 // Checks that language conversion is enabled and variants exist
311 if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
312 // Gets preferred variant
313 $preferred = $wgContLang->getPreferredVariant();
314 // Loops over each variant
315 foreach( $variants as $code ) {
316 // Gets variant name from language code
317 $varname = $wgContLang->getVariantname( $code );
318 // Checks if the variant is marked as disabled
319 if( $varname == 'disable' ) {
320 // Skips this variant
323 // Appends variant link
324 $links['variants'][] = array(
325 'class' => ( $code == $preferred ) ?
'selected' : false,
327 'href' => $this->mTitle
->getLocalURL( '', $code )
332 wfProfileOut( __METHOD__
);
339 * QuickTemplate class for Vector skin
342 class VectorTemplate
extends BaseTemplate
{
347 * @var Cached skin object
354 * Outputs the entire contents of the XHTML page
356 public function execute() {
357 global $wgRequest, $wgLang;
359 $this->skin
= $this->data
['skin'];
360 $action = $wgRequest->getText( 'action' );
362 // Build additional attributes for navigation urls
363 $nav = $this->skin
->buildNavigationUrls();
364 foreach ( $nav as $section => $links ) {
365 foreach ( $links as $key => $link ) {
367 if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
368 $xmlID = 'ca-nstab-' . $xmlID;
369 } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
372 $xmlID = 'ca-' . $xmlID;
374 $nav[$section][$key]['attributes'] =
375 ' id="' . Sanitizer
::escapeId( $xmlID ) . '"';
376 if ( $nav[$section][$key]['class'] ) {
377 $nav[$section][$key]['attributes'] .=
378 ' class="' . htmlspecialchars( $link['class'] ) . '"';
379 unset( $nav[$section][$key]['class'] );
381 // We don't want to give the watch tab an accesskey if the page
382 // is being edited, because that conflicts with the accesskey on
383 // the watch checkbox. We also don't want to give the edit tab
384 // an accesskey, because that's fairly superfluous and conflicts
385 // with an accesskey (Ctrl-E) often used for editing in Safari.
387 in_array( $action, array( 'edit', 'submit' ) ) &&
388 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
390 $nav[$section][$key]['key'] =
391 $this->skin
->tooltip( $xmlID );
393 $nav[$section][$key]['key'] =
394 $this->skin
->tooltipAndAccesskey( $xmlID );
398 $this->data
['namespace_urls'] = $nav['namespaces'];
399 $this->data
['view_urls'] = $nav['views'];
400 $this->data
['action_urls'] = $nav['actions'];
401 $this->data
['variant_urls'] = $nav['variants'];
402 // Build additional attributes for personal_urls
403 foreach ( $this->data
['personal_urls'] as $key => $item) {
404 $this->data
['personal_urls'][$key]['attributes'] =
405 ' id="' . Sanitizer
::escapeId( "pt-$key" ) . '"';
406 if ( isset( $item['active'] ) && $item['active'] ) {
407 $this->data
['personal_urls'][$key]['attributes'] .=
410 $this->data
['personal_urls'][$key]['key'] =
411 $this->skin
->tooltipAndAccesskey('pt-'.$key);
414 // Generate additional footer links
415 $footerlinks = $this->data
["footerlinks"];
417 // Reduce footer links down to only those which are being used
418 $validFooterLinks = array();
419 foreach( $footerlinks as $category => $links ) {
420 $validFooterLinks[$category] = array();
421 foreach( $links as $link ) {
422 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
423 $validFooterLinks[$category][] = $link;
428 // Generate additional footer icons
429 $footericons = $this->data
["footericons"];
430 // Unset any icons which don't have an image
431 foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
432 foreach ( $footerIconsBlock as $footerIconKey => $footerIcon ) {
433 if ( !is_string($footerIcon) && !isset($footerIcon["src"]) ) {
434 unset($footerIconsBlock[$footerIconKey]);
438 // Redo removal of any empty blocks
439 foreach ( $footericons as $footerIconsKey => &$footerIconsBlock ) {
440 if ( count($footerIconsBlock) <= 0 ) {
441 unset($footericons[$footerIconsKey]);
445 // Reverse horizontally rendered navigation elements
446 if ( $wgLang->isRTL() ) {
447 $this->data
['view_urls'] =
448 array_reverse( $this->data
['view_urls'] );
449 $this->data
['namespace_urls'] =
450 array_reverse( $this->data
['namespace_urls'] );
451 $this->data
['personal_urls'] =
452 array_reverse( $this->data
['personal_urls'] );
455 $this->html( 'headelement' );
457 <div id
="mw-page-base" class="noprint"></div
>
458 <div id
="mw-head-base" class="noprint"></div
>
460 <div id
="content"<?php
$this->html('specialpageattributes') ?
>>
462 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes') ?
>></div
>
463 <?php
if ( $this->data
['sitenotice'] ): ?
>
465 <div id
="siteNotice"><?php
$this->html( 'sitenotice' ) ?
></div
>
468 <!-- firstHeading
-->
469 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html( 'title' ) ?
></h1
>
470 <!-- /firstHeading
-->
472 <div id
="bodyContent">
474 <div id
="siteSub"><?php
$this->msg( 'tagline' ) ?
></div
>
477 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html( 'subtitle' ) ?
></div
>
479 <?php
if ( $this->data
['undelete'] ): ?
>
481 <div id
="contentSub2"><?php
$this->html( 'undelete' ) ?
></div
>
484 <?php
if($this->data
['newtalk'] ): ?
>
486 <div
class="usermessage"><?php
$this->html( 'newtalk' ) ?
></div
>
489 <?php
if ( $this->data
['showjumplinks'] ): ?
>
491 <div id
="jump-to-nav">
492 <?php
$this->msg( 'jumpto' ) ?
> <a href
="#mw-head"><?php
$this->msg( 'jumptonavigation' ) ?
></a
>,
493 <a href
="#p-search"><?php
$this->msg( 'jumptosearch' ) ?
></a
>
498 <?php
$this->html( 'bodytext' ) ?
>
500 <?php
if ( $this->data
['catlinks'] ): ?
>
502 <?php
$this->html( 'catlinks' ); ?
>
505 <?php
if ( $this->data
['dataAfterContent'] ): ?
>
506 <!-- dataAfterContent
-->
507 <?php
$this->html( 'dataAfterContent' ); ?
>
508 <!-- /dataAfterContent
-->
510 <div
class="visualClear"></div
>
512 <!-- /bodyContent
-->
516 <div id
="mw-head" class="noprint">
517 <?php
$this->renderNavigation( 'PERSONAL' ); ?
>
518 <div id
="left-navigation">
519 <?php
$this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?
>
521 <div id
="right-navigation">
522 <?php
$this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?
>
527 <div id
="mw-panel" class="noprint">
529 <div id
="p-logo"><a style
="background-image: url(<?php $this->text( 'logopath' ) ?>);" href
="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php
echo $this->skin
->tooltipAndAccesskey( 'p-logo' ) ?
>></a
></div
>
531 <?php
$this->renderPortals( $this->data
['sidebar'] ); ?
>
535 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
536 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
537 <?php
if ( count( $links ) > 0 ): ?
>
538 <ul id
="footer-<?php echo $category ?>">
539 <?php
foreach( $links as $link ): ?
>
540 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
541 <li id
="footer-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
547 <?php
if ( count( $footericons ) > 0 ): ?
>
548 <ul id
="footer-icons" class="noprint">
549 <?php
foreach ( $footericons as $blockName => $footerIcons ): ?
>
550 <li id
="footer-<?php echo htmlspecialchars($blockName); ?>ico">
551 <?php
foreach ( $footerIcons as $icon ): ?
>
552 <?php
echo $this->skin
->makeFooterIcon( $icon ); ?
>
559 <div style
="clear:both"></div
>
562 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
564 <script type
="<?php $this->text('jsmimetype') ?>"> if ( window
.isMSIE55
) fixalpha(); </script
>
566 <?php
$this->html( 'reporttime' ) ?
>
567 <?php
if ( $this->data
['debug'] ): ?
>
568 <!-- Debug output
: <?php
$this->text( 'debug' ); ?
> -->
576 * Render a series of portals
578 private function renderPortals( $portals ) {
579 // Force the rendering of the following portals
580 if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
581 if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true;
582 if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true;
584 foreach ( $portals as $name => $content ) {
585 echo "\n<!-- {$name} -->\n";
591 <div
class="portal" id
="p-tb">
592 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
596 foreach ( $this->getToolbox() as $key => $tbitem ): ?
>
597 <?php
echo $this->makeListItem($key, $tbitem); ?
>
601 wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
608 if ( $this->data
['language_urls'] ) {
610 <div
class="portal" id
="p-lang">
611 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
614 <?php
foreach ( $this->data
['language_urls'] as $key => $langlink ): ?
>
615 <?php
echo $this->makeListItem($key, $langlink); ?
>
626 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $name ) ?
>>
627 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?
></h5
>
629 <?php
if ( is_array( $content ) ): ?
>
631 <?php
foreach( $content as $key => $val ): ?
>
632 <?php
echo $this->makeListItem($key, $val); ?
>
637 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>
644 echo "\n<!-- /{$name} -->\n";
649 * Render one or more navigations elements by name, automatically reveresed
650 * when UI is in RTL mode
652 private function renderNavigation( $elements ) {
653 global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
655 // If only one element was given, wrap it in an array, allowing more
656 // flexible arguments
657 if ( !is_array( $elements ) ) {
658 $elements = array( $elements );
659 // If there's a series of elements, reverse them when in RTL mode
660 } else if ( wfUILang()->isRTL() ) {
661 $elements = array_reverse( $elements );
664 foreach ( $elements as $name => $element ) {
665 echo "\n<!-- {$name} -->\n";
666 switch ( $element ) {
669 <div id
="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
670 <h5
><?php
$this->msg('namespaces') ?
></h5
>
671 <ul
<?php
$this->html('userlangattributes') ?
>>
672 <?php
foreach ($this->data
['namespace_urls'] as $link ): ?
>
673 <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
>
681 <div id
="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
682 <?php
if ( $wgVectorShowVariantName ): ?
>
684 <?php
foreach ( $this->data
['variant_urls'] as $link ): ?
>
685 <?php
if ( stripos( $link['attributes'], 'selected' ) !== false ): ?
>
686 <?php
echo htmlspecialchars( $link['text'] ) ?
>
691 <h5
><span
><?php
$this->msg('variants') ?
></span
><a href
="#"></a
></h5
>
693 <ul
<?php
$this->html('userlangattributes') ?
>>
694 <?php
foreach ( $this->data
['variant_urls'] as $link ): ?
>
695 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
704 <div id
="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
705 <h5
><?php
$this->msg('views') ?
></h5
>
706 <ul
<?php
$this->html('userlangattributes') ?
>>
707 <?php
foreach ( $this->data
['view_urls'] as $link ): ?
>
708 <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
>
716 <div id
="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
717 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"></a
></h5
>
719 <ul
<?php
$this->html('userlangattributes') ?
>>
720 <?php
foreach ($this->data
['action_urls'] as $link ): ?
>
721 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
730 <div id
="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
731 <h5
><?php
$this->msg('personaltools') ?
></h5
>
732 <ul
<?php
$this->html('userlangattributes') ?
>>
733 <?php
foreach($this->data
['personal_urls'] as $item): ?
>
734 <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
>
743 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
744 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
745 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
746 <?php
if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?
>
747 <div id
="simpleSearch">
748 <?php
echo $this->makeSearchInput(array( "id" => "searchInput" )); ?
>
749 <?php
echo $this->makeSearchButton("image", array( "id" => "searchButton",
750 "src" => $this->skin
->getSkinStylePath('images/search-' . ( $this->data
['rtl'] ?
'rtl' : 'ltr' ) . '.png') )); ?
>
753 <?php
echo $this->makeSearchInput(array( "id" => "searchInput" )); ?
>
754 <?php
echo $this->makeSearchButton("go", array( "id" => "searchGoButton", "class" => "searchButton" )); ?
>
755 <?php
echo $this->makeSearchButton("fulltext", array( "id" => "mw-searchButton", "class" => "searchButton" )); ?
>
763 echo "\n<!-- /{$name} -->\n";