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 = $this->mTitle
->getNamespaceKey( '' );
84 if ( $subjectId == 'main' ) {
87 $talkId = "{$subjectId}_talk";
89 $currentId = $isTalk ?
$talkId : $subjectId;
91 // Adds namespace links
92 $links['namespaces'][$subjectId] = $this->tabAction(
93 $subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
95 $links['namespaces'][$subjectId]['context'] = 'subject';
96 $links['namespaces'][$talkId] = $this->tabAction(
97 $talkPage, 'vector-namespace-talk', $isTalk, '', true
99 $links['namespaces'][$talkId]['context'] = 'talk';
101 // Adds view view link
102 if ( $this->mTitle
->exists() ) {
103 $links['views']['view'] = $this->tabAction(
104 $isTalk ?
$talkPage : $subjectPage,
105 'vector-view-view', ( $action == 'view' ), '', true
109 wfProfileIn( __METHOD__
. '-edit' );
111 // Checks if user can...
113 // edit the current page
114 $this->mTitle
->quickUserCan( 'edit' ) &&
117 $this->mTitle
->exists() ||
118 // or they can create one here
119 $this->mTitle
->quickUserCan( 'create' )
122 // Builds CSS class for talk page links
123 $isTalkClass = $isTalk ?
' istalk' : '';
125 // Determines if we're in edit mode
127 ( $action == 'edit' ||
$action == 'submit' ) &&
128 ( $section != 'new' )
130 $links['views']['edit'] = array(
131 'class' => ( $selected ?
'selected' : '' ) . $isTalkClass,
132 'text' => $this->mTitle
->exists()
133 ?
wfMsg( 'vector-view-edit' )
134 : wfMsg( 'vector-view-create' ),
136 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
138 // Checks if this is a current rev of talk page and we should show a new
140 if ( ( $isTalk && $wgArticle->isCurrent() ) ||
( $wgOut->showNewSectionLink() ) ) {
141 // Checks if we should ever show a new section link
142 if ( !$wgOut->forceHideNewSectionLink() ) {
143 // Adds new section link
144 $links['actions']['addsection'] = array(
145 'class' => $section == 'new' ?
'selected' : false,
146 'text' => wfMsg( 'vector-action-addsection' ),
147 'href' => $this->mTitle
->getLocalUrl(
148 'action=edit§ion=new'
153 // Checks if the page is known (some kind of viewable content)
154 } elseif ( $this->mTitle
->isKnown() ) {
155 // Adds view source view link
156 $links['views']['viewsource'] = array(
157 'class' => ( $action == 'edit' ) ?
'selected' : false,
158 'text' => wfMsg( 'vector-view-viewsource' ),
160 $this->mTitle
->getLocalUrl( $this->editUrlOptions() )
163 wfProfileOut( __METHOD__
. '-edit' );
165 wfProfileIn( __METHOD__
. '-live' );
167 // Checks if the page exists
168 if ( $this->mTitle
->exists() ) {
169 // Adds history view link
170 $links['views']['history'] = array(
171 'class' => ($action == 'history') ?
'selected' : false,
172 'text' => wfMsg( 'vector-view-history' ),
173 'href' => $this->mTitle
->getLocalUrl( 'action=history' ),
177 if( $wgUser->isAllowed( 'delete' ) ) {
178 $links['actions']['delete'] = array(
179 'class' => ($action == 'delete') ?
'selected' : false,
180 'text' => wfMsg( 'vector-action-delete' ),
181 'href' => $this->mTitle
->getLocalUrl( 'action=delete' )
184 if ( $this->mTitle
->quickUserCan( 'move' ) ) {
185 $moveTitle = SpecialPage
::getTitleFor(
186 'Movepage', $this->thispage
188 $links['actions']['move'] = array(
189 'class' => $this->mTitle
->isSpecial( 'Movepage' ) ?
191 'text' => wfMsg( 'vector-action-move' ),
192 'href' => $moveTitle->getLocalUrl()
197 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
198 $wgUser->isAllowed( 'protect' )
200 if ( !$this->mTitle
->isProtected() ){
201 $links['actions']['protect'] = array(
202 'class' => ($action == 'protect') ?
204 'text' => wfMsg( 'vector-action-protect' ),
206 $this->mTitle
->getLocalUrl( 'action=protect' )
210 $links['actions']['unprotect'] = array(
211 'class' => ($action == 'unprotect') ?
213 'text' => wfMsg( 'vector-action-unprotect' ),
215 $this->mTitle
->getLocalUrl( 'action=unprotect' )
220 // article doesn't exist or is deleted
222 $wgUser->isAllowed( 'deletedhistory' ) &&
223 $wgUser->isAllowed( 'undelete' )
225 if( $n = $this->mTitle
->isDeleted() ) {
226 $undelTitle = SpecialPage
::getTitleFor( 'Undelete' );
227 $links['actions']['undelete'] = array(
230 'vector-action-undelete',
232 $wgLang->formatNum( $n )
234 'href' => $undelTitle->getLocalUrl(
235 'target=' . urlencode( $this->thispage
)
242 $this->mTitle
->getNamespace() !== NS_MEDIAWIKI
&&
243 $wgUser->isAllowed( 'protect' )
245 if ( !$this->mTitle
->getRestrictions( 'create' ) ) {
246 $links['actions']['protect'] = array(
247 'class' => ($action == 'protect') ?
249 'text' => wfMsg( 'vector-action-protect' ),
251 $this->mTitle
->getLocalUrl( 'action=protect' )
255 $links['actions']['unprotect'] = array(
256 'class' => ($action == 'unprotect') ?
258 'text' => wfMsg( 'vector-action-unprotect' ),
260 $this->mTitle
->getLocalUrl( 'action=unprotect' )
265 wfProfileOut( __METHOD__
. '-live' );
268 * The following actions use messages which, if made particular to
269 * the Vector skin, would break the Ajax code which makes this
270 * action happen entirely inline. Skin::makeGlobalVariablesScript
271 * defines a set of messages in a javascript object - and these
272 * messages are assumed to be global for all skins. Without making
273 * a change to that procedure these messages will have to remain as
274 * the global versions.
276 // Checks if the user is logged in
277 if( $this->loggedin
) {
278 // Checks if the user is watching this page
279 if( !$this->mTitle
->userIsWatching() ) {
280 // Adds watch action link
281 $links['actions']['watch'] = array(
283 ( $action == 'watch' or $action == 'unwatch' ) ?
285 'text' => wfMsg( 'watch' ),
286 'href' => $this->mTitle
->getLocalUrl( 'action=watch' )
289 // Adds unwatch action link
290 $links['actions']['unwatch'] = array(
292 ($action == 'unwatch' or $action == 'watch') ?
294 'text' => wfMsg( 'unwatch' ),
295 'href' => $this->mTitle
->getLocalUrl( 'action=unwatch' )
300 // This is instead of SkinTemplateTabs - which uses a flat array
301 wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
303 // If it's not content, it's got to be a special page
305 $links['namespaces']['special'] = array(
306 'class' => 'selected',
307 'text' => wfMsg( 'vector-namespace-special' ),
308 'href' => $wgRequest->getRequestURL()
312 // Gets list of language variants
313 $variants = $wgContLang->getVariants();
314 // Checks that language conversion is enabled and variants exist
315 if( !$wgDisableLangConversion && count( $variants ) > 1 ) {
316 // Gets preferred variant
317 $preferred = $wgContLang->getPreferredVariant();
318 // Loops over each variant
320 foreach( $variants as $code ) {
321 // Gets variant name from language code
322 $varname = $wgContLang->getVariantname( $code );
323 // Checks if the variant is marked as disabled
324 if( $varname == 'disable' ) {
325 // Skips this variant
328 // Appends variant link
329 $links['variants'][$vcount] = array(
330 'class' => ( $code == $preferred ) ?
'selected' : false,
332 'href' => $this->mTitle
->getLocalURL( '', $code )
338 wfProfileOut( __METHOD__
);
345 * QuickTemplate class for Vector skin
348 class VectorTemplate
extends QuickTemplate
{
353 * @var Cached skin object
360 * Outputs the entire contents of the XHTML page
362 public function execute() {
363 global $wgRequest, $wgUseTwoButtonsSearchForm;
365 $this->skin
= $this->data
['skin'];
366 $action = $wgRequest->getText( 'action' );
368 // Suppress warnings to prevent notices about missing indexes in
369 // $this->data (is this really the best way to handle this?)
370 wfSuppressWarnings();
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'] ) . '"';
390 // We don't want to give the watch tab an accesskey if the page is
391 // being edited, because that conflicts with the accesskey on the
392 // watch checkbox. We also don't want to give the edit tab an
393 // accesskey, because that's fairly superfluous and conflicts with
394 // an accesskey (Ctrl-E) often used for editing in Safari.
396 in_array( $action, array( 'edit', 'submit' ) ) &&
397 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
399 $nav[$section][$key]['key'] =
400 $this->skin
->tooltip( $xmlID );
402 $nav[$section][$key]['key'] =
403 $this->skin
->tooltipAndAccesskey( $xmlID );
407 $this->data
['namespace_urls'] = $nav['namespaces'];
408 $this->data
['view_urls'] = $nav['views'];
409 $this->data
['action_urls'] = $nav['actions'];
410 $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 ( $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',
441 // Build list of valid footer links
442 $validFooterLinks = array();
443 foreach( $footerlinks as $category => $links ) {
444 $validFooterLinks[$category] = array();
445 foreach( $links as $link ) {
446 if( isset( $this->data
[$link] ) && $this->data
[$link] ) {
447 $validFooterLinks[$category][] = $link;
452 // Begin content output
453 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
454 <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') ?>">
456 <meta http
-equiv
="Content-Type" content
="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
457 <title
><?php
$this->text('pagetitle') ?
></title
>
459 <?php
$this->html('headlinks') ?
>
462 <?php
$this->html('csslinks') ?
>
465 <!--[if lt IE
7]><script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script
>
466 <meta http
-equiv
="imagetoolbar" content
="no" /><![endif]-->
467 <style type
="text/css">body
{behavior
:url("<?php $this->text('stylepath') ?>/vector/csshover.htc")}</style
>
469 <!-- globalVariablesScript
-->
470 <?php
echo Skin
::makeGlobalVariablesScript( $this->data
); ?
>
471 <!-- /globalVariablesScript
-->
473 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js
--></script
>
476 <?php
$this->html('headscripts') ?
>
477 <!-- /headscripts
-->
478 <?php
if($this->data
['jsvarurl']): ?
>
480 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('jsvarurl') ?>"><!-- site js
--></script
>
483 <?php
if($this->data
['pagecss']): ?
>
485 <style type
="text/css"><?php
$this->html('pagecss') ?
></style
>
488 <?php
if($this->data
['usercss']): ?
>
490 <style type
="text/css"><?php
$this->html('usercss') ?
></style
>
493 <?php
if($this->data
['userjs']): ?
>
495 <script type
="<?php $this->text('jsmimetype') ?>" src
="<?php $this->text('userjs' ) ?>"></script
>
498 <?php
if($this->data
['userjsprev']): ?
>
500 <script type
="<?php $this->text('jsmimetype') ?>"><?php
$this->html('userjsprev') ?
></script
>
503 <?php
if($this->data
['trackbackhtml']): ?
>
504 <!-- trackbackhtml
-->
505 <?php
echo $this->data
['trackbackhtml']; ?
>
506 <!-- /trackbackhtml
-->
509 <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') ?>">
510 <div id
="page-base" class="noprint"></div
>
511 <div id
="head-base" class="noprint"></div
>
514 <a name
="top" id
="top"></a
>
516 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
518 <!-- firstHeading
-->
519 <h1 id
="firstHeading" class="firstHeading"><?php
$this->html('title') ?
></h1
>
520 <!-- /firstHeading
-->
522 <div id
="bodyContent">
524 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
527 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
529 <?php
if($this->data
['undelete']): ?
>
531 <div id
="contentSub2"><?php
$this->html('undelete') ?
></div
>
534 <?php
if($this->data
['newtalk'] ): ?
>
536 <div
class="usermessage"><?php
$this->html('newtalk') ?
></div
>
539 <?php
if($this->data
['showjumplinks']): ?
>
541 <div id
="jump-to-nav">
542 <?php
$this->msg('jumpto') ?
> <a href
="#head"><?php
$this->msg('jumptonavigation') ?
></a
>,
543 <a href
="#search"><?php
$this->msg('jumptosearch') ?
></a
>
548 <?php
$this->html('bodytext') ?
>
551 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
553 <!-- dataAfterContent
-->
554 <?php
if($this->data
['dataAfterContent']) { $this->html('dataAfterContent'); } ?
>
555 <!-- /dataAfterContent
-->
556 <div
class="visualClear"></div
>
558 <!-- /bodyContent
-->
562 <div id
="head" class="noprint">
564 <div id
="p-personal">
565 <h5
><?php
$this->msg('personaltools') ?
></h5
>
566 <ul
<?php
$this->html('userlangattributes') ?
>>
567 <?php
foreach($this->data
['personal_urls'] as $key => $item): ?
>
568 <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
>
573 <div id
="left-navigation">
575 <div id
="namespaces" class="vectorTabs">
576 <h5
><?php
$this->msg('namespaces') ?
></h5
>
577 <ul
<?php
$this->html('userlangattributes') ?
>>
578 <?php
foreach ($this->data
['namespace_urls'] as $key => $link ): ?
>
579 <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
>
585 <?php
if ( count( $this->data
['variant_urls'] ) > 0 ): ?
>
586 <div id
="variants" class="vectorMenu">
587 <h5
><span
><?php
$this->msg('variants') ?
></span
><a href
="#"> 
;</a
></h5
>
589 <ul
<?php
$this->html('userlangattributes') ?
>>
590 <?php
foreach ($this->data
['variant_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'] ?
>><?php
echo htmlspecialchars( $link['text'] ) ?
></a
></li
>
599 <div id
="right-navigation">
601 <?php
if ( count( $this->data
['view_urls'] ) > 0 ): ?
>
602 <div id
="views" class="vectorTabs">
603 <h5
><?php
$this->msg('views') ?
></h5
>
604 <ul
<?php
$this->html('userlangattributes') ?
>>
605 <?php
foreach ($this->data
['view_urls'] as $key => $link ): ?
>
606 <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
>
613 <?php
if ( count( $this->data
['action_urls'] ) > 0 ): ?
>
614 <div id
="actions" class="vectorMenu">
615 <h5
><span
><?php
$this->msg('actions') ?
></span
><a href
="#"> 
;</a
></h5
>
617 <ul
<?php
$this->html('userlangattributes') ?
>>
618 <?php
foreach ($this->data
['action_urls'] as $key => $link ): ?
>
619 <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
>
628 <h5
<?php
$this->html('userlangattributes') ?
>><label
for="searchInput"><?php
$this->msg( 'search' ) ?
></label
></h5
>
629 <form action
="<?php $this->text( 'wgScript' ) ?>" id
="searchform">
630 <input type
='hidden' name
="title" value
="<?php $this->text( 'searchtitle' ) ?>"/>
631 <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; ?
> />
632 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton" value
="<?php $this->msg( 'searcharticle' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-go' ); ?
> />
633 <?php
if ( $wgUseTwoButtonsSearchForm ): ?
>
634 <input type
="submit" name
="fulltext" class="searchButton" id
="mw-searchButton" value
="<?php $this->msg( 'searchbutton' ) ?>"<?php
echo $this->skin
->tooltipAndAccesskey( 'search-fulltext' ); ?
> />
636 <div
><a href
="<?php $this->text( 'searchaction' ) ?>" rel
="search"><?php
$this->msg( 'powersearch-legend' ) ?
></a
></div
>
645 <div id
="panel" class="noprint">
648 $sidebar = $this->data
['sidebar'];
649 $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) );
650 $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) );
651 foreach ( $sidebar as $name => $content ) {
659 $this->languageBox();
662 $this->customBox( $name, $content );
670 <div
class="break"></div
>
673 <?php
foreach( $validFooterLinks as $category => $links ): ?
>
674 <?php
if ( count( $links ) > 0 ): ?
>
675 <ul id
="foot-<?php echo $category ?>">
676 <?php
foreach( $links as $link ): ?
>
677 <?php
if( isset( $this->data
[$link] ) && $this->data
[$link] ): ?
>
678 <li id
="foot-<?php echo $category ?>-<?php echo $link ?>"><?php
$this->html( $link ) ?
></li
>
684 <ul id
="foot-icons" class="noprint">
685 <?php
if( $this->data
['poweredbyico'] ): ?
>
686 <li id
="foot-icon-poweredby"><?php
$this->html( 'poweredbyico' ) ?
></li
>
688 <?php
if( $this->data
['copyrightico'] ): ?
>
689 <li id
="foot-icon-copyright"><?php
$this->html( 'copyrightico' ) ?
></li
>
692 <div style
="clear:both"></div
>
697 <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
>
701 <script type
="<?php $this->text('jsmimetype') ?>"> if (window
.isMSIE55
) fixalpha( 'logo' ); </script
>
703 <?php
$this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?
>
704 <?php
$this->html( 'reporttime' ) ?
>
705 <?php
if ( $this->data
['debug'] ): ?
>
707 <?php
$this->text( 'debug' ); ?
>
713 // We're done with abusing arrays now...
718 * Outputs a box with a list of tools
720 private function toolBox() {
722 <div
class="portal" id
="p-tb">
723 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'toolbox' ) ?
></h5
>
726 <?php
if( $this->data
['notspecialpage'] ): ?
>
727 <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
>
728 <?php
if( $this->data
['nav_urls']['recentchangeslinked'] ): ?
>
729 <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
>
732 <?php
if( isset( $this->data
['nav_urls']['trackbacklink'] ) ): ?
>
733 <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
>
735 <?php
if( $this->data
['feeds']): ?
>
737 <?php
foreach( $this->data
['feeds'] as $key => $feed ): ?
>
738 <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
>
742 <?php
foreach( array( 'contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages' ) as $special ): ?
>
743 <?php
if( $this->data
['nav_urls'][$special]): ?
>
744 <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
>
747 <?php
if( !empty( $this->data
['nav_urls']['print']['href'] ) ): ?
>
748 <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
>
750 <?php
if ( !empty( $this->data
['nav_urls']['permalink']['href'] ) ): ?
>
751 <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
>
752 <?php
elseif ( $this->data
['nav_urls']['permalink']['href'] === '' ): ?
>
753 <li id
="t-ispermalink"<?php
echo $this->skin
->tooltip( 't-ispermalink' ) ?
>><?php
$this->msg( 'permalink' ) ?
></li
>
755 <?php
wfRunHooks( 'VectorTemplateToolboxEnd', array( &$this ) ); ?
>
756 <?php
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?
>
764 * Outputs a box with a list of alternative languages for this page
766 private function languageBox() {
767 if( $this->data
['language_urls'] ) {
769 <div
class="portal" id
="p-lang">
770 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$this->msg( 'otherlanguages' ) ?
></h5
>
773 <?php
foreach ( $this->data
['language_urls'] as $langlink ): ?
>
774 <li
class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href
="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php
echo $langlink['text'] ?
></a
></li
>
784 * Outputs a box with a custom list of items or HTML content
785 * @param string $bar Message name for title of box
786 * @param mixed $content HTML or array of items to build a list from
788 private function customBox( $bar, $content ) {
790 <div
class="portal" id
='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php
echo $this->skin
->tooltip( 'p-' . $bar ) ?
>>
791 <h5
<?php
$this->html('userlangattributes') ?
>><?php
$out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?
></h5
>
793 <?php
if ( is_array( $content ) ): ?
>
795 <?php
foreach( $content as $key => $val ): ?
>
796 <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
>
800 <?php
echo $content; /* Allow raw HTML block to be defined by extensions */ ?
>