Inherits Linker.
Inherited by SkinCologneBlue, SkinNostalgia, SkinStandard, and SkinTemplate.
Public Member Functions | |
| Skin () | |
| Constructor, call parent constructor. | |
| getStylesheet () | |
| getSkinName () | |
| qbSetting () | |
| initPage (OutputPage $out) | |
| preloadExistence () | |
| Preload the existence of three commonly-requested pages in a single query. | |
| addMetadataLinks (OutputPage $out) | |
| setMembers () | |
| outputPage (OutputPage $out) | |
| getHeadScripts ($allowUserJs) | |
| userCanPreview ($action) | |
| To make it harder for someone to slip a user a fake user-JavaScript or user-CSS preview, a random token is associated with the login session. | |
| generateUserJs () | |
| generated JavaScript action=raw&gen=js This returns MediaWiki:Common.js and MediaWiki:[Skinname].js concate- nated together. | |
| generateUserStylesheet () | |
| generate user stylesheet for action=raw&gen=css | |
Static Public Member Functions | |
| static | getSkinNames () |
| Fetch the set of available skins. | |
| static | getUsableSkins () |
| Fetch the list of usable skins in regards to $wgSkipSkins. | |
| static | normalizeKey ($key) |
| Normalize a skin preference value to a form that can be loaded. | |
| static & | newFromKey ($key) |
| Factory method for loading a skin of a given type. | |
| static | makeVariablesScript ($data) |
| static | makeGlobalVariablesScript ($data) |
| Make a <script> tag containing global variables. | |
Public Attributes | |
| $mWatchLinkNum = 0 | |
| #@+ | |
| a | stub:after |
| a | content: "!" |
| color | __pad0__: #772233 |
Protected Member Functions | |
| reallyGenerateUserStylesheet () | |
| Split for easier subclassing in SkinSimple, SkinStandard and SkinCologneBlue. | |
Protected Attributes | |
| $searchboxes = '' | |
| $mRevisionId | |
| #@- | |
| $skinname = 'standard' | |
This base class is also the "Standard" skin.
See docs/skin.txt for more information.
Definition at line 17 of file Skin.php.
| Skin::addMetadataLinks | ( | OutputPage $ | out | ) |
Definition at line 230 of file Skin.php.
References $wgEnableCreativeCommonsRdf, $wgEnableDublinCoreRdf, $wgRightsPage, $wgRightsUrl, $wgTitle, OutputPage::addLink(), OutputPage::addMetadataLink(), OutputPage::isArticleRelated(), and Title::newFromText().
Referenced by initPage().
| Skin::generateUserJs | ( | ) |
generated JavaScript action=raw&gen=js This returns MediaWiki:Common.js and MediaWiki:[Skinname].js concate- nated together.
For some bizarre reason, it does *not* return any custom user JS from subpages. Huh?
There's absolutely no reason to have separate Monobook/Common JSes. Any JS that cares can just check the skin variable generated at the top. For now Monobook.js will be maintained, but it should be consi- dered deprecated.
Definition at line 479 of file Skin.php.
References $s, $wgStylePath, Xml::escapeJsString(), wfEmptyMsg(), wfMsgForContent(), wfProfileIn(), and wfProfileOut().
| Skin::generateUserStylesheet | ( | ) |
generate user stylesheet for action=raw&gen=css
Definition at line 509 of file Skin.php.
References $s, wfProfileIn(), and wfProfileOut().
| Skin::getHeadScripts | ( | $ | allowUserJs | ) |
Reimplemented in SkinStandard.
Definition at line 417 of file Skin.php.
References $wgJsMimeType, $wgStylePath, $wgStyleVersion, $wgUser, $wgUseSiteJs, and makeUrl().
Referenced by OutputPage::headElement().
| Skin::getSkinName | ( | ) |
Reimplemented in SkinCologneBlue, and SkinNostalgia.
Definition at line 162 of file Skin.php.
Referenced by SkinTemplate::outputPage().
| static Skin::getSkinNames | ( | ) | [static] |
Fetch the set of available skins.
Definition at line 36 of file Skin.php.
References $file, $wgStyleDirectory, $wgValidSkinNames, wfProfileIn(), and wfProfileOut().
Referenced by getUsableSkins(), Title::isValidCssJsSubpage(), newFromKey(), and normalizeKey().
| Skin::getStylesheet | ( | ) |
| static Skin::getUsableSkins | ( | ) | [static] |
Fetch the list of usable skins in regards to $wgSkipSkins.
Useful for Special:Preferences and other places where you only want to show skins users _can_ use.
Definition at line 70 of file Skin.php.
References $wgSkipSkins, and getSkinNames().
Referenced by PreferencesForm::mainPrefsForm().
| Skin::initPage | ( | OutputPage $ | out | ) |
Reimplemented in SkinTemplate, SkinChick, SkinModern, SkinMonoBook, SkinMySkin, and SkinSimple.
Definition at line 174 of file Skin.php.
References $wgAppleTouchIcon, $wgFavicon, OutputPage::addLink(), addMetadataLinks(), preloadExistence(), wfMsgForContent(), wfProfileIn(), wfProfileOut(), and wfScript().
Referenced by outputPage().
| static Skin::makeGlobalVariablesScript | ( | $ | data | ) | [static] |
Make a <script> tag containing global variables.
| array | $data Associative array containing one element: skinname => the skin name The odd calling convention is for backwards compatibility |
Definition at line 332 of file Skin.php.
References $ns, $type, $wgActionPaths, $wgAjaxWatch, $wgArticle, $wgArticlePath, $wgBreakFrames, $wgCanonicalNamespaceNames, $wgContLang, $wgDBname, $wgEnableAPI, $wgEnableMWSuggest, $wgEnableWriteAPI, $wgLang, $wgLivePreview, $wgMWSuggestTemplate, $wgOut, $wgRequest, $wgRestrictionTypes, $wgScript, $wgScriptPath, $wgServer, $wgStylePath, $wgTitle, $wgUseAjax, $wgUser, $wgVariantArticlePath, $wgVersion, SearchEngine::getMWSuggestTemplate(), SpecialPage::resolveAlias(), SearchEngine::userNamespaces(), and wfMsg().
Referenced by MonoBookTemplate::execute(), and ModernTemplate::execute().
| static Skin::makeVariablesScript | ( | $ | data | ) | [static] |
| static& Skin::newFromKey | ( | $ | key | ) | [static] |
Factory method for loading a skin of a given type.
| string | $key 'monobook', 'standard', etc |
Definition at line 125 of file Skin.php.
References $key, $wgStyleDirectory, getSkinNames(), normalizeKey(), and wfDebug().
Referenced by User::getSkin().
| static Skin::normalizeKey | ( | $ | key | ) | [static] |
Normalize a skin preference value to a form that can be loaded.
If a skin can't be found, it will fall back to the configured default (or the old 'Classic' skin if that's broken).
| string | $key |
Definition at line 87 of file Skin.php.
References $fallback, $key, $wgDefaultSkin, and getSkinNames().
Referenced by PreferencesForm::__construct(), newFromKey(), and PreferencesForm::resetPrefs().
| Skin::outputPage | ( | OutputPage $ | out | ) |
Reimplemented in SkinTemplate.
Definition at line 274 of file Skin.php.
References $name, $wgDebugComments, afterContent(), afterContentHook(), beforeContent(), bottomScripts(), getBodyOptions(), OutputPage::headElement(), initPage(), OutputPage::out(), setMembers(), wfProfileIn(), wfProfileOut(), and wfReportTime().
| Skin::preloadExistence | ( | ) |
| Skin::qbSetting | ( | ) |
Definition at line 166 of file Skin.php.
References $wgOut, and $wgUser.
Referenced by SkinStandard::doAfterContent(), SkinCologneBlue::doAfterContent(), SkinCologneBlue::doBeforeContent(), SkinStandard::getBodyOptions(), SkinStandard::getHeadScripts(), SkinStandard::reallyGenerateUserStylesheet(), SkinCologneBlue::reallyGenerateUserStylesheet(), and SkinStandard::setupSkinUserCss().
| Skin::reallyGenerateUserStylesheet | ( | ) | [protected] |
Split for easier subclassing in SkinSimple, SkinStandard and SkinCologneBlue.
Reimplemented in SkinCologneBlue, SkinSimple, and SkinStandard.
| Skin::setMembers | ( | ) |
Definition at line 266 of file Skin.php.
References $wgTitle, and $wgUser.
Referenced by SkinTemplate::outputPage(), and outputPage().
| Skin::Skin | ( | ) |
Constructor, call parent constructor.
Definition at line 29 of file Skin.php.
References Linker::__construct().
| Skin::userCanPreview | ( | $ | action | ) |
To make it harder for someone to slip a user a fake user-JavaScript or user-CSS preview, a random token is associated with the login session.
If it's not passed back with the preview request, we won't render the code.
| string | $action |
Definition at line 453 of file Skin.php.
References $action, $wgRequest, $wgTitle, and $wgUser.
Referenced by SkinMonoBookCBT::isCssPreview(), SkinMonoBookCBT::isJsPreview(), and SkinTemplate::setupUserJs().
Skin::$skinname = 'standard' [protected] |
| color Skin::__pad0__ |
1.5.9