MediaWiki  master
SkinFallback Class Reference

SkinTemplate class for the fallback skin. More...

Inheritance diagram for SkinFallback:
Collaboration diagram for SkinFallback:

Public Member Functions

 getTemplateData ()
 Adds an html-fallback-warning template to inform system administrators that their mediawiki skin is incorrectly setup. More...
 
 initPage (OutputPage $out)
 
- Public Member Functions inherited from SkinMustache
 generateHTML ()
 Subclasses not wishing to use the QuickTemplate render method can rewrite this method, for example to use TemplateParser::processTemplate.
Since
1.35
Returns
string of complete document HTML to output to the page which includes <!DOCTYPE> and opening and closing html tags.
Render the associated template. More...
 
- Public Member Functions inherited from SkinTemplate
 getPersonalToolsList ()
 Get the HTML for the p-personal list. More...
 
 getStructuredPersonalTools ()
 Get personal tools for the user. More...
 
 makeArticleUrlDetails ( $name, $urlaction='')
 
 makePersonalToolsList ( $personalTools=null, $options=[])
 Get the HTML for the personal tools list Please ensure setupTemplateContext is called before calling this method. More...
 
 outputPage ()
 Initialize various variables and generate the template @stable to override. More...
 
 tabAction ( $title, $message, $selected, $query='', $checkEdit=false)
 Builds an array with tab definition. More...
 
- Public Member Functions inherited from Skin
 __construct ( $options=null)
 
 aboutLink ()
 Gets the link to the wiki's about page. More...
 
 addToSidebar (&$bar, $message)
 Add content from a sidebar system message Currently only used for MediaWiki:Sidebar (but may be used by Extensions) More...
 
 addToSidebarPlain (&$bar, $text)
 Add content from plain text. More...
 
 bottomScripts ()
 This gets called shortly before the "</body>" tag. More...
 
 buildSidebar ()
 Build an array that represents the sidebar(s), the navigation bar among them. More...
 
 disclaimerLink ()
 Gets the link to the wiki's general disclaimers page. More...
 
 doEditSectionLink (Title $nt, $section, $tooltip, Language $lang)
 Create a section edit link. More...
 
 editUrlOptions ()
 Return URL options for the 'edit page' link. More...
 
 footerLink ( $desc, $page)
 Returns an HTML link for use in the footer. More...
 
 getAfterPortlet (string $name)
 Allows extensions to hook into known portlets and add stuff to them. More...
 
 getCategories ()
 
 getCategoryLinks ()
 
 getCopyright ( $type='detect')
 
 getDefaultModules ()
 Defines the ResourceLoader modules that should be added to the skin It is recommended that skins wishing to override call parent::getDefaultModules() and substitute out any modules they wish to change by using a key to look them up. More...
 
 getHtmlElementAttributes ()
 Return values for <html> element. More...
 
 getIndicatorsHTML ( $indicators)
 Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content. More...
 
 getLanguages ()
 Generates array of language links for the current page. More...
 
 getNewtalks ()
 Gets new talk page messages for the current user and returns an appropriate alert message (or an empty string if there are no messages) More...
 
 getPageClasses ( $title)
 TODO: document. More...
 
 getPersonalToolsForMakeListItem ( $urls)
 Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate. More...
 
 getRelevantTitle ()
 Return the "relevant" title. More...
 
 getRelevantUser ()
 Return the "relevant" user. More...
 
 getRevisionId ()
 Get the current revision ID. More...
 
 getSiteFooterLinks ()
 Gets the link to the wiki's privacy policy, about page, and disclaimer page. More...
 
 getSiteNotice ()
 Get the site notice. More...
 
 getSkinName ()
 
 getSkinStylePath ( $name)
 Return a fully resolved style path URL to images or styles stored in the current skin's folder. More...
 
 getUndeleteLink ()
 
 isResponsive ()
 Indicates if this skin is responsive. More...
 
 isRevisionCurrent ()
 Whether the revision displayed is the latest revision of the page. More...
 
 logoText ( $align='')
 
 mainPageLink ()
 Gets the link to the wiki's main page. More...
 
 makeFooterIcon ( $icon, $withImage='withImage')
 Renders a $wgFooterIcons icon according to the method's arguments. More...
 
 makeLink ( $key, $item, $options=[])
 Makes a link, usually used by makeListItem to generate a link for an item in a list used in navigation lists, portlets, portals, sidebars, etc... More...
 
 makeListItem ( $key, $item, $options=[])
 Generates a list item for a navigation, portlet, portal, sidebar... More...
 
 makeSearchButton ( $mode, $attrs=[])
 
 makeSearchInput ( $attrs=[])
 
 makeToolbox ( $navUrls, $feedUrls)
 Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate. More...
 
 mapInterwikiToLanguage ( $code)
 Allows correcting the language of interlanguage links which, mostly due to legacy reasons, do not always match the standards compliant language tag. More...
 
 printSource ()
 Text with the permalink to the source page, usually shown on the footer of a printed page. More...
 
 privacyLink ()
 Gets the link to the wiki's privacy policy page. More...
 
 setRelevantTitle ( $t)
 Set the "relevant" title. More...
 
 setRelevantUser ( $u)
 Set the "relevant" user. More...
 
 setupSkinUserCss (OutputPage $out)
 Hook point for adding style modules to OutputPage. More...
 
 showEmailUser ( $id)
 
 subPageSubtitle ( $out=null)
 
