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 QuickTemplate
{
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 = array(
419 'numberofwatchingusers',
434 $footerlinksClasses = array(
435 'icons' => array( 'noprint' )
438 // Reduce footer links down to only those which are being used
439 $validFooterLinks = array();
440 foreach( $footerlinks as $category => $links ) {
441 $validFooterLinks[$category] = array();
442 foreach( $links as $link ) {
443 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
444 $validFooterLinks[$category][] = $link;
448 // Reverse horizontally rendered navigation elements
449 if ( $wgLang->isRTL() ) {
450 $this->data
['view_urls'] =
451 array_reverse( $this->data
['view_urls'] );
452 $this->data
['namespace_urls'] =
453 array_reverse( $this->data
['namespace_urls'] );
454 $this->data
['personal_urls'] =
455 array_reverse( $this->data
['personal_urls'] );
458 $this->html( 'headelement' );
460 <div id
="mw-page-base" class="noprint"></div
>
461 <div id
="mw-head-base" class="noprint"></div
>
463 <div id
="content"<?php
$this->html('specialpageattributes') ?
>>
465 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes') ?
>></div
>
466 <?php
if ( $this->data
['sitenotice'] ): ?
>
468 <div id
="siteNotice"><?php
$this->html( 'sitenotice' ) ?
></div
>
471 <!-- firstHeading
-->
472 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html( 'title' ) ?
></h1
>
473 <!-- /firstHeading
-->
475 <div id
="bodyContent">
477 <div id
="siteSub"><?php
$this->msg( 'tagline' ) ?
></div
>
480 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html( 'subtitle' ) ?
></div
>
482 <?php
if ( $this->data
['undelete'] ): ?
>
484 <div id
="contentSub2"><?php
$this->html( 'undelete' ) ?
></div
>
487 <?php
if($this->data
['newtalk'] ): ?
>
489 <div
class="usermessage"><?php
$this->html( 'newtalk' ) ?
></div
>
492 <?php
if ( $this->data
['showjumplinks'] ): ?
>
494 <div id
="jump-to-nav">
495 <?php
$this->msg( 'jumpto' ) ?
> <a href
="#mw-head"><?php
$this->msg( 'jumptonavigation' ) ?
></a
>,
496 <a href
="#p-search"><?php
$this->msg( 'jumptosearch' ) ?
></a
>
501 <?php
$this->html( 'bodytext' ) ?
>
503 <?php
if ( $this->data
['catlinks'] ): ?
>
505 <?php
$this->html( 'catlinks' ); ?
>
508 <?php
if ( $this->data
['dataAfterContent'] ): ?
>
509 <!-- dataAfterContent
-->
510 <?php
$this->html( 'dataAfterContent' ); ?
>
511 <!-- /dataAfterContent
-->
513 <div
class="visualClear"></div
>
515 <!-- /bodyContent
-->
519 <div id
="mw-head" class="noprint">
520 <?php
$this->renderNavigation( 'PERSONAL' ); ?
>
521 <div id
="left-navigation">
522 <?php
$this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?
>
524 <div id
="right-navigation">
525 <?php
$this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?
>
530 <div id
="mw-panel" class="noprint">
532 <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
>
534 <?php
$this->renderPortals( $this->data
['sidebar'] ); ?
>
538 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
539 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
540 <?php
if ( count( $links ) > 0 ): ?
>
541 <ul id
="footer-<?php echo $category ?>"<?php
if (isset($footerlinksClasses[$category])) echo ' class="' . implode(" ", $footerlinksClasses[$category]) . '"'; ?
>>
542 <?php
foreach( $links as $link ): ?
>
543 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
544 <li id
="footer-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
550 <div style
="clear:both"></div
>
553 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
555 <script type
="<?php $this->text('jsmimetype') ?>"> if ( window
.isMSIE55
) fixalpha(); </script
>
557 <?php
$this->html( 'reporttime' ) ?
>
558 <?php
if ( $this->data
['debug'] ): ?
>
559 <!-- Debug output
: <?php
$this->text( 'debug' ); ?
> -->
567 * Render a series of portals
569 private function renderPortals( $portals ) {
570 // Force the rendering of the following portals
571 if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
572 if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true;
573 if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true;
575 foreach ( $portals as $name => $content ) {
576 echo "\n<!-- {$name} -->\n";
582 <div
class="portal" id
="p-tb">
583 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
586 <?php
if( $this->data
['notspecialpage'] ): ?
>
587 <li id
="t-whatlinkshere"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls']['whatlinkshere']['href'] ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 't-whatlinkshere' ) ?
>><?php
$this->msg( 'whatlinkshere' ) ?
></a
></li
>
588 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
589 <li id
="t-recentchangeslinked"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls']['recentchangeslinked']['href'] ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 't-recentchangeslinked' ) ?
>><?php
$this->msg( 'recentchangeslinked-toolbox' ) ?
></a
></li
>
592 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
593 <li id
="t-trackbacklink"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls']['trackbacklink']['href'] ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 't-trackbacklink' ) ?
>><?php
$this->msg( 'trackbacklink' ) ?
></a
></li
>
595 <?php
if( $this->data
['feeds']): ?
>
597 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
598 <a id
="<?php echo Sanitizer::escapeId( "feed
-$key" ) ?>" href
="<?php echo htmlspecialchars( $feed['href'] ) ?>" rel
="alternate" type
="application/<?php echo $key ?>+xml" class="feedlink"<?php
echo $this->skin
->tooltipAndAccesskey( 'feed-' . $key ) ?
>><?php
echo htmlspecialchars( $feed['text'] ) ?
></a
>
602 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
603 <?php
if( $this->data
['nav_urls'][$special]): ?
>
604 <li id
="t-<?php echo $special ?>"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls'][$special]['href'] ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 't-' . $special ) ?
>><?php
$this->msg( $special ) ?
></a
></li
>
607 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
608 <li id
="t-print"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls']['print']['href'] ) ?>" rel
="alternate"<?php
echo $this->skin
->tooltipAndAccesskey( 't-print' ) ?
>><?php
$this->msg( 'printableversion' ) ?
></a
></li
>
610 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
611 <li id
="t-permalink"><a href
="<?php echo htmlspecialchars( $this->data['nav_urls']['permalink']['href'] ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 't-permalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></a
></li
>
612 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
613 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
615 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
622 if ( $this->data
['language_urls'] ) {
624 <div
class="portal" id
="p-lang">
625 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
628 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
629 <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
>
639 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $name ) ?
>>
640 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?
></h5
>
642 <?php
if ( is_array( $content ) ): ?
>
644 <?php
foreach( $content as $val ): ?
>
645 <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
>
649 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>
656 echo "\n<!-- /{$name} -->\n";
661 * Render one or more navigations elements by name, automatically reveresed
662 * when UI is in RTL mode
664 private function renderNavigation( $elements ) {
665 global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
667 // If only one element was given, wrap it in an array, allowing more
668 // flexible arguments
669 if ( !is_array( $elements ) ) {
670 $elements = array( $elements );
671 // If there's a series of elements, reverse them when in RTL mode
672 } else if ( wfUILang()->isRTL() ) {
673 $elements = array_reverse( $elements );
676 foreach ( $elements as $name => $element ) {
677 echo "\n<!-- {$name} -->\n";
678 switch ( $element ) {
681 <div id
="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
682 <h5
><?php
$this->msg('namespaces') ?
></h5
>
683 <ul
<?php
$this->html('userlangattributes') ?
>>
684 <?php
foreach ($this->data
['namespace_urls'] as $link ): ?
>
685 <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
>
693 <div id
="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
694 <?php
if ( $wgVectorShowVariantName ): ?
>
696 <?php
foreach ( $this->data
['variant_urls'] as $link ): ?
>
697 <?php
if ( stripos( $link['attributes'], 'selected' ) !== false ): ?
>
698 <?php
echo htmlspecialchars( $link['text'] ) ?
>
703 <h5
><span
><?php
$this->msg('variants') ?
></span
><a href
="#"></a
></h5
>
705 <ul
<?php
$this->html('userlangattributes') ?
>>
706 <?php
foreach ( $this->data
['variant_urls'] as $link ): ?
>
707 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
716 <div id
="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
717 <h5
><?php
$this->msg('views') ?
></h5
>
718 <ul
<?php
$this->html('userlangattributes') ?
>>
719 <?php
foreach ( $this->data
['view_urls'] as $link ): ?
>
720 <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
>
728 <div id
="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
729 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"></a
></h5
>
731 <ul
<?php
$this->html('userlangattributes') ?
>>
732 <?php
foreach ($this->data
['action_urls'] as $link ): ?
>
733 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
742 <div id
="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
743 <h5
><?php
$this->msg('personaltools') ?
></h5
>
744 <ul
<?php
$this->html('userlangattributes') ?
>>
745 <?php
foreach($this->data
['personal_urls'] as $item): ?
>
746 <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
>
755 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
756 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
757 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
758 <?php
if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?
>
759 <div id
="simpleSearch">
760 <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; ?
> />
761 <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
>
764 <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; ?
> />
765 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
766 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
774 echo "\n<!-- /{$name} -->\n";