56 return SkinFactory::getDefaultInstance()->getSkinNames();
65 foreach ( self::getSkinNames() as $skinKey => $skinName ) {
81 $allowedSkins = self::getSkinNames();
84 unset( $allowedSkins[$skip] );
102 $skinNames = self::getSkinNames();
105 $skinNames = array_change_key_case( $skinNames, CASE_LOWER );
106 $key = strtolower( $key );
110 if ( $key ==
'' || $key ==
'default' ) {
116 if ( isset( $skinNames[$key] ) ) {
131 if ( isset( $skinNames[$key] ) ) {
133 } elseif ( isset( $skinNames[$defaultSkin] ) ) {
136 return $fallbackSkin;
154 return $this->skinname;
178 $user =
$out->getUser();
185 'mediawiki.page.startup',
190 'mediawiki.page.ready',
201 if ( $config->get(
'ResponsiveImages' ) ) {
202 $modules[
'core'][] =
'mediawiki.hidpi';
206 if ( strpos(
$out->getHTML(),
'sortable' ) !==
false ) {
207 $modules[
'content'][] =
'jquery.tablesorter';
211 if ( strpos(
$out->getHTML(),
'mw-collapsible' ) !==
false ) {
212 $modules[
'content'][] =
'jquery.makeCollapsible';
215 if (
$out->isTOCEnabled() ) {
216 $modules[
'content'][] =
'mediawiki.toc';
222 && $user->isAllowedAll(
'writeapi',
'viewmywatchlist',
'editmywatchlist' )
223 && $this->getRelevantTitle()->canExist()
225 $modules[
'watch'][] =
'mediawiki.page.watch.ajax';
228 $modules[
'search'][] =
'mediawiki.searchSuggest';
231 if ( $user->getBoolOption(
'editsectiononrightclick' ) ) {
232 $modules[
'user'][] =
'mediawiki.action.view.rightClickEdit';
236 if (
$out->isArticle() && $user->getOption(
'editondblclick' ) ) {
237 $modules[
'user'][] =
'mediawiki.action.view.dblClickEdit';
250 if ( $user->isLoggedIn() ) {
251 $titles[] = $user->getUserPage();
252 $titles[] = $user->getTalkPage();
257 if ( $title->canExist() ) {
258 if ( $title->isTalkPage() ) {
259 $titles[] = $title->getSubjectPage();
261 $titles[] = $title->getTalkPage();
276 Hooks::run(
'SkinPreloadExistence', [ &
$titles, $this ] );
280 $lb->setCaller( __METHOD__ );
291 return $this->
getOutput()->getRevisionId();
301 return $revID == 0 || $revID == $this->
getTitle()->getLatestRevID();
310 $this->mRelevantTitle =
$t;
324 if ( isset( $this->mRelevantTitle ) ) {
325 return $this->mRelevantTitle;
336 $this->mRelevantUser = $u;
348 if ( isset( $this->mRelevantUser ) ) {
349 return $this->mRelevantUser;
352 if ( $title->hasSubjectNamespace( NS_USER ) ) {
353 $rootUser = $title->getRootText();
360 $user->load( User::READ_NORMAL );
362 if ( $user->isLoggedIn() ) {
363 $this->mRelevantUser =
$user;
367 return $this->mRelevantUser;
403 'usemsgcache' =>
'yes',
404 'ctype' =>
'text/css',
425 $numeric =
'ns-' . $title->getNamespace();
427 if ( $title->isSpecialPage() ) {
428 $type =
'ns-special';
431 if ( $canonicalName ) {
432 $type .=
' ' . Sanitizer::escapeClass(
"mw-special-$canonicalName" );
434 $type .=
' mw-invalidspecialpage';
436 } elseif ( $title->isTalkPage() ) {
439 $type =
'ns-subject';
442 $name = Sanitizer::escapeClass(
'page-' . $title->getPrefixedText() );
443 $root = Sanitizer::escapeClass(
'rootpage-' . $title->getRootTitle()->getPrefixedText() );
445 return "$numeric $type $name $root";
455 'lang' =>
$lang->getHtmlCode(),
456 'dir' =>
$lang->getDir(),
457 'class' =>
'client-nojs',
497 $allCats =
$out->getCategoryLinks();
499 if ( !count( $allCats ) ) {
507 $colon = $this->
msg(
'colon-separator' )->escaped();
509 if ( !empty( $allCats[
'normal'] ) ) {
510 $t = $embed . implode(
"{$pop}{$embed}", $allCats[
'normal'] ) . $pop;
512 $msg = $this->
msg(
'pagecategories' )->numParams( count( $allCats[
'normal'] ) )->escaped();
513 $linkPage =
wfMessage(
'pagecategorieslink' )->inContentLanguage()->text();
514 $title = Title::newFromText( $linkPage );
516 $s .=
'<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
517 $link . $colon .
'<ul>' .
$t .
'</ul>' .
'</div>';
521 if ( isset( $allCats[
'hidden'] ) ) {
522 if ( $this->
getUser()->getBoolOption(
'showhiddencats' ) ) {
523 $class =
' mw-hidden-cats-user-shown';
525 $class =
' mw-hidden-cats-ns-shown';
527 $class =
' mw-hidden-cats-hidden';
530 $s .=
"<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
531 $this->
msg(
'hidden-categories' )->numParams( count( $allCats[
'hidden'] ) )->escaped() .
532 $colon .
'<ul>' . $embed . implode(
"{$pop}{$embed}", $allCats[
'hidden'] ) . $pop .
'</ul>' .
536 # optional 'dmoz-like' category browser. Will be shown under the list
537 # of categories an article belong to
539 $s .=
'<br /><hr />';
541 # get a big array of the parents tree
542 $parenttree = $this->
getTitle()->getParentCategoryTree();
543 # Skin object passed by reference cause it can not be
544 # accessed under the method subfunction drawCategoryBrowser
546 # Clean out bogus first entry and sort them
547 unset( $tempout[0] );
549 # Output one per line
550 $s .= implode(
"<br />\n", $tempout );
564 foreach ( $tree as $element => $parent ) {
565 if ( empty( $parent ) ) {
566 # element start a new list
569 # grab the others elements
573 # add our current element to the list
574 $eltitle = Title::newFromText( $element );
575 $return .=
Linker::link( $eltitle, htmlspecialchars( $eltitle->getText() ) );
589 $allCats =
$out->getCategoryLinks();
590 $showHidden = $this->
getUser()->getBoolOption(
'showhiddencats' ) ||
593 $classes = [
'catlinks' ];
594 if ( empty( $allCats[
'normal'] ) && !( !empty( $allCats[
'hidden'] ) && $showHidden ) ) {
595 $classes[] =
'catlinks-allhidden';
598 return Html::rawElement(
600 [
'id' =>
'catlinks',
'class' => $classes,
'data-mw' =>
'interface' ],
622 if ( Hooks::run(
'SkinAfterContent', [ &$data, $this ] ) ) {
625 if ( trim( $data ) !=
'' ) {
629 $data =
"<div id='mw-data-after-content'>\n" .
634 wfDebug(
"Hook SkinAfterContent changed output processing.\n" );
646 return MWDebug::getHTMLDebugLog();
658 $bottomScriptText = $this->
getOutput()->getBottomScripts();
659 Hooks::run(
'SkinAfterBottomScripts', [ $this, &$bottomScriptText ] );
661 return $bottomScriptText;
673 $canonicalUrl = $this->
getTitle()->getCanonicalURL(
'oldid=' . $oldid );
674 $url = htmlspecialchars(
wfExpandIRI( $canonicalUrl ) );
680 return $this->
msg(
'retrievedfrom' )
681 ->rawParams(
'<a dir="ltr" href="' . $url .
'">' . $url .
'</a>' )
689 $action = $this->
getRequest()->getVal(
'action',
'view' );
691 if ( $this->
getTitle()->userCan(
'deletedhistory', $this->
getUser() ) &&
692 ( !$this->
getTitle()->exists() || $action ==
'history' ) ) {
693 $n = $this->
getTitle()->isDeleted();
696 if ( $this->
getTitle()->quickUserCan(
'undelete', $this->
getUser() ) ) {
697 $msg =
'thisisdeleted';
699 $msg =
'viewdeleted';
702 return $this->
msg( $msg )->rawParams(
704 SpecialPage::getTitleFor(
'Undelete', $this->
getTitle()->getPrefixedDBkey() ),
705 $this->
msg(
'restorelink' )->numParams( $n )->escaped() )
718 if (
$out ===
null ) {
721 $title =
$out->getTitle();
724 if ( !Hooks::run(
'SkinSubPageSubtitle', [ &$subpages, $this,
$out ] ) ) {
728 if (
$out->isArticle() && MWNamespace::hasSubpages( $title->getNamespace() ) ) {
729 $ptext = $title->getPrefixedText();
730 if ( strpos( $ptext,
'/' ) !==
false ) {
731 $links = explode(
'/', $ptext );
738 foreach ( $links as
$link ) {
739 $growinglink .=
$link;
741 $linkObj = Title::newFromText( $growinglink );
743 if ( is_object( $linkObj ) && $linkObj->isKnown() ) {
746 htmlspecialchars( $display )
752 $subpages .=
$lang->getDirMarkEntity() . $this->
msg(
'pipe-separator' )->escaped();
754 $subpages .=
'< ';
757 $subpages .= $getlink;
774 $searchPage = SpecialPage::getTitleFor(
'Search' );
792 if (
$type ==
'detect' ) {
794 && !$this->
msg(
'history_copyright' )->inContentLanguage()->isDisabled()
802 if (
$type ==
'history' ) {
803 $msg =
'history_copyright';
825 'SkinCopyrightFooter',
829 return $this->
msg( $msg )->rawParams(
$link )->text();
847 $out .=
'<a href="' . $url .
'">';
851 $out .=
"<img src=\"$icon\" alt=\"$text\" width=\"88\" height=\"31\" />";
868 $url1 = htmlspecialchars(
869 "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
871 $url1_5 = htmlspecialchars(
872 "$wgResourceBasePath/resources/assets/poweredby_mediawiki_132x47.png"
874 $url2 = htmlspecialchars(
875 "$wgResourceBasePath/resources/assets/poweredby_mediawiki_176x62.png"
877 $text =
'<a href="//www.mediawiki.org/"><img src="' . $url1
878 .
'" srcset="' . $url1_5 .
' 1.5x, ' . $url2 .
' 2x" '
879 .
'height="31" width="88" alt="Powered by MediaWiki" /></a>';
880 Hooks::run(
'SkinGetPoweredBy', [ &$text, $this ] );
890 $timestamp = $this->
getOutput()->getRevisionTimestamp();
892 # No cached timestamp, load it from the database
893 if ( $timestamp ===
null ) {
900 $s =
' ' . $this->
msg(
'lastmodifiedat', $d,
$t )->parse();
905 if ( MediaWikiServices::getInstance()->getDBLoadBalancer()->getLaggedReplicaMode() ) {
906 $s .=
' <strong>' . $this->
msg(
'laggedslavemode' )->parse() .
'</strong>';
917 if ( $align !=
'' ) {
918 $a =
" style='float: {$align};'";
923 $mp = $this->
msg(
'mainpage' )->escaped();
924 $mptitle = Title::newMainPage();
925 $url = ( is_object( $mptitle ) ? htmlspecialchars( $mptitle->getLocalURL() ) :
'' );
928 $s =
"<a href='{$url}'><img{$a} src='{$logourl}' alt='[{$mp}]' /></a>";
942 if ( is_string( $icon ) ) {
945 $url = isset( $icon[
"url"] ) ? $icon[
"url"] :
null;
946 unset( $icon[
"url"] );
947 if ( isset( $icon[
"src"] ) && $withImage ===
'withImage' ) {
949 $html = Html::element(
'img', $icon );
951 $html = htmlspecialchars( $icon[
"alt"] );
955 $html = Html::rawElement(
'a',
969 Title::newMainPage(),
970 $this->
msg(
'mainpage' )->escaped()
990 $this->
msg( $desc )->escaped()
1001 if ( $this->
msg( $desc )->inContentLanguage()->isDisabled() ) {
1008 $title = Title::newFromText( $this->
msg( $page )->inContentLanguage()->
text() );
1010 return $title ?:
null;
1018 return $this->
footerLink(
'privacy',
'privacypage' );
1026 return $this->
footerLink(
'aboutsite',
'aboutpage' );
1034 return $this->
footerLink(
'disclaimers',
'disclaimerpage' );
1059 if ( $id instanceof
User ) {
1065 # The sending user must have a confirmed email address and the receiving
1066 # user must accept emails from the sender.
1067 return $this->
getUser()->canSendEmail()
1085 if ( $this->stylename ===
null ) {
1086 $class = static::class;
1087 throw new MWException(
"$class::\$stylename must be set to use getSkinStylePath()" );
1090 return "$wgStylePath/{$this->stylename}/$name?$wgStyleVersion";
1100 $title = Title::newMainPage();
1101 self::checkTitle( $title,
'' );
1103 return $title->getLinkURL( $urlaction );
1118 $title = SpecialPage::getSafeTitleFor( $name );
1119 if ( is_null( $proto ) ) {
1120 return $title->getLocalURL( $urlaction );
1122 return $title->getFullURL( $urlaction,
false, $proto );
1133 $title = SpecialPage::getSafeTitleFor( $name, $subpage );
1134 return $title->getLocalURL( $urlaction );
1143 $title = Title::newFromText(
wfMessage( $name )->inContentLanguage()->
text() );
1144 self::checkTitle( $title, $name );
1145 return $title->getLocalURL( $urlaction );
1153 static function makeUrl( $name, $urlaction =
'' ) {
1154 $title = Title::newFromText( $name );
1155 self::checkTitle( $title, $name );
1157 return $title->getLocalURL( $urlaction );
1170 return self::makeUrl( $name );
1182 $title = Title::makeTitleSafe( $namespace, $name );
1183 self::checkTitle( $title, $name );
1185 return $title->getLocalURL( $urlaction );
1195 $title = Title::newFromText( $name );
1196 self::checkTitle( $title, $name );
1199 'href' => $title->getLocalURL( $urlaction ),
1200 'exists' => $title->isKnown(),
1211 $title = Title::newFromText( $name );
1212 self::checkTitle( $title, $name );
1215 'href' => $title->getLocalURL( $urlaction ),
1227 if ( !is_object( $title ) ) {
1228 $title = Title::newFromText( $name );
1229 if ( !is_object( $title ) ) {
1230 $title = Title::newFromText(
'--error: link target missing--' );
1259 $callback =
function ( $old =
null, &$ttl = null ) {
1262 Hooks::run(
'SkinBuildSidebar', [ $this, &$bar ] );
1264 $ttl = WANObjectCache::TTL_UNCACHEABLE;
1271 $wanCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
1274 ? $wanCache->getWithSetCallback(
1275 $wanCache->makeKey(
'sidebar', $this->getLanguage()->getCode() ),
1282 $msgCache->getCheckKey( $this->getLanguage()->getCode() )
1290 Hooks::run(
'SidebarBeforeOutput', [ $this, &$sidebar ] );
1316 $lines = explode(
"\n", $text );
1319 $messageTitle = $this->
getConfig()->get(
'EnableSidebarCache' )
1320 ? Title::newMainPage() : $this->
getTitle();
1323 if ( strpos(
$line,
'*' ) !== 0 ) {
1328 if ( strpos(
$line,
'**' ) !== 0 ) {
1329 $heading = trim(
$line,
'* ' );
1330 if ( !array_key_exists( $heading, $bar ) ) {
1331 $bar[$heading] = [];
1336 if ( strpos(
$line,
'|' ) !==
false ) {
1338 $line = array_map(
'trim', explode(
'|',
$line, 2 ) );
1339 if ( count(
$line ) !== 2 ) {
1347 $msgLink = $this->
msg(
$line[0] )->title( $messageTitle )->inContentLanguage();
1348 if ( $msgLink->exists() ) {
1349 $link = $msgLink->text();
1350 if (
$link ==
'-' ) {
1356 $msgText = $this->
msg(
$line[1] )->title( $messageTitle );
1357 if ( $msgText->exists() ) {
1358 $text = $msgText->text();
1369 $extraAttribs[
'rel'] =
'nofollow';
1377 $title = Title::newFromText(
$link );
1380 $title = $title->fixSpecialName();
1381 $href = $title->getLinkURL();
1383 $href =
'INVALID-TITLE';
1387 $bar[$heading][] = array_merge( [
1390 'id' => Sanitizer::escapeIdForAttribute(
'n-' . strtr(
$line[1],
' ',
'-' ) ),
1408 $newMessagesAlert =
'';
1410 $newtalks = $user->getNewMessageLinks();
1414 if ( !Hooks::run(
'GetNewMessagesAlert', [ &$newMessagesAlert,
$newtalks, $user,
$out ] ) ) {
1417 if ( $newMessagesAlert ) {
1418 return $newMessagesAlert;
1422 $uTalkTitle = $user->getTalkPage();
1425 if ( $lastSeenRev !==
null ) {
1427 $latestRev = Revision::newFromTitle( $uTalkTitle,
false, Revision::READ_NORMAL );
1428 if ( $latestRev !==
null ) {
1430 $plural = $latestRev->getParentId() !== $lastSeenRev->getId();
1431 $nofAuthors = $uTalkTitle->countAuthorsBetween(
1432 $lastSeenRev, $latestRev, 10,
'include_new' );
1438 $plural = $plural ? 999 : 1;
1444 $this->
msg(
'newmessageslinkplural' )->params( $plural )->escaped(),
1446 [
'redirect' =>
'no' ]
1451 $this->
msg(
'newmessagesdifflinkplural' )->params( $plural )->escaped(),
1453 $lastSeenRev !==
null
1454 ? [
'oldid' => $lastSeenRev->getId(),
'diff' =>
'cur' ]
1455 : [
'diff' =>
'cur' ]
1458 if ( $nofAuthors >= 1 && $nofAuthors <= 10 ) {
1459 $newMessagesAlert = $this->
msg(
1460 'youhavenewmessagesfromusers',
1462 $newMessagesDiffLink
1463 )->numParams( $nofAuthors, $plural );
1466 $newMessagesAlert = $this->
msg(
1467 $nofAuthors > 10 ?
'youhavenewmessagesmanyusers' :
'youhavenewmessages',
1469 $newMessagesDiffLink
1470 )->numParams( $plural );
1472 $newMessagesAlert = $newMessagesAlert->text();
1474 $out->setCdnMaxage( 0 );
1476 $sep = $this->
msg(
'newtalkseparator' )->escaped();
1480 $msgs[] = Xml::element(
1482 [
'href' => $newtalk[
'link'] ], $newtalk[
'wiki']
1485 $parts = implode( $sep, $msgs );
1486 $newMessagesAlert = $this->
msg(
'youhavenewmessagesmulti' )->rawParams( $parts )->escaped();
1487 $out->setCdnMaxage( 0 );
1490 return $newMessagesAlert;
1505 if ( $name ===
'default' ) {
1509 if ( empty( $notice ) ) {
1513 $msg = $this->
msg( $name )->inContentLanguage();
1514 if ( $msg->isBlank() ) {
1516 } elseif ( $msg->isDisabled() ) {
1519 $notice = $msg->plain();
1522 $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
1523 $parsed =
$cache->getWithSetCallback(
1529 function () use ( $notice ) {
1530 return $this->
getOutput()->parse( $notice );
1534 return Html::rawElement(
1537 'id' =>
'localNotice',
1553 if ( Hooks::run(
'SiteNoticeBefore', [ &$siteNotice, $this ] ) ) {
1554 if ( is_object( $this->
getUser() ) && $this->
getUser()->isLoggedIn() ) {
1558 if ( $anonNotice ===
false ) {
1561 $siteNotice = $anonNotice;
1564 if ( $siteNotice ===
false ) {
1569 Hooks::run(
'SiteNoticeAfter', [ &$siteNotice, $this ] );
1593 if ( !is_null( $tooltip ) ) {
1595 ->inLanguage(
$lang )->text();
1600 'text' =>
wfMessage(
'editsection' )->inLanguage(
$lang )->escaped(),
1601 'targetTitle' => $nt,
1603 'query' => [
'action' =>
'edit',
'section' =>
$section ],
1604 'options' => [
'noclasses',
'known' ]
1608 Hooks::run(
'SkinEditSectionLinks', [ $this, $nt,
$section, $tooltip, &$links,
$lang ] );
1610 $result =
'<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>';
1613 foreach ( $links as $k => $linkDetails ) {
1615 $linkDetails[
'targetTitle'],
1616 $linkDetails[
'text'],
1617 $linkDetails[
'attribs'],
1618 $linkDetails[
'query'],
1619 $linkDetails[
'options']
1624 '<span class="mw-editsection-divider">'
1630 $result .=
'<span class="mw-editsection-bracket">]</span></span>';
1633 'DoEditSectionLink',
$wgRightsIcon
Override for copyright metadata.
$wgRightsUrl
Set this to specify an external URL containing details about the content license used on your wiki.
$wgRenderHashAppend
Append a configured value to the parser cache and the sitenotice key so that they can be kept separat...
$wgStyleVersion
Bump this number when changing the global style sheets and JavaScript.
$wgUseAjax
Enable AJAX framework.
$wgFallbackSkin
Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
$wgNoFollowLinks
If true, external URL links in wiki text will be given the rel="nofollow" attribute as a hint to sear...
$wgSiteNotice
Site notice shown at the top of each page.
$wgRightsText
If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the link.
$wgEnableWriteAPI
Allow the API to be used to perform write operations (page edits, rollback, etc.) when an authorised ...
$wgResourceBasePath
The default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
$wgSidebarCacheExpiry
Expiry time for the sidebar cache, in seconds.
$wgFooterIcons
Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code You can ad...
$wgEnableSidebarCache
If on, the sidebar navigation links are cached for users with the current language set.
$wgNoFollowDomainExceptions
If this is set to an array of domains, external links to these domain names (or any subdomains) will ...
$wgSkipSkins
Specify the names of skins that should not be presented in the list of available skins in user prefer...
$wgDefaultSkin
Default skin, for new users and anonymous visitors.
$wgSquidMaxage
Cache TTL for the CDN sent as s-maxage (without ESI) or Surrogate-Control (with ESI).
$wgUseCategoryBrowser
Use experimental, DMOZ-like category browser.
$wgExternalLinkTarget
Set a default target for external links, e.g.
$wgEnableAPI
Enable the MediaWiki API for convenient access to machine-readable data via api.php.
$wgStylePath
The URL path of the skins directory.
$wgLogo
The URL path of the wiki logo.
$wgRightsPage
Override for copyright metadata.
wfGetLangObj( $langcode=false)
Return a Language object from $langcode.
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfExpandIRI( $url)
Take a URL, make sure it's expanded to fully qualified, and replace any encoded non-ASCII Unicode cha...
wfUrlProtocols( $includeProtocolRelative=true)
Returns a regular expression of url protocols.
wfMatchesDomainList( $url, $domains)
Check whether a given URL has a domain that occurs in a given set of domains.
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
Class representing a list of titles The execute() method checks them all for existence and adds them ...
static link( $target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
static linkKnown( $target, $html=null, $customAttribs=[], $query=[], $options=[ 'known'])
Identical to link(), except $options defaults to 'known'.
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
static singleton()
Get the signleton instance of this class.
This class should be covered by a general architecture document which does not exist as of January 20...
static makeConfigSetScript(array $configuration)
Returns JS code which will set the MediaWiki configuration array to the given value.
static makeInlineScript( $script)
Returns an HTML script tag that runs given JS code after startup and base modules.
The main skin class which provides methods and properties for all other skins.
aboutLink()
Gets the link to the wiki's about page.
isRevisionCurrent()
Whether the revision displayed is the latest revision of the page.
static makeInternalOrExternalUrl( $name)
If url string starts with http, consider as external URL, else internal.
afterContentHook()
This runs a hook to allow extensions placing their stuff after content and article metadata (e....
string $stylename
Stylesheets set to use.
getNewtalks()
Gets new talk page messages for the current user and returns an appropriate alert message (or an empt...
mainPageLink()
Gets the link to the wiki's main page.
static getAllowedSkins()
Fetch the list of user-selectable skins in regards to $wgSkipSkins.
getSkinStylePath( $name)
Return a fully resolved style path url to images or styles stored in the current skins's folder.
getCachedNotice( $name)
Get a cached notice.
static makeMainPageUrl( $urlaction='')
static makeKnownUrlDetails( $name, $urlaction='')
Make URL details where the article exists (or at least it's convenient to think so)
generateDebugHTML()
Generate debug data HTML for displaying at the bottom of the main content area.
privacyLink()
Gets the link to the wiki's privacy policy page.
footerLinkTitle( $desc, $page)
getSiteNotice()
Get the site notice.
getHtmlElementAttributes()
Return values for <html> element.
static getSkinNames()
Fetch the set of available skins.
static normalizeKey( $key)
Normalize a skin preference value to a form that can be loaded.
getPoweredBy()
Gets the powered by MediaWiki icon.
static makeUrlDetails( $name, $urlaction='')
these return an array with the 'href' and boolean 'exists'
getLogo()
URL to the logo.
addToSidebar(&$bar, $message)
Add content from a sidebar system message Currently only used for MediaWiki:Sidebar (but may be used ...
static makeSpecialUrlSubpage( $name, $subpage, $urlaction='')
getRelevantUser()
Return the "relevant" user.
setRelevantTitle( $t)
Set the "relevant" title.
addToBodyAttributes( $out, &$bodyAttrs)
This will be called by OutputPage::headElement when it is creating the "<body>" tag,...
drawCategoryBrowser( $tree)
Render the array as a series of links.
static checkTitle(&$title, $name)
make sure we have some title to operate on
static makeUrl( $name, $urlaction='')
getPageClasses( $title)
TODO: document.
editUrlOptions()
Return URL options for the 'edit page' link.
static makeVariablesScript( $data)
static makeNSUrl( $name, $urlaction='', $namespace=NS_MAIN)
this can be passed the NS number as defined in Language.php
buildSidebar()
Build an array that represents the sidebar(s), the navigation bar among them.
getCopyright( $type='detect')
printSource()
Text with the permalink to the source page, usually shown on the footer of a printed page.
shouldPreloadLogo()
Whether the logo should be preloaded with an HTTP link header or not.
setRelevantUser( $u)
Set the "relevant" user.
setupSkinUserCss(OutputPage $out)
Add skin specific stylesheets Calling this method with an $out of anything but the same OutputPage in...
static getSkinNameMessages()
Fetch the skinname messages for available skins.
makeFooterIcon( $icon, $withImage='withImage')
Renders a $wgFooterIcons icon according to the method's arguments.
getRevisionId()
Get the current revision ID.
__construct( $skinname=null)
preloadExistence()
Preload the existence of three commonly-requested pages in a single query.
bottomScripts()
This gets called shortly before the "</body>" tag.
outputPage(OutputPage $out=null)
Outputs the HTML generated by other functions.
doEditSectionLink(Title $nt, $section, $tooltip=null, $lang=false)
Create a section edit link.
disclaimerLink()
Gets the link to the wiki's general disclaimers page.
getDefaultModules()
Defines the ResourceLoader modules that should be added to the skin It is recommended that skins wish...
static makeSpecialUrl( $name, $urlaction='', $proto=null)
Make a URL for a Special Page using the given query and protocol.
lastModified()
Get the timestamp of the latest revision, formatted in user language.
initPage(OutputPage $out)
static getDynamicStylesheetQuery()
Get the query to generate a dynamic stylesheet.
subPageSubtitle( $out=null)
addToSidebarPlain(&$bar, $text)
Add content from plain text.
footerLink( $desc, $page)
Returns an HTML link for use in the footer.
static makeI18nUrl( $name, $urlaction='')
getRelevantTitle()
Return the "relevant" title.
static validateTarget( $target, User $sender=null)
Validate target User.
static resolveAlias( $alias)
Given a special page name with a possible subpage, return an array where the first element is the spe...
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static newFromId( $id)
Static factory method for creation from a given user ID.
static isIP( $name)
Does the string match an anonymous IP address?
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
namespace being checked & $result
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
namespace and then decline to actually register it file or subcat img or subcat $title
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Allows to change the fields on the form that will be generated $name
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
the value of this variable comes from LanguageConverter indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect $newtalks
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user
linkcache txt The LinkCache class maintains a list of article titles and the information about whether or not the article exists in the database This is used to mark up links when displaying a page If the same link appears more than once on any page then it only has to be looked up once In most cases link lookups are done in batches with the LinkBatch class or the equivalent in so the link cache is mostly useful for short snippets of parsed and for links in the navigation areas of the skin The link cache was formerly used to track links used in a document for the purposes of updating the link tables This application is now deprecated To create a you can use the following $titles
if(!isset( $args[0])) $lang