- Public Member Functions inherited from ContextSource
 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage(). More...
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID. More...
 
 getConfig ()
 
 getContext ()
 Get the base IContextSource object. More...
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 Stable to override. More...
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ( $key,... $params)
 Get a Message object with context set Parameters are the same as wfMessage() More...
 
 setContext (IContextSource $context)
 

Public Attributes

 $skinname = 'fallback'
 
- Public Attributes inherited from SkinTemplate
 $loggedin
 
string $skinname = 'monobook'
 Name of our skin, it probably needs to be all lower case. More...
 
string $template = QuickTemplate::class
 For QuickTemplate, the name of the subclass which will actually fill the template. More...
 
 $thispage
 
 $thisquery
 
 $titletxt
 
 $username
 
 $userpage
 
 $userpageUrlDetails
 
- Public Attributes inherited from Skin
string $stylename = null
 Stylesheets set to use. More...
 

Private Member Functions

 buildHelpfulInformationMessage ()
 Inform the user why they are seeing this skin. More...
 
 findInstalledSkins ()
 

Static Private Member Functions

static getSnippetForSkin ( $skin)
 Get the appropriate LocalSettings.php snippet to enable the given skin. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Skin
static checkTitle (&$title, $name)
 make sure we have some title to operate on More...
 
static getAllowedSkins ()
 Fetch the list of user-selectable skins in regards to $wgSkipSkins. More...
 
static getSkinNames ()
 Fetch the set of available skins. More...
 
static makeI18nUrl ( $name, $urlaction='')
 
static makeInternalOrExternalUrl ( $name)
 If url string starts with http, consider as external URL, else internal. More...
 
static makeMainPageUrl ( $urlaction='')
 
static makeNSUrl ( $name, $urlaction='', $namespace=NS_MAIN)
 this can be passed the NS number as defined in Language.php More...
 
static makeSpecialUrl ( $name, $urlaction='', $proto=null)
 Make a URL for a Special Page using the given query and protocol. More...
 
static makeSpecialUrlSubpage ( $name, $subpage, $urlaction='')
 
static makeUrl ( $name, $urlaction='')
 
static makeVariablesScript ( $data, $nonce=null)
 
static normalizeKey ( $key)
 Normalize a skin preference value to a form that can be loaded. More...
 
- Protected Member Functions inherited from SkinMustache
 getTemplateParser ()
 Get the template parser, it will be lazily created if not already set. More...
 
- Protected Member Functions inherited from SkinTemplate
 buildContentNavigationUrls ()
 a structured array of links usually used for the tabs in a skin More...
 
 buildNavUrls ()
 build array of common navigation links and run the SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook. More...
 
 buildPersonalUrls ()
 build array of urls for personal toolbar Please ensure setupTemplateContext is called before calling this method. More...
 
 getFooterIcons ()
 Get template representation of the footer. More...
 
 getFooterLinks ()
 Get template representation of the footer containing site footer links as well as standard footer links. More...
 
 getJsConfigVars ()
 Returns array of config variables that should be added only to this skin for use in JavaScript. More...
 
 getNameSpaceKey ()
 Generate strings used for xml 'id' names. More...
 
 prepareQuickTemplate ()
 initialize various variables and generate the template More...
 
 prepareSubtitle ()
 Prepare the subtitle of the page for output in the skin if one has been set. More...
 
 prepareUndeleteLink ()
 Prepare undelete link for output in page. More...
 
 prepareUserLanguageAttributes ()
 Prepare user language attribute links. More...
 
 setupTemplate ( $classname)
 Create the template engine object; we feed it a bunch of data and eventually it spits out some HTML. More...
 
 setupTemplateContext ()
 Setup class properties that are necessary prior to calling setupTemplateForOutput. More...
 
 setupTemplateForOutput ()
 
 wrapHTML ( $title, $html)
 Wrap the body text with language information and identifiable element. More...
 
