58 return SkinFactory::getDefaultInstance()->getSkinNames();
67 foreach ( self::getSkinNames() as $skinKey => $skinName ) {
83 $allowedSkins = self::getSkinNames();
86 unset( $allowedSkins[$skip] );
104 $skinNames = self::getSkinNames();
112 if ( $key ==
'' || $key ==
'default' ) {
118 if (
isset( $skinNames[$key] ) ) {
133 if (
isset( $skinNames[$key] ) ) {
156 return $this->skinname;
189 'mediawiki.legacy.shared',
190 'mediawiki.legacy.commonPrint',
197 'mediawiki.page.startup',
201 'mediawiki.page.ready',
205 'mediawiki.searchSuggest',
216 if (
strpos(
$out->getHTML(),
'sortable' ) !==
false ) {
217 $modules[
'content'][] =
'jquery.tablesorter';
221 if (
strpos(
$out->getHTML(),
'mw-collapsible' ) !==
false ) {
222 $modules[
'content'][] =
'jquery.makeCollapsible';
223 $modules[
'styles'][
'content'][] =
'jquery.makeCollapsible.styles';
228 if (
strpos(
$out->getHTML(),
'mw-ui-button' ) !==
false ) {
229 $modules[
'styles'][
'content'][] =
'mediawiki.ui.button';
232 if (
$out->isTOCEnabled() ) {
233 $modules[
'content'][] =
'mediawiki.toc';
234 $modules[
'styles'][
'content'][] =
'mediawiki.toc.styles';
238 if ( $user->isLoggedIn()
239 && $user->isAllowedAll(
'writeapi',
'viewmywatchlist',
'editmywatchlist' )
240 && $this->getRelevantTitle()->canExist()
242 $modules[
'watch'][] =
'mediawiki.page.watch.ajax';
245 if ( $user->getBoolOption(
'editsectiononrightclick' ) ) {
246 $modules[
'user'][] =
'mediawiki.action.view.rightClickEdit';
250 if (
$out->isArticle() && $user->getOption(
'editondblclick' ) ) {
251 $modules[
'user'][] =
'mediawiki.action.view.dblClickEdit';
254 if (
$out->isSyndicated() ) {
255 $modules[
'styles'][
'syndicate'][] =
'mediawiki.feedlink';
269 if ( $user->isLoggedIn() ) {
270 $titles[] = $user->getUserPage();
271 $titles[] = $user->getTalkPage();
276 if ( $title->canExist() ) {
277 if ( $title->isTalkPage() ) {
278 $titles[] = $title->getSubjectPage();
280 $titles[] = $title->getTalkPage();
295 Hooks::run(
'SkinPreloadExistence', [ &
$titles, $this ] );
299 $lb->setCaller( __METHOD__ );
310 return $this->
getOutput()->getRevisionId();
320 return $revID == 0 || $revID == $this->
getTitle()->getLatestRevID();
329 $this->mRelevantTitle =
$t;
343 return $this->mRelevantTitle ?? $this->
getTitle();
352 $this->mRelevantUser =
$u;
364 if (
isset( $this->mRelevantUser ) ) {
365 return $this->mRelevantUser;
368 if ( $title->hasSubjectNamespace( NS_USER ) ) {
369 $rootUser = $title->getRootText();
376 $user->load( User::READ_NORMAL );
378 if ( $user->isLoggedIn() ) {
379 $this->mRelevantUser =
$user;
383 return $this->mRelevantUser;
401 return ResourceLoader::makeInlineScript(
402 ResourceLoader::makeConfigSetScript(
$data ),
418 'ctype' =>
'text/css',
438 $numeric =
'ns-' . $title->getNamespace();
441 if ( $title->isSpecialPage() ) {
442 $type =
'ns-special';
444 list( $canonicalName ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
445 resolveAlias( $title->getDBkey() );
446 if ( $canonicalName ) {
447 $type .=
' ' . Sanitizer::escapeClass(
"mw-special-$canonicalName" );
449 $type .=
' mw-invalidspecialpage';
452 if ( $title->isTalkPage() ) {
455 $type =
'ns-subject';
458 if ( $title->quickUserCan(
'edit', $user ) ) {
459 $type .=
' mw-editable';
463 $name = Sanitizer::escapeClass(
'page-' . $title->getPrefixedText() );
464 $root = Sanitizer::escapeClass(
'rootpage-' . $title->getRootTitle()->getPrefixedText() );
466 return "$numeric $type $name $root";
476 'lang' =>
$lang->getHtmlCode(),
477 'dir' =>
$lang->getDir(),
478 'class' =>
'client-nojs',
498 return $this->
getConfig()->get(
'Logo' );
519 $allCats =
$out->getCategoryLinks();
521 if ( $allCats === [] ) {
529 $colon = $this->
msg(
'colon-separator' )->escaped();
531 if ( !empty( $allCats[
'normal'] ) ) {
532 $t = $embed . implode( $pop . $embed, $allCats[
'normal'] ) .
$pop;
534 $msg = $this->
msg(
'pagecategories' )->numParams( count( $allCats[
'normal'] ) )->escaped();
535 $linkPage = $this->
msg(
'pagecategorieslink' )->inContentLanguage()->text();
536 $title = Title::newFromText( $linkPage );
538 $s .=
'<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
539 $link . $colon .
'<ul>' .
$t .
'</ul></div>';
543 if (
isset( $allCats[
'hidden'] ) ) {
544 if ( $this->
getUser()->getBoolOption(
'showhiddencats' ) ) {
545 $class =
' mw-hidden-cats-user-shown';
547 $class =
' mw-hidden-cats-ns-shown';
549 $class =
' mw-hidden-cats-hidden';
552 $s .=
"<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
553 $this->
msg(
'hidden-categories' )->numParams( count( $allCats[
'hidden'] ) )->escaped() .
554 $colon .
'<ul>' . $embed . implode( $pop . $embed, $allCats[
'hidden'] ) . $pop .
'</ul>' .
558 # optional 'dmoz-like' category browser. Will be shown under the list
559 # of categories an article belong to
560 if ( $this->
getConfig()->
get(
'UseCategoryBrowser' ) ) {
561 $s .=
'<br /><hr />';
563 # get a big array of the parents tree
564 $parenttree = $this->
getTitle()->getParentCategoryTree();
565 # Skin object passed by reference cause it can not be
566 # accessed under the method subfunction drawCategoryBrowser
568 # Clean out bogus first entry and sort them
569 unset( $tempout[0] );
571 # Output one per line
572 $s .= implode(
"<br />\n", $tempout );
586 foreach ( $tree as $element =>
$parent ) {
588 # element start a new list
591 # grab the others elements
595 # add our current element to the list
596 $eltitle = Title::newFromText( $element );
611 $allCats =
$out->getCategoryLinks();
612 $showHidden = $this->
getUser()->getBoolOption(
'showhiddencats' ) ||
615 $classes = [
'catlinks' ];
616 if ( empty( $allCats[
'normal'] ) && !( !empty( $allCats[
'hidden'] ) && $showHidden ) ) {
617 $classes[] =
'catlinks-allhidden';
620 return Html::rawElement(
622 [
'id' =>
'catlinks',
'class' => $classes,
'data-mw' =>
'interface' ],
644 if ( Hooks::run(
'SkinAfterContent', [ &
$data, $this ] ) ) {
651 $data =
"<div id='mw-data-after-content'>\n" .
656 wfDebug(
"Hook SkinAfterContent changed output processing.\n" );
668 return MWDebug::getHTMLDebugLog();
680 $chunks = [ $this->
getOutput()->getBottomScripts() ];
685 Hooks::run(
'SkinAfterBottomScripts', [ $this, &$extraHtml ] );
686 if ( $extraHtml !==
'' ) {
689 return WrappedString::join(
"\n", $chunks );
701 $canonicalUrl = $this->
getTitle()->getCanonicalURL(
'oldid=' . $oldid );
708 return $this->
msg(
'retrievedfrom' )
709 ->rawParams(
'<a dir="ltr" href="' . $url .
'">' . $url .
'</a>' )
717 $action = $this->
getRequest()->getVal(
'action',
'view' );
720 if ( ( !$title->exists() || $action ==
'history' ) &&
721 $title->quickUserCan(
'deletedhistory', $this->getUser() )
723 $n = $title->isDeleted();
726 if ( $this->
getTitle()->quickUserCan(
'undelete', $this->
getUser() ) ) {
727 $msg =
'thisisdeleted';
729 $msg =
'viewdeleted';
732 return $this->
msg( $msg )->rawParams(
734 SpecialPage::getTitleFor(
'Undelete', $this->
getTitle()->getPrefixedDBkey() ),
735 $this->
msg(
'restorelink' )->numParams( $n )->escaped() )
748 if (
$out ===
null ) {
751 $title =
$out->getTitle();
754 if ( !Hooks::run(
'SkinSubPageSubtitle', [ &$subpages, $this,
$out ] ) ) {
758 if (
$out->isArticle() && MWNamespace::hasSubpages( $title->getNamespace() ) ) {
759 $ptext = $title->getPrefixedText();
760 if (
strpos( $ptext,
'/' ) !==
false ) {
761 $links = explode(
'/', $ptext );
768 foreach ( $links as
$link ) {
769 $growinglink .=
$link;
771 $linkObj = Title::newFromText( $growinglink );
773 if (
is_object( $linkObj ) && $linkObj->isKnown() ) {
782 $subpages .=
$lang->getDirMarkEntity() . $this->
msg(
'pipe-separator' )->escaped();
784 $subpages .=
'< ';
804 $searchPage = SpecialPage::getTitleFor(
'Search' );
820 if (
$type ==
'detect' ) {
822 && !$this->
msg(
'history_copyright' )->inContentLanguage()->isDisabled()
830 if (
$type ==
'history' ) {
831 $msg =
'history_copyright';
838 if ( $config->get(
'RightsPage' ) ) {
839 $title = Title::newFromText( $config->get(
'RightsPage' ) );
841 }
elseif ( $config->get(
'RightsUrl' ) ) {
843 }
elseif ( $config->get(
'RightsText' ) ) {
844 $link = $config->get(
'RightsText' );
855 'SkinCopyrightFooter',
859 return $this->
msg( $msg )->rawParams(
$link )->text();
869 $footerIcons = $config->get(
'FooterIcons' );
870 if ( $footerIcons[
'copyright'][
'copyright'] ) {
871 $out = $footerIcons[
'copyright'][
'copyright'];
872 }
elseif ( $config->get(
'RightsIcon' ) ) {
874 $url = $config->get(
'RightsUrl' );
881 $out .=
"<img src=\"$icon\" alt=\"$text\" width=\"88\" height=\"31\" />";
896 $resourceBasePath = $this->
getConfig()->get(
'ResourceBasePath' );
898 "$resourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
901 "$resourceBasePath/resources/assets/poweredby_mediawiki_132x47.png"
904 "$resourceBasePath/resources/assets/poweredby_mediawiki_176x62.png"
906 $text =
'<a href="//www.mediawiki.org/"><img src="' . $url1
907 .
'" srcset="' . $url1_5 .
' 1.5x, ' . $url2 .
' 2x" '
908 .
'height="31" width="88" alt="Powered by MediaWiki" /></a>';
909 Hooks::run(
'SkinGetPoweredBy', [ &$text, $this ] );
919 $timestamp = $this->
getOutput()->getRevisionTimestamp();
921 # No cached timestamp, load it from the database
922 if ( $timestamp ===
null ) {
929 $s =
' ' . $this->
msg(
'lastmodifiedat', $d,
$t )->parse();
934 if ( MediaWikiServices::getInstance()->getDBLoadBalancer()->getLaggedReplicaMode() ) {
935 $s .=
' <strong>' . $this->
msg(
'laggedslavemode' )->parse() .
'</strong>';
946 if ( $align !=
'' ) {
947 $a =
" style='float: {$align};'";
952 $mp = $this->
msg(
'mainpage' )->escaped();
953 $mptitle = Title::newMainPage();
957 $s =
"<a href='{$url}'><img{$a} src='{$logourl}' alt='[{$mp}]' /></a>";
974 $url = $icon[
"url"] ??
null;
975 unset( $icon[
"url"] );
976 if (
isset( $icon[
"src"] ) && $withImage ===
'withImage' ) {
978 $html = Html::element(
'img', $icon );
983 $html = Html::rawElement(
'a',
984 [
"href" => $url,
"target" => $this->
getConfig()->
get(
'ExternalLinkTarget' ) ],
997 Title::newMainPage(),
998 $this->
msg(
'mainpage' )->escaped()
1018 $this->
msg( $desc )->escaped()
1029 if ( $this->
msg( $desc )->inContentLanguage()->isDisabled() ) {
1036 $title = Title::newFromText( $this->
msg( $page )->inContentLanguage()->
text() );
1038 return $title ?:
null;
1046 return $this->
footerLink(
'privacy',
'privacypage' );
1054 return $this->
footerLink(
'aboutsite',
'aboutpage' );
1062 return $this->
footerLink(
'disclaimers',
'disclaimerpage' );
1087 if ( $id instanceof
User ) {
1093 # The sending user must have a confirmed email address and the receiving
1094 # user must accept emails from the sender.
1095 return $this->
getUser()->canSendEmail()
1111 if ( $this->stylename ===
null ) {
1112 $class = static::class;
1113 throw new MWException(
"$class::\$stylename must be set to use getSkinStylePath()" );
1116 return $this->
getConfig()->get(
'StylePath' ) .
"/{$this->stylename}/$name";
1126 $title = Title::newMainPage();
1127 self::checkTitle( $title,
'' );
1129 return $title->getLinkURL( $urlaction );
1144 $title = SpecialPage::getSafeTitleFor( $name );
1146 return $title->getLocalURL( $urlaction );
1148 return $title->getFullURL( $urlaction,
false, $proto );
1159 $title = SpecialPage::getSafeTitleFor( $name, $subpage );
1160 return $title->getLocalURL( $urlaction );
1169 $title = Title::newFromText(
wfMessage( $name )->inContentLanguage()->
text() );
1170 self::checkTitle( $title, $name );
1171 return $title->getLocalURL( $urlaction );
1179 static function makeUrl( $name, $urlaction =
'' ) {
1180 $title = Title::newFromText( $name );
1181 self::checkTitle( $title, $name );
1183 return $title->getLocalURL( $urlaction );
1196 return self::makeUrl( $name );
1208 $title = Title::makeTitleSafe( $namespace, $name );
1209 self::checkTitle( $title, $name );
1211 return $title->getLocalURL( $urlaction );
1221 $title = Title::newFromText( $name );
1222 self::checkTitle( $title, $name );
1225 'href' => $title->getLocalURL( $urlaction ),
1226 'exists' => $title->isKnown(),
1237 $title = Title::newFromText( $name );
1238 self::checkTitle( $title, $name );
1241 'href' => $title->getLocalURL( $urlaction ),
1254 $title = Title::newFromText( $name );
1256 $title = Title::newFromText(
'--error: link target missing--' );
1283 $callback =
function ( $old =
null, &$ttl =
null ) {
1286 Hooks::run(
'SkinBuildSidebar', [ $this, &$bar ] );
1287 if ( MessageCache::singleton()->isDisabled() ) {
1288 $ttl = WANObjectCache::TTL_UNCACHEABLE;
1294 $msgCache = MessageCache::singleton();
1295 $wanCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
1298 $sidebar = $config->get(
'EnableSidebarCache' )
1299 ? $wanCache->getWithSetCallback(
1300 $wanCache->makeKey(
'sidebar', $this->getLanguage()->getCode() ),
1301 $config->get(
'SidebarCacheExpiry' ),
1307 $msgCache->getCheckKey( $this->getLanguage()->getCode() )
1315 Hooks::run(
'SidebarBeforeOutput', [ $this, &$sidebar ] );
1341 $lines = explode(
"\n", $text );
1345 $messageTitle = $config->get(
'EnableSidebarCache' )
1346 ? Title::newMainPage() : $this->
getTitle();
1363 $line = MessageCache::singleton()->transform(
$line,
false,
null, $messageTitle );
1365 if ( count(
$line ) !== 2 ) {
1373 $msgLink = $this->
msg(
$line[0] )->title( $messageTitle )->inContentLanguage();
1374 if ( $msgLink->exists() ) {
1375 $link = $msgLink->text();
1376 if (
$link ==
'-' ) {
1382 $msgText = $this->
msg(
$line[1] )->title( $messageTitle );
1383 if ( $msgText->exists() ) {
1384 $text = $msgText->text();
1393 if ( $config->get(
'NoFollowLinks' ) &&
1396 $extraAttribs[
'rel'] =
'nofollow';
1399 if ( $config->get(
'ExternalLinkTarget' ) ) {
1400 $extraAttribs[
'target'] = $config->get(
'ExternalLinkTarget' );
1403 $title = Title::newFromText(
$link );
1406 $title = $title->fixSpecialName();
1407 $href = $title->getLinkURL();
1409 $href =
'INVALID-TITLE';
1416 'id' => Sanitizer::escapeIdForAttribute(
'n-' .
strtr(
$line[1],
' ',
'-' ) ),
1434 $newMessagesAlert =
'';
1436 $newtalks = $user->getNewMessageLinks();
1440 if ( !Hooks::run(
'GetNewMessagesAlert', [ &$newMessagesAlert,
$newtalks, $user,
$out ] ) ) {
1443 if ( $newMessagesAlert ) {
1448 $uTalkTitle = $user->getTalkPage();
1449 $lastSeenRev =
$newtalks[0][
'rev'] ??
null;
1451 if ( $lastSeenRev !==
null ) {
1454 if ( $latestRev !==
null ) {
1456 $plural = $latestRev->getParentId() !== $lastSeenRev->getId();
1457 $nofAuthors = $uTalkTitle->countAuthorsBetween(
1458 $lastSeenRev, $latestRev, 10,
'include_new' );
1464 $plural = $plural ? 999 : 1;
1470 $this->
msg(
'newmessageslinkplural' )->params( $plural )->escaped(),
1472 $uTalkTitle->isRedirect() ? [
'redirect' =>
'no' ] : []
1477 $this->
msg(
'newmessagesdifflinkplural' )->params( $plural )->escaped(),
1479 $lastSeenRev !==
null
1480 ? [
'oldid' => $lastSeenRev->getId(),
'diff' =>
'cur' ]
1481 : [
'diff' =>
'cur' ]
1484 if ( $nofAuthors >= 1 && $nofAuthors <= 10 ) {
1485 $newMessagesAlert = $this->
msg(
1486 'youhavenewmessagesfromusers',
1488 $newMessagesDiffLink
1489 )->numParams( $nofAuthors, $plural );
1492 $newMessagesAlert = $this->
msg(
1493 $nofAuthors > 10 ?
'youhavenewmessagesmanyusers' :
'youhavenewmessages',
1496 )->numParams( $plural );
1498 $newMessagesAlert = $newMessagesAlert->text();
1500 $out->setCdnMaxage( 0 );
1502 $sep = $this->
msg(
'newtalkseparator' )->escaped();
1506 $msgs[] = Xml::element(
1508 [
'href' => $newtalk[
'link'] ], $newtalk[
'wiki']
1511 $parts = implode( $sep, $msgs );
1512 $newMessagesAlert = $this->
msg(
'youhavenewmessagesmulti' )->rawParams( $parts )->escaped();
1513 $out->setCdnMaxage( 0 );
1529 if ( $name ===
'default' ) {
1531 $notice = $config->get(
'SiteNotice' );
1532 if ( empty( $notice ) ) {
1536 $msg = $this->
msg( $name )->inContentLanguage();
1537 if ( $msg->isBlank() ) {
1539 }
elseif ( $msg->isDisabled() ) {
1542 $notice = $msg->plain();
1545 $services = MediaWikiServices::getInstance();
1547 $parsed =
$cache->getWithSetCallback(
1550 $cache->makeKey( $name, $config->get(
'RenderHashAppend' ), md5( $notice ) ),
1553 function () use ( $notice ) {
1554 return $this->
getOutput()->parseAsInterface( $notice );
1558 $contLang =
$services->getContentLanguage();
1559 return Html::rawElement(
1562 'id' =>
'localNotice',
1563 'lang' => $contLang->getHtmlCode(),
1564 'dir' => $contLang->getDir()
1578 if ( Hooks::run(
'SiteNoticeBefore', [ &$siteNotice, $this ] ) ) {
1583 if ( $anonNotice ===
false ) {
1589 if ( $siteNotice ===
false ) {
1594 Hooks::run(
'SiteNoticeAfter', [ &$siteNotice, $this ] );
1617 $attribs[
'title'] = $this->
msg(
'editsectionhint' )->rawParams( $tooltip )
1618 ->inLanguage(
$lang )->text();
1623 'text' => $this->
msg(
'editsection' )->inLanguage(
$lang )->escaped(),
1624 'targetTitle' =>
$nt,
1626 'query' => [
'action' =>
'edit',
'section' =>
$section ],
1627 'options' => [
'noclasses',
'known' ]
1631 Hooks::run(
'SkinEditSectionLinks', [ $this, $nt,
$section, $tooltip, &$links,
$lang ] );
1633 $result =
'<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>';
1636 foreach ( $links as $k => $linkDetails ) {
1638 $linkDetails[
'targetTitle'],
1639 $linkDetails[
'text'],
1640 $linkDetails[
'attribs'],
1641 $linkDetails[
'query'],
1642 $linkDetails[
'options']
1647 '<span class="mw-editsection-divider">'
1648 . $this->
msg(
'pipe-separator' )->inLanguage(
$lang )->escaped()
1653 $result .=
'<span class="mw-editsection-bracket">]</span></span>';
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
$wgFallbackSkin
Fallback skin used when the skin defined by $wgDefaultSkin can't be found.
$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.
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.
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()
Internationalisation code.
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.
This class should be covered by a general architecture document which does not exist as of January 20...
static getTimestampFromId( $title, $id, $flags=0)
Get rev_timestamp from rev_id, without loading the rest of the row.
static newFromTitle(LinkTarget $linkTarget, $id=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given link target.
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.
doEditSectionLink(Title $nt, $section, $tooltip, Language $lang)
Create a section edit link.
getSkinStylePath( $name)
Return a fully resolved style path URL to images or styles stored in the current skin'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 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)
Hook point for adding style modules to OutputPage.
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.
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.
static makeVariablesScript( $data, $nonce=null)
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.
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
namespace being checked & $result
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password 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
the value of this variable comes from LanguageConverter indexed by page_id indexed by prefixed DB keys on which the links will be shown can modify can modify can modify this should be populated with an alert message to that effect $newtalks
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
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
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
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services
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 use $formDescriptor instead 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 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
return true to allow those checks to and false if checking is done & $user
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
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