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 global $wgVectorExtraStyles;
52 parent
::setupSkinUserCss( $out );
54 $out->addModuleStyles( 'vector' );
56 // Add extra stylesheets
57 // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
58 if ( is_array( $wgVectorExtraStyles ) ) {
59 foreach ( $wgVectorExtraStyles as $style ) {
60 $out->addStyle( "vector/$style", 'screen' );
66 * Builds a structured array of links used for tabs and menus
70 function buildNavigationUrls() {
71 global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
72 global $wgDisableLangConversion, $wgVectorUseIconWatch;
74 wfProfileIn( __METHOD__
);
77 'namespaces' => array(),
84 $action = $wgRequest->getVal( 'action', 'view' );
85 $section = $wgRequest->getVal( 'section' );
87 // Checks if page is some kind of content
88 if( $this->iscontent
) {
89 // Gets page objects for the related namespaces
90 $subjectPage = $this->mTitle
->getSubjectPage();
91 $talkPage = $this->mTitle
->getTalkPage();
93 // Determines if this is a talk page
94 $isTalk = $this->mTitle
->isTalkPage();
96 // Generates XML IDs from namespace names
97 $subjectId = $this->mTitle
->getNamespaceKey( '' );
99 if ( $subjectId == 'main' ) {
102 $talkId = "{$subjectId}_talk";
105 // Adds namespace links
106 $links['namespaces'][$subjectId] = $this->tabAction(
107 $subjectPage, 'nstab-' . $subjectId, !$isTalk, '', true
109 $links['namespaces'][$subjectId]['context'] = 'subject';
110 $links['namespaces'][$talkId] = $this->tabAction(
111 $talkPage, 'talk', $isTalk, '', true
113 $links['namespaces'][$talkId]['context'] = 'talk';
115 // Adds view view link
116 if ( $this->mTitle
->exists() ) {
117 $links['views']['view'] = $this->tabAction(
118 $isTalk ?
$talkPage : $subjectPage,
119 'vector-view-view', ( $action == 'view' ), '', true
123 wfProfileIn( __METHOD__
. '-edit' );
125 // Checks if user can...
127 // edit the current page
128 $this->mTitle
->quickUserCan( 'edit' ) &&
131 $this->mTitle
->exists() ||
132 // or they can create one here
133 $this->mTitle
->quickUserCan( 'create' )
136 // Builds CSS class for talk page links
137 $isTalkClass = $isTalk ?
' istalk' : '';
139 // Determines if we're in edit mode
141 ( $action == 'edit' ||
$action == 'submit' ) &&
142 ( $section != 'new' )
144 $links['views']['edit'] = array(
145 'class' => ( $selected ?
'selected' : '' ) . $isTalkClass,
146 'text' => $this->mTitle
->exists()
147 ?
wfMsg( 'vector-view-edit' )
148 : wfMsg( 'vector-view-create' ),
150 $this->mTitle
->getLocalURL( $this->editUrlOptions() )
152 // Checks if this is a current rev of talk page and we should show a new
154 if ( ( $isTalk && $wgArticle->isCurrent() ) ||
( $wgOut->showNewSectionLink() ) ) {
155 // Checks if we should ever show a new section link
156 if ( !$wgOut->forceHideNewSectionLink() ) {
157 // Adds new section link
158 //$links['actions']['addsection']
159 $links['views']['addsection'] = array(
160 'class' => 'collapsible ' . ( $section == 'new' ?
'selected' : false ),
161 'text' => wfMsg( 'vector-action-addsection' ),
162 'href' => $this->mTitle
->getLocalURL(
163 'action=edit§ion=new'
168 // Checks if the page has some kind of viewable content
169 } elseif ( $this->mTitle
->hasSourceText() ) {
170 // Adds view source view link
171 $links['views']['viewsource'] = array(
172 'class' => ( $action == 'edit' ) ?
'selected' : false,
173 'text' => wfMsg( 'vector-view-viewsource' ),
175 $this->mTitle
->getLocalURL( $this->editUrlOptions() )
178 wfProfileOut( __METHOD__
. '-edit' );
180 wfProfileIn( __METHOD__
. '-live' );
182 // Checks if the page exists
183 if ( $this->mTitle
->exists() ) {
184 // Adds history view link
185 $links['views']['history'] = array(
186 'class' => 'collapsible ' . ( ( $action == 'history' ) ?
'selected' : false ),
187 'text' => wfMsg( 'vector-view-history' ),
188 'href' => $this->mTitle
->getLocalURL( 'action=history' ),
192 if( $wgUser->isAllowed( 'delete' ) ) {
193 $links['actions']['delete'] = array(
194 'class' => ( $action == 'delete' ) ?
'selected' : false,
195 'text' => wfMsg( 'vector-action-delete' ),
196 'href' => $this->mTitle
->getLocalURL( 'action=delete' )
199 if ( $this->mTitle
->quickUserCan( 'move' ) ) {
200 $moveTitle = SpecialPage
::getTitleFor(
201 'Movepage', $this->thispage
203 $links['actions']['move'] = array(
204 'class' => $this->mTitle
->isSpecial( 'Movepage' ) ?
206 'text' => wfMsg( 'vector-action-move' ),
207 'href' => $moveTitle->getLocalURL()
212 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
213 $wgUser->isAllowed( 'protect' )
215 if ( !$this->mTitle
->isProtected() ) {
216 $links['actions']['protect'] = array(
217 'class' => ( $action == 'protect' ) ?
219 'text' => wfMsg( 'vector-action-protect' ),
221 $this->mTitle
->getLocalURL( 'action=protect' )
225 $links['actions']['unprotect'] = array(
226 'class' => ( $action == 'unprotect' ) ?
228 'text' => wfMsg( 'vector-action-unprotect' ),
230 $this->mTitle
->getLocalURL( 'action=unprotect' )
235 // article doesn't exist or is deleted
237 $wgUser->isAllowed( 'deletedhistory' ) &&
238 $wgUser->isAllowed( 'undelete' )
240 if( $n = $this->mTitle
->isDeleted() ) {
241 $undelTitle = SpecialPage
::getTitleFor( 'Undelete' );
242 $links['actions']['undelete'] = array(
245 'vector-action-undelete',
247 $wgLang->formatNum( $n )
249 'href' => $undelTitle->getLocalURL(
250 'target=' . urlencode( $this->thispage
)
257 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
258 $wgUser->isAllowed( 'protect' )
260 if ( !$this->mTitle
->getRestrictions( 'create' ) ) {
261 $links['actions']['protect'] = array(
262 'class' => ( $action == 'protect' ) ?
264 'text' => wfMsg( 'vector-action-protect' ),
266 $this->mTitle
->getLocalURL( 'action=protect' )
270 $links['actions']['unprotect'] = array(
271 'class' => ( $action == 'unprotect' ) ?
273 'text' => wfMsg( 'vector-action-unprotect' ),
275 $this->mTitle
->getLocalURL( 'action=unprotect' )
280 wfProfileOut( __METHOD__
. '-live' );
282 * The following actions use messages which, if made particular to
283 * the Vector skin, would break the Ajax code which makes this
284 * action happen entirely inline. Skin::makeGlobalVariablesScript
285 * defines a set of messages in a javascript object - and these
286 * messages are assumed to be global for all skins. Without making
287 * a change to that procedure these messages will have to remain as
288 * the global versions.
290 // Checks if the user is logged in
291 if ( $this->loggedin
) {
292 if ( $wgVectorUseIconWatch ) {
299 $mode = $this->mTitle
->userIsWatching() ?
'unwatch' : 'watch';
300 $links[$place][$mode] = array(
301 'class' => $class . ( ( $action == 'watch' ||
$action == 'unwatch' ) ?
' selected' : false ),
302 'text' => wfMsg( $mode ), // uses 'watch' or 'unwatch' message
303 'href' => $this->mTitle
->getLocalURL( 'action=' . $mode )
306 // This is instead of SkinTemplateTabs - which uses a flat array
307 wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
309 // If it's not content, it's got to be a special page
311 $links['namespaces']['special'] = array(
312 'class' => 'selected',
313 'text' => wfMsg( 'nstab-special' ),
314 'href' => $wgRequest->getRequestURL()
318 // Gets list of language variants
319 $variants = $wgContLang->getVariants();
320 // Checks that language conversion is enabled and variants exist
321 if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
322 // Gets preferred variant
323 $preferred = $wgContLang->getPreferredVariant();
324 // Loops over each variant
325 foreach( $variants as $code ) {
326 // Gets variant name from language code
327 $varname = $wgContLang->getVariantname( $code );
328 // Checks if the variant is marked as disabled
329 if( $varname == 'disable' ) {
330 // Skips this variant
333 // Appends variant link
334 $links['variants'][] = array(
335 'class' => ( $code == $preferred ) ?
'selected' : false,
337 'href' => $this->mTitle
->getLocalURL( '', $code )
342 wfProfileOut( __METHOD__
);
349 * QuickTemplate class for Vector skin
352 class VectorTemplate
extends QuickTemplate
{
357 * @var Cached skin object
364 * Outputs the entire contents of the XHTML page
366 public function execute() {
367 global $wgRequest, $wgContLang;
369 $this->skin
= $this->data
['skin'];
370 $action = $wgRequest->getText( 'action' );
372 // Build additional attributes for navigation urls
373 $nav = $this->skin
->buildNavigationUrls();
374 foreach ( $nav as $section => $links ) {
375 foreach ( $links as $key => $link ) {
377 if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
378 $xmlID = 'ca-nstab-' . $xmlID;
379 } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
382 $xmlID = 'ca-' . $xmlID;
384 $nav[$section][$key]['attributes'] =
385 ' id="' . Sanitizer
::escapeId( $xmlID ) . '"';
386 if ( $nav[$section][$key]['class'] ) {
387 $nav[$section][$key]['attributes'] .=
388 ' class="' . htmlspecialchars( $link['class'] ) . '"';
389 unset( $nav[$section][$key]['class'] );
391 // We don't want to give the watch tab an accesskey if the page
392 // is being edited, because that conflicts with the accesskey on
393 // the watch checkbox. We also don't want to give the edit tab
394 // an accesskey, because that's fairly superfluous and conflicts
395 // with an accesskey (Ctrl-E) often used for editing in Safari.
397 in_array( $action, array( 'edit', 'submit' ) ) &&
398 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
400 $nav[$section][$key]['key'] =
401 $this->skin
->tooltip( $xmlID );
403 $nav[$section][$key]['key'] =
404 $this->skin
->tooltipAndAccesskey( $xmlID );
408 $this->data
['namespace_urls'] = $nav['namespaces'];
409 $this->data
['view_urls'] = $nav['views'];
410 $this->data
['action_urls'] = $nav['actions'];
411 $this->data
['variant_urls'] = $nav['variants'];
412 // Build additional attributes for personal_urls
413 foreach ( $this->data
['personal_urls'] as $key => $item) {
414 $this->data
['personal_urls'][$key]['attributes'] =
415 ' id="' . Sanitizer
::escapeId( "pt-$key" ) . '"';
416 if ( isset( $item['active'] ) && $item['active'] ) {
417 $this->data
['personal_urls'][$key]['attributes'] .=
420 $this->data
['personal_urls'][$key]['key'] =
421 $this->skin
->tooltipAndAccesskey('pt-'.$key);
424 // Generate additional footer links
425 $footerlinks = array(
429 'numberofwatchingusers',
444 $footerlinksClasses = array(
445 'icons' => array( 'noprint' )
448 // Reduce footer links down to only those which are being used
449 $validFooterLinks = array();
450 foreach( $footerlinks as $category => $links ) {
451 $validFooterLinks[$category] = array();
452 foreach( $links as $link ) {
453 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
454 $validFooterLinks[$category][] = $link;
458 // Reverse horizontally rendered navigation elements
459 if ( $wgContLang->isRTL() ) {
460 $this->data
['view_urls'] =
461 array_reverse( $this->data
['view_urls'] );
462 $this->data
['namespace_urls'] =
463 array_reverse( $this->data
['namespace_urls'] );
464 $this->data
['personal_urls'] =
465 array_reverse( $this->data
['personal_urls'] );
468 $this->html( 'headelement' );
470 <div id
="mw-page-base" class="noprint"></div
>
471 <div id
="mw-head-base" class="noprint"></div
>
473 <div id
="content"<?php
$this->html('specialpageattributes') ?
>>
475 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes') ?
>></div
>
476 <?php
if ( $this->data
['sitenotice'] ): ?
>
478 <div id
="siteNotice"><?php
$this->html( 'sitenotice' ) ?
></div
>
481 <!-- firstHeading
-->
482 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html( 'title' ) ?
></h1
>
483 <!-- /firstHeading
-->
485 <div id
="bodyContent">
487 <div id
="siteSub"><?php
$this->msg( 'tagline' ) ?
></div
>
490 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html( 'subtitle' ) ?
></div
>
492 <?php
if ( $this->data
['undelete'] ): ?
>
494 <div id
="contentSub2"><?php
$this->html( 'undelete' ) ?
></div
>
497 <?php
if($this->data
['newtalk'] ): ?
>
499 <div
class="usermessage"><?php
$this->html( 'newtalk' ) ?
></div
>
502 <?php
if ( $this->data
['showjumplinks'] ): ?
>
504 <div id
="jump-to-nav">
505 <?php
$this->msg( 'jumpto' ) ?
> <a href
="#mw-head"><?php
$this->msg( 'jumptonavigation' ) ?
></a
>,
506 <a href
="#p-search"><?php
$this->msg( 'jumptosearch' ) ?
></a
>
511 <?php
$this->html( 'bodytext' ) ?
>
513 <?php
if ( $this->data
['catlinks'] ): ?
>
515 <?php
$this->html( 'catlinks' ); ?
>
518 <?php
if ( $this->data
['dataAfterContent'] ): ?
>
519 <!-- dataAfterContent
-->
520 <?php
$this->html( 'dataAfterContent' ); ?
>
521 <!-- /dataAfterContent
-->
523 <div
class="visualClear"></div
>
525 <!-- /bodyContent
-->
529 <div id
="mw-head" class="noprint">
530 <?php
$this->renderNavigation( 'PERSONAL' ); ?
>
531 <div id
="left-navigation">
532 <?php
$this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?
>
534 <div id
="right-navigation">
535 <?php
$this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?
>
540 <div id
="mw-panel" class="noprint">
542 <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
>
544 <?php
$this->renderPortals( $this->data
['sidebar'] ); ?
>
548 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
549 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
550 <?php
if ( count( $links ) > 0 ): ?
>
551 <ul id
="footer-<?php echo $category ?>"<?php
if (isset($footerlinksClasses[$category])) echo ' class="' . implode(" ", $footerlinksClasses[$category]) . '"'; ?
>>
552 <?php
foreach( $links as $link ): ?
>
553 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
554 <li id
="footer-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
560 <div style
="clear:both"></div
>
564 <script type
="<?php $this->text('jsmimetype') ?>"> if ( window
.isMSIE55
) fixalpha(); </script
>
566 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
567 <?php
$this->html( 'reporttime' ) ?
>
568 <?php
if ( $this->data
['debug'] ): ?
>
569 <!-- Debug output
: <?php
$this->text( 'debug' ); ?
> -->
577 * Render a series of portals
579 private function renderPortals( $portals ) {
580 // Force the rendering of the following portals
581 if ( !isset( $portals['SEARCH'] ) ) $portals['SEARCH'] = true;
582 if ( !isset( $portals['TOOLBOX'] ) ) $portals['TOOLBOX'] = true;
583 if ( !isset( $portals['LANGUAGES'] ) ) $portals['LANGUAGES'] = true;
585 foreach ( $portals as $name => $content ) {
586 echo "\n<!-- {$name} -->\n";
592 <div
class="portal" id
="p-tb">
593 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
596 <?php
if( $this->data
['notspecialpage'] ): ?
>
597 <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
>
598 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
599 <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
>
602 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
603 <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
>
605 <?php
if( $this->data
['feeds']): ?
>
607 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
608 <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
>
612 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
613 <?php
if( $this->data
['nav_urls'][$special]): ?
>
614 <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
>
617 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
618 <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
>
620 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
621 <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
>
622 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
623 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
625 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
632 if ( $this->data
['language_urls'] ) {
634 <div
class="portal" id
="p-lang">
635 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
638 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
639 <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
>
649 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $name ) ?
>>
650 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?
></h5
>
652 <?php
if ( is_array( $content ) ): ?
>
654 <?php
foreach( $content as $key => $val ): ?
>
655 <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
>
659 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>
666 echo "\n<!-- /{$name} -->\n";
671 * Render one or more navigations elements by name, automatically reveresed
672 * when UI is in RTL mode
674 private function renderNavigation( $elements ) {
675 global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
677 // If only one element was given, wrap it in an array, allowing more
678 // flexible arguments
679 if ( !is_array( $elements ) ) {
680 $elements = array( $elements );
681 // If there's a series of elements, reverse them when in RTL mode
682 } else if ( wfUILang()->isRTL() ) {
683 $elements = array_reverse( $elements );
686 foreach ( $elements as $name => $element ) {
687 echo "\n<!-- {$name} -->\n";
688 switch ( $element ) {
691 <div id
="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
692 <h5
><?php
$this->msg('namespaces') ?
></h5
>
693 <ul
<?php
$this->html('userlangattributes') ?
>>
694 <?php
foreach ($this->data
['namespace_urls'] as $key => $link ): ?
>
695 <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
>
703 <div id
="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
704 <?php
if ( $wgVectorShowVariantName ): ?
>
706 <?php
foreach ( $this->data
['variant_urls'] as $key => $link ): ?
>
707 <?php
if ( stripos( $link['attributes'], 'selected' ) !== false ): ?
>
708 <?php
echo htmlspecialchars( $link['text'] ) ?
>
713 <h5
><span
><?php
$this->msg('variants') ?
></span
><a href
="#"></a
></h5
>
715 <ul
<?php
$this->html('userlangattributes') ?
>>
716 <?php
foreach ( $this->data
['variant_urls'] as $key => $link ): ?
>
717 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
726 <div id
="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
727 <h5
><?php
$this->msg('views') ?
></h5
>
728 <ul
<?php
$this->html('userlangattributes') ?
>>
729 <?php
foreach ( $this->data
['view_urls'] as $key => $link ): ?
>
730 <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
>
738 <div id
="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
739 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"></a
></h5
>
741 <ul
<?php
$this->html('userlangattributes') ?
>>
742 <?php
foreach ($this->data
['action_urls'] as $key => $link ): ?
>
743 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
752 <div id
="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
753 <h5
><?php
$this->msg('personaltools') ?
></h5
>
754 <ul
<?php
$this->html('userlangattributes') ?
>>
755 <?php
foreach($this->data
['personal_urls'] as $key => $item): ?
>
756 <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
>
765 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
766 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
767 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
768 <?php
if ( $wgVectorUseSimpleSearch && $wgUser->getOption( 'vector-simplesearch' ) ): ?
>
769 <div id
="simpleSearch">
770 <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; ?
> />
771 <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
>
774 <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; ?
> />
775 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
776 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
784 echo "\n<!-- /{$name} -->\n";