3 * Vector - Branch of MonoBook which has many usability improvements and
4 * somewhat cleaner code.
11 if( !defined( 'MEDIAWIKI' ) )
15 * SkinTemplate class for Vector skin
18 class SkinVector
extends SkinTemplate
{
23 * Initializes output page and sets up skin-specific parameters
24 * @param object $out Output page object to initialize
26 public function initPage( OutputPage
$out ) {
27 parent
::initPage( $out );
28 $this->skinname
= 'vector';
29 $this->stylename
= 'vector';
30 $this->template
= 'VectorTemplate';
34 * Defines CSS files to be included
35 * @param object $out Output page to add styles to
37 public function setupSkinUserCss( OutputPage
$out ) {
39 // Append to the default screen common & print styles...
40 if ( $wgContLang->isRTL() ) {
41 $out->addStyle( 'vector/main-rtl.css', 'screen' );
43 $out->addStyle( 'vector/main-ltr.css', 'screen' );
46 parent
::setupSkinUserCss( $out );
50 * A structured array of edit links by default used for the tabs
54 function buildNavigationUrls() {
55 global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
56 global $wgDisableLangConversion;
58 wfProfileIn( __METHOD__
);
61 'namespaces' => array(),
68 $action = $wgRequest->getVal( 'action', 'view' );
69 $section = $wgRequest->getVal( 'section' );
71 // Checks if page is some kind of content
72 if( $this->iscontent
) {
74 // Gets page objects for the related namespaces
75 $subjectPage = $this->mTitle
->getSubjectPage();
76 $talkPage = $this->mTitle
->getTalkPage();
78 // Determines if this is a talk page
79 $isTalk = $this->mTitle
->isTalkPage();
81 // Generates XML IDs from namespace names
82 $subjectId = $wgContLang->lc( $this->mTitle
->getSubjectNsText() );
83 if ( $subjectId == '' ) {
86 $talkId = "{$subjectId}_talk";
87 $currentId = $isTalk ?
$talkId : $subjectId;
89 // Adds namespace links
90 $links['namespaces'][$subjectId] = $this->tabAction(
91 $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
93 $links['namespaces'][$talkId] = $this->tabAction(
94 $talkPage, 'vector-namespace-talk', $isTalk, '', true
97 // Adds view view link
98 if ( $this->mTitle
->exists() ) {
99 $links['views']['view'] = $this->tabAction(
100 $isTalk ?
$talkPage : $subjectPage,
101 'vector-view-view', ( $action == 'view' ), '', true
105 wfProfileIn( __METHOD__
. '-edit' );
107 // Checks if user can...
109 // edit the current page
110 $this->mTitle
->quickUserCan( 'edit' ) &&
113 $this->mTitle
->exists() ||
114 // or they can create one here
115 $this->mTitle
->quickUserCan( 'create' )
118 // Builds CSS class for talk page links
119 $isTalkClass = $isTalk ?
' istalk' : '';
121 // Determines if we're in edit mode
123 ( $action == 'edit' ||
$action == 'submit' ) &&
124 ( $section != 'new' )
126 $links['views']['edit'] = array(
127 'class' => ( $selected ?
'selected' : '' ) . $isTalkClass,
128 'text' => $this->mTitle
->exists()
129 ?
wfMsg( 'vector-view-edit' )
130 : wfMsg( 'vector-view-create' ),
132 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
134 // Checks if this is a current rev of talk page and we should show a new
136 if ( ( $isTalk && $wgArticle->isCurrent() ) ||
( $wgOut->showNewSectionLink() ) ) {
137 // Checks if we should ever show a new section link
138 if ( !$wgOut->forceHideNewSectionLink() ) {
139 // Adds new section link
140 $links['actions']['addsection'] = array(
141 'class' => $section == 'new' ?
'selected' : false,
142 'text' => wfMsg( 'vector-action-addsection' ),
143 'href' => $this->mTitle
->getLocalUrl(
144 'action=edit§ion=new'
149 // Checks if the page is known (some kind of viewable content)
150 } elseif ( $this->mTitle
->isKnown() ) {
151 // Adds view source view link
152 $links['views']['viewsource'] = array(
153 'class' => ( $action == 'edit' ) ?
'selected' : false,
154 'text' => wfMsg( 'vector-view-viewsource' ),
156 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
159 wfProfileOut( __METHOD__
. '-edit' );
161 wfProfileIn( __METHOD__
. '-live' );
163 // Checks if the page exists
164 if ( $this->mTitle
->exists() ) {
165 // Adds history view link
166 $links['views']['history'] = array(
167 'class' => ($action == 'history') ?
'selected' : false,
168 'text' => wfMsg( 'vector-view-history' ),
169 'href' => $this->mTitle
->getLocalUrl( 'action=history' ),
173 if( $wgUser->isAllowed( 'delete' ) ) {
174 $links['actions']['delete'] = array(
175 'class' => ($action == 'delete') ?
'selected' : false,
176 'text' => wfMsg( 'vector-action-delete' ),
177 'href' => $this->mTitle
->getLocalUrl( 'action=delete' )
180 if ( $this->mTitle
->quickUserCan( 'move' ) ) {
181 $moveTitle = SpecialPage
::getTitleFor(
182 'Movepage', $this->thispage
184 $links['actions']['move'] = array(
185 'class' => $this->mTitle
->isSpecial( 'Movepage' ) ?
187 'text' => wfMsg( 'vector-action-move' ),
188 'href' => $moveTitle->getLocalUrl()
193 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
194 $wgUser->isAllowed( 'protect' )
196 if ( !$this->mTitle
->isProtected() ){
197 $links['actions']['protect'] = array(
198 'class' => ($action == 'protect') ?
200 'text' => wfMsg( 'vector-action-protect' ),
202 $this->mTitle
->getLocalUrl( 'action=protect' )
206 $links['actions']['unprotect'] = array(
207 'class' => ($action == 'unprotect') ?
209 'text' => wfMsg( 'vector-action-unprotect' ),
211 $this->mTitle
->getLocalUrl( 'action=unprotect' )
216 // article doesn't exist or is deleted
218 $wgUser->isAllowed( 'deletedhistory' ) &&
219 $wgUser->isAllowed( 'undelete' )
221 if( $n = $this->mTitle
->isDeleted() ) {
222 $undelTitle = SpecialPage
::getTitleFor( 'Undelete' );
223 $links['actions']['undelete'] = array(
226 'vector-action-undelete',
228 $wgLang->formatNum( $n )
230 'href' => $undelTitle->getLocalUrl(
231 'target=' . urlencode( $this->thispage
)
238 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
239 $wgUser->isAllowed( 'protect' )
241 if ( !$this->mTitle
->getRestrictions( 'create' ) ) {
242 $links['actions']['protect'] = array(
243 'class' => ($action == 'protect') ?
245 'text' => wfMsg( 'vector-action-protect' ),
247 $this->mTitle
->getLocalUrl( 'action=protect' )
251 $links['actions']['unprotect'] = array(
252 'class' => ($action == 'unprotect') ?
254 'text' => wfMsg( 'vector-action-unprotect' ),
256 $this->mTitle
->getLocalUrl( 'action=unprotect' )
261 wfProfileOut( __METHOD__
. '-live' );
264 * The following actions use messages which, if made particular to
265 * the Vector skin, would break the Ajax code which makes this
266 * action happen entirely inline. Skin::makeGlobalVariablesScript
267 * defines a set of messages in a javascript object - and these
268 * messages are assumed to be global for all skins. Without making
269 * a change to that procedure these messages will have to remain as
270 * the global versions.
272 // Checks if the user is logged in
273 if( $this->loggedin
) {
274 // Checks if the user is watching this page
275 if( !$this->mTitle
->userIsWatching() ) {
276 // Adds watch action link
277 $links['actions']['watch'] = array(
279 ( $action == 'watch' or $action == 'unwatch' ) ?
281 'text' => wfMsg( 'watch' ),
282 'href' => $this->mTitle
->getLocalUrl( 'action=watch' )
285 // Adds unwatch action link
286 $links['actions']['unwatch'] = array(
288 ($action == 'unwatch' or $action == 'watch') ?
290 'text' => wfMsg( 'unwatch' ),
291 'href' => $this->mTitle
->getLocalUrl( 'action=unwatch' )
296 // If it's not content, it's got to be a special page
298 $links['namespaces']['special'] = array(
299 'class' => 'selected',
300 'text' => wfMsg( 'vector-namespace-special' ),
301 'href' => $wgRequest->getRequestURL()
305 // Gets list of language variants
306 $variants = $wgContLang->getVariants();
307 // Checks that language conversion is enabled and variants exist
308 if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
309 // Gets preferred variant
310 $preferred = $wgContLang->getPreferredVariant();
311 // Loops over each variant
313 foreach( $variants as $code ) {
314 // Gets variant name from language code
315 $varname = $wgContLang->getVariantname( $code );
316 // Checks if the variant is marked as disabled
317 if( $varname == 'disable' ) {
318 // Skips this variant
321 // Appends variant link
322 $links['variants'][$vcount] = array(
323 'class' => ( $code == $preferred ) ?
'selected' : false,
325 'href' => $this->mTitle
->getLocalURL( '', $code )
331 wfProfileOut( __METHOD__
);
338 * QuickTemplate class for Vector skin
341 class VectorTemplate
extends QuickTemplate
{
346 * @var Cached skin object
353 * Outputs the entire contents of the XHTML page
355 public function execute() {
356 global $wgRequest, $wgUseTwoButtonsSearchForm;
358 $this->skin
= $this->data
['skin'];
359 $action = $wgRequest->getText( 'action' );
361 // Suppress warnings to prevent notices about missing indexes in
362 // $this->data (is this really the best way to handle this?)
363 wfSuppressWarnings();
365 // Build additional attributes for navigation urls
366 $nav = $this->skin
->buildNavigationUrls();
367 foreach ( $nav as $section => $links ) {
368 foreach ( $links as $key => $link ) {
369 $nav[$section][$key]['attributes'] =
370 ' id="' . Sanitizer
::escapeId( "ca-$key" ) . '"';
371 if ( $nav[$section][$key]['class'] ) {
372 $nav[$section][$key]['attributes'] .=
373 ' class="' . htmlspecialchars( $link['class'] ) . '"';
375 // We don't want to give the watch tab an accesskey if the page is
376 // being edited, because that conflicts with the accesskey on the
377 // watch checkbox. We also don't want to give the edit tab an
378 // accesskey, because that's fairly superfluous and conflicts with
379 // an accesskey (Ctrl-E) often used for editing in Safari.
381 in_array( $action, array( 'edit', 'submit' ) ) &&
382 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
384 $nav[$section][$key]['key'] =
385 $this->skin
->tooltip( "ca-$key" );
387 $nav[$section][$key]['key'] =
388 $this->skin
->tooltipAndAccesskey( "ca-$key" );
392 $this->data
['namespace_urls'] = $nav['namespaces'];
393 $this->data
['view_urls'] = $nav['views'];
394 $this->data
['action_urls'] = $nav['actions'];
395 $this->data
['variant_urls'] = $nav['variants'];
397 // Build additional attributes for personal_urls
398 foreach ( $this->data
['personal_urls'] as $key => $item) {
399 $this->data
['personal_urls'][$key]['attributes'] =
400 ' id="' . Sanitizer
::escapeId( "pt-$key" ) . '"';
401 if ( $item['active'] ) {
402 $this->data
['personal_urls'][$key]['attributes'] .=
405 $this->data
['personal_urls'][$key]['key'] =
406 $this->skin
->tooltipAndAccesskey('pt-'.$key);
409 // Generate additional footer links
410 $footerlinks = array(
414 'numberofwatchingusers',
426 // Build list of valid footer links
427 $validFooterLinks = array();
428 foreach( $footerlinks as $category => $links ) {
429 $validFooterLinks[$category] = array();
430 foreach( $links as $link ) {
431 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
432 $validFooterLinks[$category][] = $link;
437 // Begin content output
438 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
439 <html xmlns
="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data
['xhtmlnamespaces'] as $tag => $ns): ?
>xmlns
:<?php
echo "{$tag}=\"{$ns}\" "; ?
><?php
endforeach ?
>xml
:lang
="<?php $this->text('lang') ?>" lang
="<?php $this->text('lang') ?>" dir
="<?php $this->text('dir') ?>">
441 <meta http
-equiv
="Content-Type" content
="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
442 <title
><?php
$this->text('pagetitle') ?
></title
>
444 <?php
$this->html('headlinks') ?
>
447 <?php
$this->html('csslinks') ?
>
450 <!--[if lt IE
7]><script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script
>
451 <meta http
-equiv
="imagetoolbar" content
="no" /><![endif]-->
452 <style type
="text/css">body
{behavior
:url("<?php $this->text('stylepath') ?>/vector/csshover.htc")}</style
>
454 <!-- globalVariablesScript
-->
455 <?php
echo Skin
::makeGlobalVariablesScript( $this->data
); ?
>
456 <!-- /globalVariablesScript
-->
458 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js
--></script
>
461 <?php
$this->html('headscripts') ?
>
462 <!-- /headscripts
-->
463 <?php
if($this->data
['jsvarurl']): ?
>
465 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('jsvarurl') ?>"><!-- site js
--></script
>
468 <?php
if($this->data
['pagecss']): ?
>
470 <style type
="text/css"><?php
$this->html('pagecss') ?
></style
>
473 <?php
if($this->data
['usercss']): ?
>
475 <style type
="text/css"><?php
$this->html('usercss') ?
></style
>
478 <?php
if($this->data
['userjs']): ?
>
480 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('userjs' ) ?>"></script
>
483 <?php
if($this->data
['userjsprev']): ?
>
485 <script type
="<?php $this->text('jsmimetype') ?>"><?php
$this->html('userjsprev') ?
></script
>
488 <?php
if($this->data
['trackbackhtml']): ?
>
489 <!-- trackbackhtml
-->
490 <?php
echo $this->data
['trackbackhtml']; ?
>
491 <!-- /trackbackhtml
-->
494 <body
<?php
if($this->data
['body_ondblclick']): ?
> ondblclick
="<?php $this->text('body_ondblclick') ?>"<?php
endif; ?
> <?php
if($this->data
['body_onload']): ?
> onload
="<?php $this->text('body_onload') ?>"<?php
endif; ?
> class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">
495 <div id
="page-base" class="noprint"></div
>
496 <div id
="head-base" class="noprint"></div
>
499 <a name
="top" id
="top"></a
>
501 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
503 <!-- firstHeading
-->
504 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html('title') ?
></h1
>
505 <!-- /firstHeading
-->
507 <div id
="bodyContent">
509 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
512 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
514 <?php
if($this->data
['undelete']): ?
>
516 <div id
="contentSub2"><?php
$this->html('undelete') ?
></div
>
519 <?php
if($this->data
['newtalk'] ): ?
>
521 <div
class="usermessage"><?php
$this->html('newtalk') ?
></div
>
524 <?php
if($this->data
['showjumplinks']): ?
>
526 <div id
="jump-to-nav">
527 <?php
$this->msg('jumpto') ?
> <a href
="#head"><?php
$this->msg('jumptonavigation') ?
></a
>,
528 <a href
="#search"><?php
$this->msg('jumptosearch') ?
></a
>
533 <?php
$this->html('bodytext') ?
>
536 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
538 <!-- dataAfterContent
-->
539 <?php
if($this->data
['dataAfterContent']) { $this->html('dataAfterContent'); } ?
>
540 <!-- /dataAfterContent
-->
541 <div
class="visualClear"></div
>
543 <!-- /bodyContent
-->
547 <div id
="head" class="noprint">
550 <h5
><?php
$this->msg('personaltools') ?
></h5
>
551 <ul
<?php
$this->html('userlangattributes') ?
>>
552 <?php
foreach($this->data
['personal_urls'] as $key => $item): ?
>
553 <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
>
558 <div id
="left-navigation">
560 <div id
="namespaces">
561 <h5
><?php
$this->msg('namespaces') ?
></h5
>
562 <ul
<?php
$this->html('userlangattributes') ?
>>
563 <?php
foreach ($this->data
['namespace_urls'] as $key => $link ): ?
>
564 <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
>
570 <?php
if ( count( $this->data
['variant_urls'] ) > 0 ): ?
>
572 <h5
><div
class="icon"><span
><?php
$this->msg('variants') ?
></span
></div
></h5
>
574 <ul
<?php
$this->html('userlangattributes') ?
>>
575 <?php
foreach ($this->data
['variant_urls'] as $key => $link ): ?
>
576 <li
<?php
echo $link['attributes'] ?
><?php
if(!empty($link['class'])): ?
> class="<?php echo htmlspecialchars($link['class']) ?>"<?php
endif; ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
584 <div id
="right-navigation">
586 <?php
if ( count( $this->data
['view_urls'] ) > 0 ): ?
>
588 <h5
><?php
$this->msg('views') ?
></h5
>
589 <ul
<?php
$this->html('userlangattributes') ?
>>
590 <?php
foreach ($this->data
['view_urls'] as $key => $link ): ?
>
591 <li
<?php
echo $link['attributes'] ?
><?php
if(!empty($link['class'])): ?
> class="<?php echo htmlspecialchars($link['class']) ?>"<?php
endif; ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><span
><?php
echo htmlspecialchars( $link['text'] ) ?
></span
></a
></li
>
598 <?php
if ( count( $this->data
['action_urls'] ) > 0 ): ?
>
600 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"> 
;</a
></h5
>
602 <ul
<?php
$this->html('userlangattributes') ?
>>
603 <?php
foreach ($this->data
['action_urls'] as $key => $link ): ?
>
604 <li
<?php
echo $link['attributes'] ?
><?php
if(!empty($link['class'])): ?
> class="<?php echo htmlspecialchars($link['class']) ?>"<?php
endif; ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
613 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
614 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
615 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
616 <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; ?
> />
617 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
618 <?php
if ( $wgUseTwoButtonsSearchForm ): ?
>
619 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
621 <div
><a href
="<?php $this->text( 'searchaction' ) ?>" rel
="search"><?php
$this->msg( 'powersearch-legend' ) ?
></a
></div
>
630 <div id
="panel" class="noprint">
633 $sidebar = $this->data
['sidebar'];
634 $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) );
635 $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) );
636 foreach ( $sidebar as $name => $content ) {
644 $this->languageBox();
647 $this->customBox( $name, $content );
655 <div
class="break"></div
>
658 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
659 <?php
if ( count( $links ) > 0 ): ?
>
660 <ul id
="foot-<?php echo $category ?>">
661 <?php
foreach( $links as $link ): ?
>
662 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
663 <li id
="foot-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
669 <ul id
="foot-icons" class="noprint">
670 <?php
if( $this->data
['poweredbyico'] ): ?
>
671 <li id
="foot-icon-poweredby"><?php
$this->html( 'poweredbyico' ) ?
></li
>
673 <?php
if( $this->data
['copyrightico'] ): ?
>
674 <li id
="foot-icon-copyright"><?php
$this->html( 'copyrightico' ) ?
></li
>
677 <div style
="clear:both"></div
>
682 <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
>
686 <script type
="<?php $this->text('jsmimetype') ?>"> if (window
.isMSIE55
) fixalpha( 'logo' ); </script
>
688 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
689 <?php
$this->html( 'reporttime' ) ?
>
690 <?php
if ( $this->data
['debug'] ): ?
>
692 <?php
$this->text( 'debug' ); ?
>
698 // We're done with abusing arrays now...
703 * Outputs a box with a list of tools
705 private function toolBox() {
707 <div
class="portal" id
="p-tb">
708 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
711 <?php
if( $this->data
['notspecialpage'] ): ?
>
712 <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
>
713 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
714 <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
>
717 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
718 <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
>
720 <?php
if( $this->data
['feeds']): ?
>
722 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
723 <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
>
727 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
728 <?php
if( $this->data
['nav_urls'][$special]): ?
>
729 <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
>
732 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
733 <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
>
735 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
736 <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
>
737 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
738 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
740 <?php
wfRunHooks( 'VectorTemplateToolboxEnd', array( &$this ) ); ?
>
741 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
749 * Outputs a box with a list of alternative languages for this page
751 private function languageBox() {
752 if( $this->data
['language_urls'] ) {
754 <div
class="portal" id
="p-lang">
755 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
758 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
759 <li
class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href
="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php
echo $langlink['text'] ?
></a
></li
>
769 * Outputs a box with a custom list of items or HTML content
770 * @param string $bar Message name for title of box
771 * @param mixed $content HTML or array of items to build a list from
773 private function customBox( $bar, $content ) {
775 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $bar ) ?
>>
776 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?
></h5
>
778 <?php
if ( is_array( $content ) ): ?
>
780 <?php
foreach( $content as $key => $val ): ?
>
781 <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
>
785 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>