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 // 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( 'vector-namespace-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
316 foreach( $variants as $code ) {
317 // Gets variant name from language code
318 $varname = $wgContLang->getVariantname( $code );
319 // Checks if the variant is marked as disabled
320 if( $varname == 'disable' ) {
321 // Skips this variant
324 // Appends variant link
325 $links['variants'][$vcount] = array(
326 'class' => ( $code == $preferred ) ?
'selected' : false,
328 'href' => $this->mTitle
->getLocalURL( '', $code )
334 wfProfileOut( __METHOD__
);
341 * QuickTemplate class for Vector skin
344 class VectorTemplate
extends QuickTemplate
{
349 * @var Cached skin object
356 * Outputs the entire contents of the XHTML page
358 public function execute() {
359 global $wgRequest, $wgUseTwoButtonsSearchForm;
361 $this->skin
= $this->data
['skin'];
362 $action = $wgRequest->getText( 'action' );
364 // Suppress warnings to prevent notices about missing indexes in
365 // $this->data (is this really the best way to handle this?)
366 wfSuppressWarnings();
368 // Build additional attributes for navigation urls
369 $nav = $this->skin
->buildNavigationUrls();
370 foreach ( $nav as $section => $links ) {
371 foreach ( $links as $key => $link ) {
372 $nav[$section][$key]['attributes'] =
373 ' id="' . Sanitizer
::escapeId( "ca-$key" ) . '"';
374 if ( $nav[$section][$key]['class'] ) {
375 $nav[$section][$key]['attributes'] .=
376 ' class="' . htmlspecialchars( $link['class'] ) . '"';
378 // We don't want to give the watch tab an accesskey if the page is
379 // being edited, because that conflicts with the accesskey on the
380 // watch checkbox. We also don't want to give the edit tab an
381 // accesskey, because that's fairly superfluous and conflicts with
382 // an accesskey (Ctrl-E) often used for editing in Safari.
384 in_array( $action, array( 'edit', 'submit' ) ) &&
385 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
387 $nav[$section][$key]['key'] =
388 $this->skin
->tooltip( "ca-$key" );
390 $nav[$section][$key]['key'] =
391 $this->skin
->tooltipAndAccesskey( "ca-$key" );
395 $this->data
['namespace_urls'] = $nav['namespaces'];
396 $this->data
['view_urls'] = $nav['views'];
397 $this->data
['action_urls'] = $nav['actions'];
398 $this->data
['variant_urls'] = $nav['variants'];
400 // Build additional attributes for personal_urls
401 foreach ( $this->data
['personal_urls'] as $key => $item) {
402 $this->data
['personal_urls'][$key]['attributes'] =
403 ' id="' . Sanitizer
::escapeId( "pt-$key" ) . '"';
404 if ( $item['active'] ) {
405 $this->data
['personal_urls'][$key]['attributes'] .=
408 $this->data
['personal_urls'][$key]['key'] =
409 $this->skin
->tooltipAndAccesskey('pt-'.$key);
412 // Generate additional footer links
413 $footerlinks = array(
417 'numberofwatchingusers',
429 // Build list of valid footer links
430 $validFooterLinks = array();
431 foreach( $footerlinks as $category => $links ) {
432 $validFooterLinks[$category] = array();
433 foreach( $links as $link ) {
434 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
435 $validFooterLinks[$category][] = $link;
440 // Begin content output
441 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
442 <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') ?>">
444 <meta http
-equiv
="Content-Type" content
="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
445 <title
><?php
$this->text('pagetitle') ?
></title
>
447 <?php
$this->html('headlinks') ?
>
450 <?php
$this->html('csslinks') ?
>
453 <!--[if lt IE
7]><script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script
>
454 <meta http
-equiv
="imagetoolbar" content
="no" /><![endif]-->
455 <style type
="text/css">body
{behavior
:url("<?php $this->text('stylepath') ?>/vector/csshover.htc")}</style
>
457 <!-- globalVariablesScript
-->
458 <?php
echo Skin
::makeGlobalVariablesScript( $this->data
); ?
>
459 <!-- /globalVariablesScript
-->
461 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js
--></script
>
464 <?php
$this->html('headscripts') ?
>
465 <!-- /headscripts
-->
466 <?php
if($this->data
['jsvarurl']): ?
>
468 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('jsvarurl') ?>"><!-- site js
--></script
>
471 <?php
if($this->data
['pagecss']): ?
>
473 <style type
="text/css"><?php
$this->html('pagecss') ?
></style
>
476 <?php
if($this->data
['usercss']): ?
>
478 <style type
="text/css"><?php
$this->html('usercss') ?
></style
>
481 <?php
if($this->data
['userjs']): ?
>
483 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('userjs' ) ?>"></script
>
486 <?php
if($this->data
['userjsprev']): ?
>
488 <script type
="<?php $this->text('jsmimetype') ?>"><?php
$this->html('userjsprev') ?
></script
>
491 <?php
if($this->data
['trackbackhtml']): ?
>
492 <!-- trackbackhtml
-->
493 <?php
echo $this->data
['trackbackhtml']; ?
>
494 <!-- /trackbackhtml
-->
497 <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') ?>">
498 <div id
="page-base" class="noprint"></div
>
499 <div id
="head-base" class="noprint"></div
>
502 <a name
="top" id
="top"></a
>
504 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
506 <!-- firstHeading
-->
507 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html('title') ?
></h1
>
508 <!-- /firstHeading
-->
510 <div id
="bodyContent">
512 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
515 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
517 <?php
if($this->data
['undelete']): ?
>
519 <div id
="contentSub2"><?php
$this->html('undelete') ?
></div
>
522 <?php
if($this->data
['newtalk'] ): ?
>
524 <div
class="usermessage"><?php
$this->html('newtalk') ?
></div
>
527 <?php
if($this->data
['showjumplinks']): ?
>
529 <div id
="jump-to-nav">
530 <?php
$this->msg('jumpto') ?
> <a href
="#head"><?php
$this->msg('jumptonavigation') ?
></a
>,
531 <a href
="#search"><?php
$this->msg('jumptosearch') ?
></a
>
536 <?php
$this->html('bodytext') ?
>
539 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
541 <!-- dataAfterContent
-->
542 <?php
if($this->data
['dataAfterContent']) { $this->html('dataAfterContent'); } ?
>
543 <!-- /dataAfterContent
-->
544 <div
class="visualClear"></div
>
546 <!-- /bodyContent
-->
550 <div id
="head" class="noprint">
553 <h5
><?php
$this->msg('personaltools') ?
></h5
>
554 <ul
<?php
$this->html('userlangattributes') ?
>>
555 <?php
foreach($this->data
['personal_urls'] as $key => $item): ?
>
556 <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
>
561 <div id
="left-navigation">
563 <div id
="namespaces">
564 <h5
><?php
$this->msg('namespaces') ?
></h5
>
565 <ul
<?php
$this->html('userlangattributes') ?
>>
566 <?php
foreach ($this->data
['namespace_urls'] as $key => $link ): ?
>
567 <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
>
573 <?php
if ( count( $this->data
['variant_urls'] ) > 0 ): ?
>
575 <h5
><div
class="icon"><span
><?php
$this->msg('variants') ?
></span
></div
></h5
>
577 <ul
<?php
$this->html('userlangattributes') ?
>>
578 <?php
foreach ($this->data
['variant_urls'] as $key => $link ): ?
>
579 <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
>
587 <div id
="right-navigation">
589 <?php
if ( count( $this->data
['view_urls'] ) > 0 ): ?
>
591 <h5
><?php
$this->msg('views') ?
></h5
>
592 <ul
<?php
$this->html('userlangattributes') ?
>>
593 <?php
foreach ($this->data
['view_urls'] as $key => $link ): ?
>
594 <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
>
601 <?php
if ( count( $this->data
['action_urls'] ) > 0 ): ?
>
603 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"> 
;</a
></h5
>
605 <ul
<?php
$this->html('userlangattributes') ?
>>
606 <?php
foreach ($this->data
['action_urls'] as $key => $link ): ?
>
607 <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
>
616 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
617 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
618 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
619 <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; ?
> />
620 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
621 <?php
if ( $wgUseTwoButtonsSearchForm ): ?
>
622 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
624 <div
><a href
="<?php $this->text( 'searchaction' ) ?>" rel
="search"><?php
$this->msg( 'powersearch-legend' ) ?
></a
></div
>
633 <div id
="panel" class="noprint">
636 $sidebar = $this->data
['sidebar'];
637 $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) );
638 $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) );
639 foreach ( $sidebar as $name => $content ) {
647 $this->languageBox();
650 $this->customBox( $name, $content );
658 <div
class="break"></div
>
661 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
662 <?php
if ( count( $links ) > 0 ): ?
>
663 <ul id
="foot-<?php echo $category ?>">
664 <?php
foreach( $links as $link ): ?
>
665 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
666 <li id
="foot-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
672 <ul id
="foot-icons" class="noprint">
673 <?php
if( $this->data
['poweredbyico'] ): ?
>
674 <li id
="foot-icon-poweredby"><?php
$this->html( 'poweredbyico' ) ?
></li
>
676 <?php
if( $this->data
['copyrightico'] ): ?
>
677 <li id
="foot-icon-copyright"><?php
$this->html( 'copyrightico' ) ?
></li
>
680 <div style
="clear:both"></div
>
685 <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
>
689 <script type
="<?php $this->text('jsmimetype') ?>"> if (window
.isMSIE55
) fixalpha( 'logo' ); </script
>
691 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
692 <?php
$this->html( 'reporttime' ) ?
>
693 <?php
if ( $this->data
['debug'] ): ?
>
695 <?php
$this->text( 'debug' ); ?
>
701 // We're done with abusing arrays now...
706 * Outputs a box with a list of tools
708 private function toolBox() {
710 <div
class="portal" id
="p-tb">
711 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
714 <?php
if( $this->data
['notspecialpage'] ): ?
>
715 <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
>
716 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
717 <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
>
720 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
721 <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
>
723 <?php
if( $this->data
['feeds']): ?
>
725 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
726 <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
>
730 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
731 <?php
if( $this->data
['nav_urls'][$special]): ?
>
732 <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
>
735 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
736 <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
>
738 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
739 <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
>
740 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
741 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
743 <?php
wfRunHooks( 'VectorTemplateToolboxEnd', array( &$this ) ); ?
>
744 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
752 * Outputs a box with a list of alternative languages for this page
754 private function languageBox() {
755 if( $this->data
['language_urls'] ) {
757 <div
class="portal" id
="p-lang">
758 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
761 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
762 <li
class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href
="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php
echo $langlink['text'] ?
></a
></li
>
772 * Outputs a box with a custom list of items or HTML content
773 * @param string $bar Message name for title of box
774 * @param mixed $content HTML or array of items to build a list from
776 private function customBox( $bar, $content ) {
778 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $bar ) ?
>>
779 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?
></h5
>
781 <?php
if ( is_array( $content ) ): ?
>
783 <?php
foreach( $content as $key => $val ): ?
>
784 <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
>
788 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>