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 ) {
29 parent
::initPage( $out );
30 $this->skinname
= 'vector';
31 $this->stylename
= 'vector';
32 $this->template
= 'VectorTemplate';
34 // Append skin-specific styles
35 $out->addStyle( 'vector/main-rtl.css', 'screen', '', 'rtl' );
36 $out->addStyle( 'vector/main-ltr.css', 'screen', '', 'ltr' );
37 // Append CSS which includes IE only behavior fixes for hover support -
38 // this is better than including this in a CSS fille since it doesn't
39 // wait for the CSS file to load before fetching the HTC file.
41 '<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
43 '/vector/csshover.htc")}</style><![endif]-->'
47 * Builds a structured array of links used for tabs and menus
51 function buildNavigationUrls() {
52 global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
53 global $wgDisableLangConversion;
55 wfProfileIn( __METHOD__
);
58 'namespaces' => array(),
65 $action = $wgRequest->getVal( 'action', 'view' );
66 $section = $wgRequest->getVal( 'section' );
68 // Checks if page is some kind of content
69 if( $this->iscontent
) {
71 // Gets page objects for the related namespaces
72 $subjectPage = $this->mTitle
->getSubjectPage();
73 $talkPage = $this->mTitle
->getTalkPage();
75 // Determines if this is a talk page
76 $isTalk = $this->mTitle
->isTalkPage();
78 // Generates XML IDs from namespace names
79 $subjectId = $this->mTitle
->getNamespaceKey( '' );
81 if ( $subjectId == 'main' ) {
84 $talkId = "{$subjectId}_talk";
86 $currentId = $isTalk ?
$talkId : $subjectId;
88 // Adds namespace links
89 $links['namespaces'][$subjectId] = $this->tabAction(
90 $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
92 $links['namespaces'][$subjectId]['context'] = 'subject';
93 $links['namespaces'][$talkId] = $this->tabAction(
94 $talkPage, 'vector-namespace-talk', $isTalk, '', true
96 $links['namespaces'][$talkId]['context'] = 'talk';
98 // Adds view view link
99 if ( $this->mTitle
->exists() ) {
100 $links['views']['view'] = $this->tabAction(
101 $isTalk ?
$talkPage : $subjectPage,
102 'vector-view-view', ( $action == 'view' ), '', true
106 wfProfileIn( __METHOD__
. '-edit' );
108 // Checks if user can...
110 // edit the current page
111 $this->mTitle
->quickUserCan( 'edit' ) &&
114 $this->mTitle
->exists() ||
115 // or they can create one here
116 $this->mTitle
->quickUserCan( 'create' )
119 // Builds CSS class for talk page links
120 $isTalkClass = $isTalk ?
' istalk' : '';
122 // Determines if we're in edit mode
124 ( $action == 'edit' ||
$action == 'submit' ) &&
125 ( $section != 'new' )
127 $links['views']['edit'] = array(
128 'class' => ( $selected ?
'selected' : '' ) . $isTalkClass,
129 'text' => $this->mTitle
->exists()
130 ?
wfMsg( 'vector-view-edit' )
131 : wfMsg( 'vector-view-create' ),
133 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
135 // Checks if this is a current rev of talk page and we should show a new
137 if ( ( $isTalk && $wgArticle->isCurrent() ) ||
( $wgOut->showNewSectionLink() ) ) {
138 // Checks if we should ever show a new section link
139 if ( !$wgOut->forceHideNewSectionLink() ) {
140 // Adds new section link
141 $links['actions']['addsection'] = array(
142 'class' => $section == 'new' ?
'selected' : false,
143 'text' => wfMsg( 'vector-action-addsection' ),
144 'href' => $this->mTitle
->getLocalUrl(
145 'action=edit§ion=new'
150 // Checks if the page is known (some kind of viewable content)
151 } elseif ( $this->mTitle
->isKnown() ) {
152 // Adds view source view link
153 $links['views']['viewsource'] = array(
154 'class' => ( $action == 'edit' ) ?
'selected' : false,
155 'text' => wfMsg( 'vector-view-viewsource' ),
157 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
160 wfProfileOut( __METHOD__
. '-edit' );
162 wfProfileIn( __METHOD__
. '-live' );
164 // Checks if the page exists
165 if ( $this->mTitle
->exists() ) {
166 // Adds history view link
167 $links['views']['history'] = array(
168 'class' => ($action == 'history') ?
'selected' : false,
169 'text' => wfMsg( 'vector-view-history' ),
170 'href' => $this->mTitle
->getLocalUrl( 'action=history' ),
174 if( $wgUser->isAllowed( 'delete' ) ) {
175 $links['actions']['delete'] = array(
176 'class' => ($action == 'delete') ?
'selected' : false,
177 'text' => wfMsg( 'vector-action-delete' ),
178 'href' => $this->mTitle
->getLocalUrl( 'action=delete' )
181 if ( $this->mTitle
->quickUserCan( 'move' ) ) {
182 $moveTitle = SpecialPage
::getTitleFor(
183 'Movepage', $this->thispage
185 $links['actions']['move'] = array(
186 'class' => $this->mTitle
->isSpecial( 'Movepage' ) ?
188 'text' => wfMsg( 'vector-action-move' ),
189 'href' => $moveTitle->getLocalUrl()
194 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
195 $wgUser->isAllowed( 'protect' )
197 if ( !$this->mTitle
->isProtected() ){
198 $links['actions']['protect'] = array(
199 'class' => ($action == 'protect') ?
201 'text' => wfMsg( 'vector-action-protect' ),
203 $this->mTitle
->getLocalUrl( 'action=protect' )
207 $links['actions']['unprotect'] = array(
208 'class' => ($action == 'unprotect') ?
210 'text' => wfMsg( 'vector-action-unprotect' ),
212 $this->mTitle
->getLocalUrl( 'action=unprotect' )
217 // article doesn't exist or is deleted
219 $wgUser->isAllowed( 'deletedhistory' ) &&
220 $wgUser->isAllowed( 'undelete' )
222 if( $n = $this->mTitle
->isDeleted() ) {
223 $undelTitle = SpecialPage
::getTitleFor( 'Undelete' );
224 $links['actions']['undelete'] = array(
227 'vector-action-undelete',
229 $wgLang->formatNum( $n )
231 'href' => $undelTitle->getLocalUrl(
232 'target=' . urlencode( $this->thispage
)
239 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
240 $wgUser->isAllowed( 'protect' )
242 if ( !$this->mTitle
->getRestrictions( 'create' ) ) {
243 $links['actions']['protect'] = array(
244 'class' => ($action == 'protect') ?
246 'text' => wfMsg( 'vector-action-protect' ),
248 $this->mTitle
->getLocalUrl( 'action=protect' )
252 $links['actions']['unprotect'] = array(
253 'class' => ($action == 'unprotect') ?
255 'text' => wfMsg( 'vector-action-unprotect' ),
257 $this->mTitle
->getLocalUrl( 'action=unprotect' )
262 wfProfileOut( __METHOD__
. '-live' );
265 * The following actions use messages which, if made particular to
266 * the Vector skin, would break the Ajax code which makes this
267 * action happen entirely inline. Skin::makeGlobalVariablesScript
268 * defines a set of messages in a javascript object - and these
269 * messages are assumed to be global for all skins. Without making
270 * a change to that procedure these messages will have to remain as
271 * the global versions.
273 // Checks if the user is logged in
274 if( $this->loggedin
) {
275 // Checks if the user is watching this page
276 if( !$this->mTitle
->userIsWatching() ) {
277 // Adds watch action link
278 $links['actions']['watch'] = array(
280 ( $action == 'watch' or $action == 'unwatch' ) ?
282 'text' => wfMsg( 'watch' ),
283 'href' => $this->mTitle
->getLocalUrl( 'action=watch' )
286 // Adds unwatch action link
287 $links['actions']['unwatch'] = array(
289 ($action == 'unwatch' or $action == 'watch') ?
291 'text' => wfMsg( 'unwatch' ),
292 'href' => $this->mTitle
->getLocalUrl( 'action=unwatch' )
297 // This is instead of SkinTemplateTabs - which uses a flat array
298 wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
300 // If it's not content, it's got to be a special page
302 $links['namespaces']['special'] = array(
303 'class' => 'selected',
304 'text' => wfMsg( 'vector-namespace-special' ),
305 'href' => $wgRequest->getRequestURL()
309 // Gets list of language variants
310 $variants = $wgContLang->getVariants();
311 // Checks that language conversion is enabled and variants exist
312 if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
313 // Gets preferred variant
314 $preferred = $wgContLang->getPreferredVariant();
315 // 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'][] = array(
326 'class' => ( $code == $preferred ) ?
'selected' : false,
328 'href' => $this->mTitle
->getLocalURL( '', $code )
333 wfProfileOut( __METHOD__
);
340 * QuickTemplate class for Vector skin
343 class VectorTemplate
extends QuickTemplate
{
348 * @var Cached skin object
355 * Outputs the entire contents of the XHTML page
357 public function execute() {
358 global $wgRequest, $wgUseTwoButtonsSearchForm, $wgOut;
360 $this->skin
= $this->data
['skin'];
361 $action = $wgRequest->getText( 'action' );
363 // Suppress warnings to prevent notices about missing indexes in
364 // $this->data (is this really the best way to handle this?)
365 wfSuppressWarnings();
367 // Build additional attributes for navigation urls
368 $nav = $this->skin
->buildNavigationUrls();
369 foreach ( $nav as $section => $links ) {
370 foreach ( $links as $key => $link ) {
372 if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
373 $xmlID = 'ca-nstab-' . $xmlID;
374 } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
377 $xmlID = 'ca-' . $xmlID;
379 $nav[$section][$key]['attributes'] =
380 ' id="' . Sanitizer
::escapeId( $xmlID ) . '"';
381 if ( $nav[$section][$key]['class'] ) {
382 $nav[$section][$key]['attributes'] .=
383 ' class="' . htmlspecialchars( $link['class'] ) . '"';
384 unset( $nav[$section][$key]['class'] );
387 // We don't want to give the watch tab an accesskey if the page is
388 // being edited, because that conflicts with the accesskey on the
389 // watch checkbox. We also don't want to give the edit tab an
390 // accesskey, because that's fairly superfluous and conflicts with
391 // an accesskey (Ctrl-E) often used for editing in Safari.
393 in_array( $action, array( 'edit', 'submit' ) ) &&
394 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
396 $nav[$section][$key]['key'] =
397 $this->skin
->tooltip( $xmlID );
399 $nav[$section][$key]['key'] =
400 $this->skin
->tooltipAndAccesskey( $xmlID );
404 $this->data
['namespace_urls'] = $nav['namespaces'];
405 $this->data
['view_urls'] = $nav['views'];
406 $this->data
['action_urls'] = $nav['actions'];
407 $this->data
['variant_urls'] = $nav['variants'];
409 // Build additional attributes for personal_urls
410 foreach ( $this->data
['personal_urls'] as $key => $item) {
411 $this->data
['personal_urls'][$key]['attributes'] =
412 ' id="' . Sanitizer
::escapeId( "pt-$key" ) . '"';
413 if ( $item['active'] ) {
414 $this->data
['personal_urls'][$key]['attributes'] .=
417 $this->data
['personal_urls'][$key]['key'] =
418 $this->skin
->tooltipAndAccesskey('pt-'.$key);
421 // Generate additional footer links
422 $footerlinks = array(
426 'numberofwatchingusers',
438 // Build list of valid footer links
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;
449 // Begin content output
451 echo $wgOut->headElement( $this->skin
);
452 ?
> <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') ?>">
453 <div id
="page-base" class="noprint"></div
>
454 <div id
="head-base" class="noprint"></div
>
458 <div id
="mw-js-message" style
="display:none;"></div
>
460 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
462 <!-- firstHeading
-->
463 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html('title') ?
></h1
>
464 <!-- /firstHeading
-->
466 <div id
="bodyContent">
468 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
471 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
473 <?php
if($this->data
['undelete']): ?
>
475 <div id
="contentSub2"><?php
$this->html('undelete') ?
></div
>
478 <?php
if($this->data
['newtalk'] ): ?
>
480 <div
class="usermessage"><?php
$this->html('newtalk') ?
></div
>
483 <?php
if($this->data
['showjumplinks']): ?
>
485 <div id
="jump-to-nav">
486 <?php
$this->msg('jumpto') ?
> <a href
="#head"><?php
$this->msg('jumptonavigation') ?
></a
>,
487 <a href
="#search"><?php
$this->msg('jumptosearch') ?
></a
>
492 <?php
$this->html('bodytext') ?
>
495 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
497 <!-- dataAfterContent
-->
498 <?php
if($this->data
['dataAfterContent']) { $this->html('dataAfterContent'); } ?
>
499 <!-- /dataAfterContent
-->
500 <div
class="visualClear"></div
>
502 <!-- /bodyContent
-->
506 <div id
="head" class="noprint">
508 <?php
if ( count( $this->data
['personal_urls'] ) > 0 ): ?
>
509 <div id
="p-personal">
510 <h5
><?php
$this->msg('personaltools') ?
></h5
>
511 <ul
<?php
$this->html('userlangattributes') ?
>>
512 <?php
foreach($this->data
['personal_urls'] as $key => $item): ?
>
513 <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
>
519 <div id
="left-navigation">
521 <?php
if ( count( $this->data
['namespace_urls'] ) > 0 ): ?
>
522 <div id
="namespaces" class="vectorTabs">
523 <h5
><?php
$this->msg('namespaces') ?
></h5
>
524 <ul
<?php
$this->html('userlangattributes') ?
>>
525 <?php
foreach ($this->data
['namespace_urls'] as $key => $link ): ?
>
526 <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
>
533 <?php
if ( count( $this->data
['variant_urls'] ) > 0 ): ?
>
534 <div id
="variants" class="vectorMenu">
535 <h5
><span
><?php
$this->msg('variants') ?
></span
><a href
="#"> 
;</a
></h5
>
537 <ul
<?php
$this->html('userlangattributes') ?
>>
538 <?php
foreach ($this->data
['variant_urls'] as $key => $link ): ?
>
539 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
547 <div id
="right-navigation">
549 <?php
if ( count( $this->data
['view_urls'] ) > 0 ): ?
>
550 <div id
="views" class="vectorTabs">
551 <h5
><?php
$this->msg('views') ?
></h5
>
552 <ul
<?php
$this->html('userlangattributes') ?
>>
553 <?php
foreach ($this->data
['view_urls'] as $key => $link ): ?
>
554 <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
>
561 <?php
if ( count( $this->data
['action_urls'] ) > 0 ): ?
>
562 <div id
="p-cactions" class="vectorMenu">
563 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"> 
;</a
></h5
>
565 <ul
<?php
$this->html('userlangattributes') ?
>>
566 <?php
foreach ($this->data
['action_urls'] as $key => $link ): ?
>
567 <li
<?php
echo $link['attributes'] ?
>><a href
="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php
echo $link['key'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
576 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
577 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
578 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
579 <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; ?
> />
580 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
581 <?php
if ( $wgUseTwoButtonsSearchForm ): ?
>
582 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
584 <div
><a href
="<?php $this->text( 'searchaction' ) ?>" rel
="search"><?php
$this->msg( 'powersearch-legend' ) ?
></a
></div
>
593 <div id
="panel" class="noprint">
596 $sidebar = $this->data
['sidebar'];
597 $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) );
598 $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) );
599 foreach ( $sidebar as $name => $content ) {
607 $this->languageBox();
610 $this->customBox( $name, $content );
618 <div
class="break"></div
>
621 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
622 <?php
if ( count( $links ) > 0 ): ?
>
623 <ul id
="foot-<?php echo $category ?>">
624 <?php
foreach( $links as $link ): ?
>
625 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
626 <li id
="foot-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
632 <ul id
="foot-icons" class="noprint">
633 <?php
if( $this->data
['poweredbyico'] ): ?
>
634 <li id
="foot-icon-poweredby"><?php
$this->html( 'poweredbyico' ) ?
></li
>
636 <?php
if( $this->data
['copyrightico'] ): ?
>
637 <li id
="foot-icon-copyright"><?php
$this->html( 'copyrightico' ) ?
></li
>
640 <div style
="clear:both"></div
>
645 <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
>
649 <script type
="<?php $this->text('jsmimetype') ?>"> if (window
.isMSIE55
) fixalpha( 'p-logo' ); </script
>
651 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
652 <?php
$this->html( 'reporttime' ) ?
>
653 <?php
if ( $this->data
['debug'] ): ?
>
655 <?php
$this->text( 'debug' ); ?
>
661 // We're done with abusing arrays now...
666 * Outputs a box with a list of tools
668 private function toolBox() {
670 <div
class="portal" id
="p-tb">
671 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
674 <?php
if( $this->data
['notspecialpage'] ): ?
>
675 <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
>
676 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
677 <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
>
680 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
681 <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
>
683 <?php
if( $this->data
['feeds']): ?
>
685 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
686 <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
>
690 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
691 <?php
if( $this->data
['nav_urls'][$special]): ?
>
692 <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
>
695 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
696 <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
>
698 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
699 <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
>
700 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
701 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
703 <?php
wfRunHooks( 'VectorTemplateToolboxEnd', array( &$this ) ); ?
>
704 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
712 * Outputs a box with a list of alternative languages for this page
714 private function languageBox() {
715 if( $this->data
['language_urls'] ) {
717 <div
class="portal" id
="p-lang">
718 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
721 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
722 <li
class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href
="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php
echo $langlink['text'] ?
></a
></li
>
732 * Outputs a box with a custom list of items or HTML content
733 * @param string $bar Message name for title of box
734 * @param mixed $content HTML or array of items to build a list from
736 private function customBox( $bar, $content ) {
738 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $bar ) ?
>>
739 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?
></h5
>
741 <?php
if ( is_array( $content ) ): ?
>
743 <?php
foreach( $content as $key => $val ): ?
>
744 <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
>
748 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>