- Protected Member Functions inherited from Skin
 afterContentHook ()
 This runs a hook to allow extensions placing their stuff after content and article metadata (e.g. More...
 
 buildFeedUrls ()
 Build data structure representing syndication links. More...
 
 drawCategoryBrowser ( $tree)
 Render the array as a series of links. More...
 
 generateDebugHTML ()
 Generate debug data HTML for displaying at the bottom of the main content area. More...
 
 getCopyrightIcon ()
 
 getIndicatorsData ( $indicators)
 Return an array of indicator data. More...
 
 getLogo ()
 URL to the default square logo (1x key) Please use ResourceLoaderSkinModule::getAvailableLogos. More...
 
 getPoweredBy ()
 Gets the powered by MediaWiki icon. More...
 
 getSearchLink ()
 
 lastModified ()
 Get the timestamp of the latest revision, formatted in user language. More...
 
 preloadExistence ()
 Preload the existence of three commonly-requested pages in a single query. More...
 
- Static Protected Member Functions inherited from Skin
static makeKnownUrlDetails ( $name, $urlaction='')
 Make URL details where the article exists (or at least it's convenient to think so) More...
 
static makeUrlDetails ( $name, $urlaction='')
 these return an array with the 'href' and boolean 'exists' More...
 
- Protected Attributes inherited from Skin
 $mRelevantTitle = null
 
 $mRelevantUser = null
 
array $options = []
 Skin options passed into constructor. More...
 
string null $skinname = null
 

Detailed Description

SkinTemplate class for the fallback skin.

Definition at line 13 of file SkinFallback.php.

Member Function Documentation

◆ buildHelpfulInformationMessage()

SkinFallback::buildHelpfulInformationMessage ( )
private

Inform the user why they are seeing this skin.

Returns
string

Definition at line 50 of file SkinFallback.php.

References findInstalledSkins(), ContextSource\getConfig(), getSnippetForSkin(), and ContextSource\msg().

Referenced by getTemplateData().

◆ findInstalledSkins()

SkinFallback::findInstalledSkins ( )
private
Returns
array

Definition at line 27 of file SkinFallback.php.

References ContextSource\getConfig().

Referenced by buildHelpfulInformationMessage().

◆ getSnippetForSkin()

static SkinFallback::getSnippetForSkin (   $skin)
staticprivate

Get the appropriate LocalSettings.php snippet to enable the given skin.

Parameters
string$skin
Returns
string

Definition at line 95 of file SkinFallback.php.

References $IP.

Referenced by buildHelpfulInformationMessage().

◆ getTemplateData()

SkinFallback::getTemplateData ( )

Adds an html-fallback-warning template to inform system administrators that their mediawiki skin is incorrectly setup.

It's recommended that skin developers do not add further to date here and instead work on improving SkinMustache::getTemplateData where necessary to improve flexibility of the data for all skin developers. Subclasses may extend this method to add additional template data.The data keys should be valid English words. Compound words should be hypenated except if they are normally written as one word. Each key should be prefixed with a type hint, this may be enforced by the class PHPUnit test.Plain strings are prefixed with 'html-', plain arrays with 'array-' and complex array data with 'data-'. 'is-' and 'has-' prefixes can be used for boolean variables. Messages are prefixed with 'msg-', followed by their message key. All messages specified in the skin option 'messages' will be available under 'msg-MESSAGE-NAME'.

Returns
array Data for a mustache template

Returns
array

Reimplemented from SkinMustache.

Definition at line 113 of file SkinFallback.php.

References buildHelpfulInformationMessage(), ContextSource\getConfig(), and Html\warningBox().

◆ initPage()

SkinFallback::initPage ( OutputPage  $out)
Parameters
OutputPage$out

Reimplemented from Skin.

Definition at line 19 of file SkinFallback.php.

References OutputPage\enableClientCache().

Member Data Documentation

◆ $skinname

SkinFallback::$skinname = 'fallback'

Definition at line 14 of file SkinFallback.php.


The documentation for this class was generated from the following file: