Inherits Linker.
Inherited by SkinCologneBlue, SkinNostalgia, SkinStandard, and SkinTemplate.
Public Member Functions | |
__construct () | |
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) | |
Adds metadata links (Creative Commons/Dublin Core/copyright) to the HTML output. | |
setTitle ($t) | |
Set the title. | |
getTitle () | |
Get the title. | |
outputPage (OutputPage $out) | |
Outputs the HTML generated by other functions. | |
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 ($skinName=null) | |
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 ($skinName) |
Make a <script> tag containing global variables. | |
Public Attributes | |
$mWatchLinkNum = 0 | |
#@+ | |
a | stub:after |
a | content: "!" |
color | __pad0__: #772233 |
Protected Member Functions | |
setMembers () | |
Set some local variables. | |
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 18 of file Skin.php.
Skin::__construct | ( | ) |
Skin::addMetadataLinks | ( | OutputPage $ | out | ) |
Adds metadata links (Creative Commons/Dublin Core/copyright) to the HTML output.
$out | Object: instance of OutputPage |
Definition at line 242 of file Skin.php.
References $wgEnableCreativeCommonsRdf, $wgEnableDublinCoreRdf, $wgRightsPage, $wgRightsUrl, OutputPage::addLink(), OutputPage::addMetadataLink(), OutputPage::isArticleRelated(), and Title::newFromText().
Referenced by initPage().
Skin::generateUserJs | ( | $ | skinName = null |
) |
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.
$skinName | String: If set, overrides the skin name |
Definition at line 508 of file Skin.php.
References $s, $wgStylePath, Xml::escapeJsString(), wfEmptyMsg(), wfMsgExt(), wfProfileIn(), and wfProfileOut().
Skin::generateUserStylesheet | ( | ) |
Generate user stylesheet for action=raw&gen=css.
Definition at line 541 of file Skin.php.
References $s, wfProfileIn(), and wfProfileOut().
Skin::getSkinName | ( | ) |
Reimplemented in SkinCologneBlue, and SkinNostalgia.
Definition at line 167 of file Skin.php.
Referenced by OutputPage::getHeadScripts(), and SkinTemplate::outputPage().
static Skin::getSkinNames | ( | ) | [static] |
Fetch the set of available skins.
Definition at line 40 of file Skin.php.
References $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 74 of file Skin.php.
References $wgSkipSkins, and getSkinNames().
Referenced by Preferences::generateSkinOptions().
Skin::initPage | ( | OutputPage $ | out | ) |
Reimplemented in SkinVector.
Definition at line 181 of file Skin.php.
References $wgAppleTouchIcon, $wgFavicon, OutputPage::addLink(), addMetadataLinks(), preloadExistence(), wfMsgForContent(), wfProfileIn(), wfProfileOut(), and wfScript().
Referenced by SkinTemplate::outputPage(), and outputPage().
static Skin::makeGlobalVariablesScript | ( | $ | skinName | ) | [static] |
Make a <script> tag containing global variables.
$skinName | string Name of the skin The odd calling convention is for backwards compatibility Make this not depend on $wgTitle! |
Definition at line 361 of file Skin.php.
References $wgActionPaths, $wgAjaxWatch, $wgArticle, $wgArticlePath, $wgBreakFrames, $wgContLang, $wgDBname, $wgEnableAPI, $wgEnableMWSuggest, $wgEnableWriteAPI, $wgFileExtensions, $wgLang, $wgMWSuggestTemplate, $wgOut, $wgRequest, $wgRestrictionTypes, $wgScript, $wgScriptExtension, $wgScriptPath, $wgServer, $wgSitename, $wgStylePath, $wgTitle, $wgUseAjax, $wgUser, $wgVariantArticlePath, $wgVersion, MWNamespace::exists(), MWNamespace::getCanonicalName(), SearchEngine::getMWSuggestTemplate(), Title::newFromText(), SpecialPage::resolveAlias(), SearchEngine::userNamespaces(), wfMsg(), wfMsgForContent(), and wfUrlProtocols().
Referenced by OutputPage::getHeadScripts().
static Skin::makeVariablesScript | ( | $ | data | ) | [static] |
Definition at line 341 of file Skin.php.
References $name, Xml::encodeJsVar(), and Html::inlineScript().
Referenced by UploadForm::addUploadJS().
static& Skin::newFromKey | ( | $ | key | ) | [static] |
Factory method for loading a skin of a given type.
$key | String: 'monobook', 'standard', etc. |
Definition at line 128 of file Skin.php.
References $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).
$key | String: 'monobook', 'standard', etc. |
Definition at line 90 of file Skin.php.
References $fallback, $wgDefaultSkin, and getSkinNames().
Referenced by newFromKey().
Skin::outputPage | ( | OutputPage $ | out | ) |
Outputs the HTML generated by other functions.
$out | Object: instance of OutputPage |
Reimplemented in SkinTemplate.
Definition at line 308 of file Skin.php.
References $wgDebugComments, afterContent(), afterContentHook(), beforeContent(), bottomScripts(), OutputPage::headElement(), initPage(), OutputPage::out(), setMembers(), wfProfileIn(), wfProfileOut(), and wfReportTime().
Skin::preloadExistence | ( | ) |
Preload the existence of three commonly-requested pages in a single query.
Definition at line 218 of file Skin.php.
References $wgUser.
Referenced by initPage().
Skin::qbSetting | ( | ) |
Definition at line 171 of file Skin.php.
References $wgOut, and $wgUser.
Referenced by SkinStandard::doAfterContent(), SkinCologneBlue::doAfterContent(), SkinCologneBlue::doBeforeContent(), 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 | ( | ) | [protected] |
Set some local variables.
Definition at line 284 of file Skin.php.
References $wgUser.
Referenced by SkinTemplate::outputPage(), and outputPage().
Skin::setTitle | ( | $ | t | ) |
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.
$action | String: 'edit', 'submit' etc. |
Definition at line 475 of file Skin.php.
References $action, $wgRequest, and $wgUser.
Referenced by OutputPage::getHeadScripts(), and SkinTemplate::setupUserJs().
Skin::$skinname = 'standard' [protected] |
Reimplemented in SkinTemplate, SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.
color Skin::__pad0__ |