includes/Skin.php File Reference

Go to the source code of this file.

Classes

class  Skin
 The main skin class that provide methods and properties for all other skins. More...

Functions

 setupUserCss (OutputPage $out)
 setupSkinUserCss (OutputPage $out)
 Add skin specific stylesheets.
 getBodyOptions ()
 getPageClasses ($title)
 getLogo ()
 URL to the logo.
 beforeContent ()
 This will be called immediately after the <body> tag.
 doBeforeContent ()
 getCategoryLinks ()
 drawCategoryBrowser ($tree, &$skin)
 Render the array as a serie of links.
 getCategories ()
 getQuickbarCompensator ($rows=1)
 afterContentHook ()
 This runs a hook to allow extensions placing their stuff after content and article metadata (e.g.
 generateDebugHTML ()
 Generate debug data HTML for displaying at the bottom of the main content area.
 afterContent ()
 This gets called shortly before the </body> tag.
 bottomScripts ()
 This gets called shortly before the </body> tag.
 printSource ()
 printFooter ()
 doAfterContent ()
 overloaded by derived classes
 pageTitleLinks ()
 getUndeleteLink ()
 printableLink ()
 pageTitle ()
 pageSubtitle ()
 subPageSubtitle ()
 showIPinHeader ()
 Returns true if the IP should be shown in the header.
 nameAndLogin ()
 getSearchLink ()
 escapeSearchLink ()
 searchForm ()
 topLinks ()
 extensionTabLinks ()
 Compatibility for extensions adding functionality through tabs.
 variantLinks ()
 Language/charset variant links for classic-style skins.
 bottomLinks ()
 pageStats ()
 getCopyright ($type= 'detect')
 getCopyrightIcon ()
 getPoweredBy ()
 lastModified ()
 logoText ($align= '')
 specialPagesList ()
 show a drop-down box of special pages
 mainPageLink ()
 copyrightLink ()
 footerLink ($desc, $page)
 privacyLink ()
 aboutLink ()
 disclaimerLink ()
 editThisPage ()
 editUrlOptions ()
 Return URL options for the 'edit page' link.
 deleteThisPage ()
 protectThisPage ()
 watchThisPage ()
 moveThisPage ()
 historyLink ()
 whatLinksHere ()
 userContribsLink ()
 showEmailUser ($id)
 emailUserLink ()
 watchPageLinksLink ()
 trackbackLink ()
 otherLanguages ()
 talkLink ()
 commentLink ()
static makeMainPageUrl ($urlaction= '')
static makeSpecialUrl ($name, $urlaction= '')
static makeSpecialUrlSubpage ($name, $subpage, $urlaction= '')
static makeI18nUrl ($name, $urlaction= '')
static makeUrl ($name, $urlaction= '')
static makeInternalOrExternalUrl ($name)
static makeNSUrl ($name, $urlaction= '', $namespace=NS_MAIN)
static makeUrlDetails ($name, $urlaction= '')
static makeKnownUrlDetails ($name, $urlaction= '')
 Make URL details where the article exists (or at least it's convenient to think so).
static checkTitle (&$title, $name)
 buildSidebar ()
 Build an array that represents the sidebar(s), the navigation bar among them.

Variables

 END
if($wgUser->getOption(
'justify')) if(!$wgUser->
getOption( 'showtoc')) if(!$wgUser->
getOption( 'editsection'))
return 
$s


Function Documentation

aboutLink (  ) 

afterContent (  ) 

This gets called shortly before the </body> tag.

Returns:
String HTML to be put before </body>

Definition at line 911 of file Skin.php.

References doAfterContent(), generateDebugHTML(), and printFooter().

Referenced by Skin::outputPage().

afterContentHook (  )  [protected]

This runs a hook to allow extensions placing their stuff after content and article metadata (e.g.

categories). Note: This function has nothing to do with afterContent().

This hook is placed here in order to allow using the same hook for all skins, both the SkinTemplate based ones and the older ones, which directly use this class to get their data.

The output of this function gets processed in SkinTemplate::outputPage() for the SkinTemplate based skins, all other skins should directly echo it.

Returns an empty string by default, if not changed by any hook function.

Definition at line 871 of file Skin.php.

References wfDebug(), and wfRunHooks().

Referenced by SkinTemplate::outputPage(), and Skin::outputPage().

beforeContent (  ) 

This will be called immediately after the <body> tag.

Split into two functions to make it easier to subclass.

Definition at line 687 of file Skin.php.

References doBeforeContent().

Referenced by Skin::outputPage().

bottomLinks (  ) 

bottomScripts (  ) 

This gets called shortly before the </body> tag.

Returns:
String HTML-wrapped JS code to be put before </body>

Definition at line 920 of file Skin.php.

References $wgJsMimeType, and wfRunHooks().

Referenced by SkinTemplate::outputPage(), and Skin::outputPage().

buildSidebar (  ) 

Build an array that represents the sidebar(s), the navigation bar among them.

Returns:
array

Definition at line 1857 of file Skin.php.

References $key, $parserMemc, $text, $title, $wgEnableSidebarCache, $wgLang, $wgSidebarCacheExpiry, Title::newFromText(), wfEmptyMsg(), wfMemcKey(), wfMsgExt(), wfMsgForContent(), wfProfileIn(), wfProfileOut(), wfRunHooks(), and wfUrlProtocols().

Referenced by SkinTemplate::outputPage(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

static checkTitle ( &$  title,
name 
) [static]

commentLink (  ) 

Definition at line 1753 of file Skin.php.

References $title, $wgOut, $wgTitle, and wfMsg().

Referenced by SkinCologneBlue::quickBar().

copyrightLink (  ) 

Definition at line 1478 of file Skin.php.

References $s, wfMsg(), and wfMsgForContent().

deleteThisPage (  ) 

Definition at line 1546 of file Skin.php.

References $s, $t, $wgRequest, $wgTitle, and wfMsg().

Referenced by bottomLinks(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

disclaimerLink (  ) 

Definition at line 1506 of file Skin.php.

References footerLink().

Referenced by SkinMonoBookCBT::disclaimer(), SkinTemplate::outputPage(), and pageTitleLinks().

doAfterContent (  ) 

overloaded by derived classes

Definition at line 940 of file Skin.php.

Referenced by afterContent().

doBeforeContent (  ) 

drawCategoryBrowser ( tree,
&$  skin 
)

Render the array as a serie of links.

Parameters:
$tree Array: categories tree returned by Title::getParentCategoryTree
&skin Object: skin passed by reference
Returns:
String separated by >, terminate with "\n"

Definition at line 821 of file Skin.php.

References Title::newFromText().

Referenced by getCategoryLinks().

editThisPage (  ) 

editUrlOptions (  ) 

Return URL options for the 'edit page' link.

This may include an 'oldid' specifier, if the current page view is such.

Returns:
string
Access:
private

Definition at line 1536 of file Skin.php.

References $wgArticle.

Referenced by SkinTemplate::buildContentActionUrls(), editThisPage(), getBodyOptions(), and SkinMonoBookCBT::getEditUrl().

emailUserLink (  ) 

escapeSearchLink (  ) 

Definition at line 1159 of file Skin.php.

References getSearchLink().

Referenced by SkinTemplate::outputPage(), SkinCologneBlue::searchForm(), and searchForm().

extensionTabLinks (  ) 

Compatibility for extensions adding functionality through tabs.

Eventually these old skins should be replaced with SkinTemplate-based versions, sigh...

Returns:
string

Definition at line 1219 of file Skin.php.

References $out, $s, $wgLang, Xml::element(), wfMsgExt(), and wfRunHooks().

Referenced by SkinCologneBlue::sysLinks(), SkinNostalgia::topLinks(), and topLinks().

footerLink ( desc,
page 
) [private]

Definition at line 1484 of file Skin.php.

References $page, wfMsgExt(), and wfMsgForContent().

Referenced by aboutLink(), disclaimerLink(), and privacyLink().

generateDebugHTML (  )  [protected]

Generate debug data HTML for displaying at the bottom of the main content area.

Returns:
String HTML containing debug data, if enabled (otherwise empty).

Definition at line 897 of file Skin.php.

References $wgOut, and $wgShowDebug.

Referenced by afterContent(), and SkinTemplate::outputPage().

getBodyOptions (  ) 

getCategories (  ) 

Definition at line 838 of file Skin.php.

References $classes, and getCategoryLinks().

Referenced by SkinMonoBookCBT::catlinks(), doBeforeContent(), and SkinTemplate::outputPage().

getCategoryLinks (  ) 

getCopyright ( type = 'detect'  ) 

getCopyrightIcon (  ) 

getLogo (  ) 

URL to the logo.

Definition at line 678 of file Skin.php.

References $wgLogo.

Referenced by logoText().

getPageClasses ( title  ) 

Definition at line 662 of file Skin.php.

References $name, $title, $type, and Sanitizer::escapeClass().

Referenced by getBodyOptions(), and SkinTemplate::outputPage().

getPoweredBy (  ) 

Definition at line 1403 of file Skin.php.

References $url, and $wgStylePath.

Referenced by SkinTemplate::outputPage(), and SkinMonoBookCBT::poweredbyico().

getQuickbarCompensator ( rows = 1  ) 

getSearchLink (  ) 

Definition at line 1154 of file Skin.php.

References $searchPage, and SpecialPage::getTitleFor().

Referenced by escapeSearchLink(), and SkinMonoBookCBT::searchaction().

getUndeleteLink (  ) 

historyLink (  ) 

lastModified (  ) 

logoText ( align = ''  ) 

mainPageLink (  ) 

static makeI18nUrl ( name,
urlaction = '' 
) [static]

Definition at line 1791 of file Skin.php.

References $name, $title, checkTitle(), Title::newFromText(), and wfMsgForContent().

static makeInternalOrExternalUrl ( name  )  [static]

Definition at line 1805 of file Skin.php.

References $name, makeUrl(), and wfUrlProtocols().

Referenced by EditPage::showEditForm(), and SkinMonoBookCBT::sidebar().

static makeKnownUrlDetails ( name,
urlaction = '' 
) [static]

Make URL details where the article exists (or at least it's convenient to think so).

Definition at line 1833 of file Skin.php.

References $name, $title, checkTitle(), and Title::newFromText().

Referenced by SkinTemplate::outputPage().

static makeMainPageUrl ( urlaction = ''  )  [static]

Definition at line 1775 of file Skin.php.

References $title, checkTitle(), and Title::newMainPage().

Referenced by SkinTemplate::buildNavUrls(), and SkinMonoBookCBT::mainpage().

static makeNSUrl ( name,
urlaction = '',
namespace = NS_MAIN 
) [static]

Definition at line 1814 of file Skin.php.

References $name, $title, checkTitle(), and Title::makeTitleSafe().

Referenced by setupUserCss(), and SkinMonoBookCBT::sitecss().

static makeSpecialUrl ( name,
urlaction = '' 
) [static]

static makeSpecialUrlSubpage ( name,
subpage,
urlaction = '' 
) [static]

static makeUrl ( name,
urlaction = '' 
) [static]

static makeUrlDetails ( name,
urlaction = '' 
) [static]

Definition at line 1821 of file Skin.php.

References $name, $title, checkTitle(), and Title::newFromText().

Referenced by SkinTemplate::outputPage().

moveThisPage (  ) 

nameAndLogin (  ) 

otherLanguages (  ) 

pageStats (  ) 

pageSubtitle (  ) 

pageTitle (  ) 

pageTitleLinks (  ) 

printableLink (  ) 

Definition at line 1014 of file Skin.php.

References $s, $wgFeedClasses, $wgLang, $wgOut, $wgRequest, wfMsg(), and wfMsgHtml().

Referenced by pageTitleLinks(), and SkinCologneBlue::quickBar().

printFooter (  ) 

Definition at line 934 of file Skin.php.

References pageStats(), and printSource().

Referenced by afterContent().

printSource (  ) 

Returns:
string Retrievied from HTML text

Definition at line 928 of file Skin.php.

References $url, $wgTitle, and wfMsg().

Referenced by SkinTemplate::outputPage(), and printFooter().

privacyLink (  ) 

Definition at line 1498 of file Skin.php.

References footerLink().

Referenced by SkinTemplate::outputPage(), pageTitleLinks(), and SkinMonoBookCBT::privacy().

protectThisPage (  ) 

Definition at line 1560 of file Skin.php.

References $s, $t, $wgRequest, $wgTitle, and wfMsg().

Referenced by bottomLinks(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

searchForm (  ) 

setupSkinUserCss ( OutputPage out  ) 

Add skin specific stylesheets.

Parameters:
$out OutputPage

Definition at line 630 of file Skin.php.

References OutputPage::addStyle().

Referenced by setupUserCss().

setupUserCss ( OutputPage out  ) 

showEmailUser ( id  ) 

showIPinHeader (  ) 

Returns true if the IP should be shown in the header.

Definition at line 1091 of file Skin.php.

References $wgShowIPinHeader.

Referenced by SkinTemplate::buildPersonalUrls(), nameAndLogin(), and SkinTemplate::outputPage().

specialPagesList (  ) 

show a drop-down box of special pages

Definition at line 1446 of file Skin.php.

References $name, $page, $s, $wgContLang, $wgRedirectScript, $wgServer, SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages(), and wfMsg().

Referenced by SkinNostalgia::topLinks().

subPageSubtitle (  ) 

talkLink (  ) 

Definition at line 1700 of file Skin.php.

References $s, $text, $wgTitle, wfFindFile(), and wfMsg().

Referenced by bottomLinks(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

topLinks (  ) 

trackbackLink (  ) 

Definition at line 1662 of file Skin.php.

References $wgTitle, and wfMsg().

Referenced by bottomLinks().

userContribsLink (  ) 

variantLinks (  ) 

Language/charset variant links for classic-style skins.

Returns:
string

Definition at line 1244 of file Skin.php.

References $code, $s, $wgContLang, $wgDisableLangConversion, $wgLang, and $wgTitle.

Referenced by SkinCologneBlue::sysLinks(), SkinNostalgia::topLinks(), and topLinks().

watchPageLinksLink (  ) 

watchThisPage (  ) 

Definition at line 1579 of file Skin.php.

References $s, $t, $wgOut, $wgTitle, and wfMsg().

Referenced by bottomLinks(), SkinStandard::quickBar(), and SkinCologneBlue::quickBar().

whatLinksHere (  ) 


Variable Documentation

if ($wgUser->getOption( 'justify')) if (!$wgUser->getOption( 'showtoc')) if (!$wgUser->getOption( 'editsection')) return $s

Definition at line 551 of file Skin.php.

Referenced by Site::__construct(), ExplodeIterator::__construct(), MimeMagic::__construct(), WhiteSpaceNode::__construct(), PPCustomFrame_Hash::__toString(), PPTemplateFrame_Hash::__toString(), PPNode_DOM::__toString(), PPCustomFrame_DOM::__toString(), PPTemplateFrame_DOM::__toString(), MediaWikiBagOStuff::_blobdecode(), MediaWikiBagOStuff::_blobencode(), MediaWikiBagOStuff::_strencode(), ChangeText::addHtml(), LinkCache::addLinkObj(), PPDAccum_Hash::addLiteral(), PPDStackElement::addPart(), PPDStack::addPart(), DatabaseSqlite::addQuotes(), DatabasePostgres::addQuotes(), DatabaseOracle::addQuotes(), DatabaseIbm_db2::addQuotes(), Database::addQuotes(), DatabaseIbm_db2::addQuotesSmart(), ParserOutput::addWarning(), UploadForm::ajaxGetExistsWarning(), SkinMonoBookCBT::anonlogin(), SkinMonoBookCBT::anontalk(), SkinMonoBookCBT::anonuserpage(), PageHistory::beginHistoryList(), bottomLinks(), PPDStackElement::breakSyntax(), SkinMonoBookCBT::ca_variant(), Language::caseFold(), Language::checkTitleEncoding(), LanguageEo::checkTitleEncoding(), ParserTest::chomp(), ApiResult::cleanUp_helper(), Article::commitRollback(), CBTProcessor::compile(), ExtensionInstaller::confirm(), copyrightLink(), Profiler::debug(), User::decodeOptions(), deleteThisPage(), SkinStandard::doAfterContent(), SkinNostalgia::doAfterContent(), SkinCologneBlue::doAfterContent(), SkinNostalgia::doBeforeContent(), SkinCologneBlue::doBeforeContent(), doBeforeContent(), WatchedItem::doDuplicateEntries(), LinkHolderArray::doVariants(), editThisPage(), User::encodeOptions(), PageHistory::endHistoryList(), Database::escapeLike(), RestrictUserForm::existingRestrictions(), PPFrame_Hash::expand(), PPFrame_DOM::expand(), extensionTabLinks(), EditPage::extractMetaDataFromArticle(), SkinMonoBookCBT::extratabs(), Xml::fieldset(), Language::firstChar(), Language::formatNum(), IPUnblockForm::formatRow(), TablePager::formatRow(), PageHistoryPager::formatRow(), CoreParserFunctions::fullurl(), CoreParserFunctions::fullurle(), Skin::generateUserJs(), Skin::generateUserStylesheet(), IndexPager::getBody(), ImageHistoryPseudoPager::getBody(), getBodyOptions(), getCategoryLinks(), Credits::getContributors(), Credits::getCredits(), Title::getEditURL(), PageHistoryPager::getEndBody(), ImageListPager::getForm(), OutputPage::getHeadItems(), SkinStandard::getHeadScripts(), TablePager::getHiddenFields(), SpecialListUserRestrictionsForm::getHTML(), Interwiki::getInterwikiCached(), TablePager::getLimitSelect(), RevisionDeleter::getLogMessage(), TablePager::getNavigationBar(), Title::getPrefixedDBkey(), Title::getPrefixedText(), Title::getPrefixedURL(), PPFuzzTest::getReport(), TablePager::getStartBody(), Status::getWikiText(), Language::hebrewNumeral(), PageHistory::historyLine(), StringUtils::hungryDelimiterReplace(), User::idForName(), User::idFromName(), ImagePage::imageLinks(), PPFrame_Hash::implode(), PPFrame_DOM::implode(), PPFrame_Hash::implodeWithFlags(), PPFrame_DOM::implodeWithFlags(), ChangesList::insertAction(), ChangesList::insertArticleLink(), ChangesList::insertComment(), ChangesList::insertDateHeader(), ChangesList::insertDiffHist(), ChangesList::insertLog(), ChangesList::insertMove(), ChangesList::insertRollback(), ChangesList::insertTags(), ChangesList::insertTimestamp(), ChangesList::insertUserRelatedLinks(), SkinMonoBookCBT::language_urls(), lastModified(), CoreParserFunctions::lc(), CoreParserFunctions::lcfirst(), Language::listToText(), EditPage::livePreview(), User::loadFromDatabase(), CoreParserFunctions::localurl(), CoreParserFunctions::localurle(), SkinMonoBookCBT::login(), logoText(), SkinMonoBookCBT::logout(), mainPageLink(), DatabasePostgres::makeConnectionString(), Linker::makeImageLink2(), PPFuzzTester::makeInputText(), Linker::makeThumbLink2(), Parser::markerSkipCallback(), SkinCologneBlue::menuHead(), SkinMonoBookCBT::mycontris(), SkinMonoBookCBT::mytalk(), Title::nameOf(), SkinMonoBookCBT::numberofwatchingusers(), CBTCompiler::opsToString(), otherLanguages(), pageStats(), pageSubtitle(), pageTitle(), pageTitleLinks(), LanguageConverter::parseCachedTable(), Language::parseFormattedNumber(), ApiBase::parseMultiValue(), SkinMonoBookCBT::personal_urls(), SearchHighlighter::position(), SkinMonoBookCBT::preferences(), printableLink(), ImagePage::printSharedImageText(), ExtensionInstaller::prompt(), protectThisPage(), SquidUpdate::purge(), SkinStandard::quickBar(), SkinCologneBlue::quickBar(), DatabaseSqlite::quote_ident(), DatabasePostgres::quote_ident(), DatabaseOracle::quote_ident(), SkinStandard::reallyGenerateUserStylesheet(), SkinSimple::reallyGenerateUserStylesheet(), SkinCologneBlue::reallyGenerateUserStylesheet(), Skin::reallyGenerateUserStylesheet(), rebuildTextIndex(), OldChangesList::recentChangesLine(), Language::recodeForEdit(), Language::recodeInput(), Parser::replaceExternalLinks(), LinkHolderArray::replaceInternal(), Parser::replaceInternalLinks(), Parser_LinkHooks::replaceInternalLinks2(), Parser::replaceInternalLinks2(), DatabaseSqlite::replaceVars(), Language::romanNumeral(), SkinCologneBlue::searchForm(), searchForm(), SkinMonoBookCBT::selecttab(), RestrictUserForm::selectUserForm(), SpecialAllpages::showChunk(), ProtectedTitlesForm::showList(), ProtectedPagesForm::showList(), Credits::showPage(), SpecialPrefixindex::showPrefixChunk(), SpecialAllpages::showToplevel(), SkinMonoBookCBT::sidebar(), ApiResult::size(), specialPagesList(), Parser::splitWhitespace(), Language::sprintfDate(), DatabaseSqlite::strencode(), DatabasePostgres::strencode(), DatabaseOracle::strencode(), DatabaseMssql::strencode(), DatabaseIbm_db2::strencode(), Database::strencode(), LanguageJa::stripForSearch(), SkinMonoBookCBT::subtitle(), SkinCologneBlue::sysLinks(), talkLink(), ImageGallery::toHTML(), SkinNostalgia::topLinks(), topLinks(), Job::toString(), SpecialListUserRestrictionsForm::typeSelector(), CoreParserFunctions::uc(), CoreParserFunctions::ucfirst(), CoreParserFunctions::urlencode(), CoreParserFunctions::urlFunction(), SkinMonoBookCBT::userpage(), PreferencesForm::validateTimeZone(), variantLinks(), Article::view(), SkinMonoBookCBT::watchlist(), watchThisPage(), SpecialRecentChanges::webOutput(), wfAllMessagesMakeHTMLText(), wfGzipHandler(), wfHtmlValidationHandler(), wfMangleFlashPolicy(), wfNumLink(), wfOut(), wfOutputHandler(), wfRFC822Phrase(), wfSpecialLinkSearch(), wfSpecialListusers(), wfSpecialNewimages(), wfSpecialWatchlist(), wfStrencode(), wfUrlencode(), wfVarDump(), wlDaysLink(), wlHoursLink(), and OutputPage::wrapWikiMsg().

END


Generated on Sat Sep 5 02:08:24 2009 for MediaWiki by  doxygen 1.5.9