SkinTemplate Class Reference
[Skins]

Template-filler skin base class Formerly generic PHPTal (http://phptal.sourceforge.net/) skin Based on Brion's smarty skin Copyright © Gabriel Wicke -- http://www.aulinx.de/. More...

Inherits Skin.

Inherited by SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.

List of all members.

Public Member Functions

 setupSkinUserCss (OutputPage $out)
 #@-
 setupTemplate ($classname, $repository=false, $cache_dir=false)
 Create the template engine object; we feed it a bunch of data and eventually it spits out some HTML.
 outputPage (OutputPage $out)
 initialize various variables and generate the template
 printOrError ($str)
 Output the string, or print error message if it's an error object of the appropriate type.
 buildPersonalUrls ()
 build array of urls for personal toolbar
 tabAction ($title, $message, $selected, $query= '', $checkEdit=false)
 makeTalkUrlDetails ($name, $urlaction= '')
 makeArticleUrlDetails ($name, $urlaction= '')
 buildNavUrls ()
 build array of common navigation links
 getNameSpaceKey ()
 Generate strings used for xml 'id' names.
 setupUserJs ($allowUserJs)
 setupPageCss ()
 Code for extensions to hook into to provide per-page CSS, see extensions/PageCSS/PageCSS.php for an implementation of this.
 commonPrintStylesheet ()

Public Attributes

 $skinname = 'monobook'
 #@+
 $stylename = 'monobook'
 Stylesheets set to use.
 $template = 'QuickTemplate'
 For QuickTemplate, the name of the subclass which will actually fill the template.
 $useHeadElement = false
 Whether this skin use OutputPage::headElement() to generate the <head> tag.

Private Member Functions

 buildContentActionUrls ()
 an array of edit links by default used for the tabs


Detailed Description

Template-filler skin base class Formerly generic PHPTal (http://phptal.sourceforge.net/) skin Based on Brion's smarty skin Copyright © Gabriel Wicke -- http://www.aulinx.de/.

Todo:
Needs some serious refactoring into functions that correspond to the computations individual esi snippets need. Most importantly no body parsing for most of those of course.

Definition at line 67 of file SkinTemplate.php.


Member Function Documentation

SkinTemplate::buildContentActionUrls (  )  [private]

an array of edit links by default used for the tabs

Returns:
array

Definition at line 707 of file SkinTemplate.php.

References $action, $code, $n, $section, $wgArticle, $wgContLang, $wgDisableLangConversion, $wgLang, $wgOut, $wgRequest, $wgUser, editUrlOptions(), SpecialPage::getTitleFor(), tabAction(), wfMsg(), wfMsgExt(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by outputPage().

SkinTemplate::buildNavUrls (  ) 

SkinTemplate::buildPersonalUrls (  ) 

SkinTemplate::commonPrintStylesheet (  ) 

Definition at line 1062 of file SkinTemplate.php.

SkinTemplate::getNameSpaceKey (  ) 

Generate strings used for xml 'id' names.

Returns:
string
Access:
private

Definition at line 1024 of file SkinTemplate.php.

SkinTemplate::makeArticleUrlDetails ( name,
urlaction = '' 
)

Definition at line 692 of file SkinTemplate.php.

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

SkinTemplate::makeTalkUrlDetails ( name,
urlaction = '' 
)

Definition at line 679 of file SkinTemplate.php.

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

Referenced by buildPersonalUrls().

SkinTemplate::outputPage ( OutputPage out  ) 

initialize various variables and generate the template

Parameters:
$out OutputPage

Reimplemented from Skin.

Definition at line 128 of file SkinTemplate.php.

References $action, $dbr, $res, $wgArticle, $wgArticlePath, $wgContLang, $wgContLanguageCode, $wgDebugComments, $wgDisableCounters, $wgHideInterlanguageLinks, $wgHtml5Version, $wgJsMimeType, $wgLang, $wgLogo, $wgMaxCredits, $wgMimeType, $wgOutputEncoding, $wgPageShowWatchingUsers, $wgRequest, $wgScript, $wgScriptPath, $wgServer, $wgShowCreditsIfMax, $wgStylePath, $wgUser, $wgUseSiteJs, $wgUseTrackbacks, $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, aboutLink(), OutputPage::addInlineStyle(), afterContentHook(), bottomScripts(), buildContentActionUrls(), OutputPage::buildCssLinks(), buildNavUrls(), buildPersonalUrls(), buildSidebar(), disclaimerLink(), Xml::element(), Sanitizer::escapeClass(), escapeSearchLink(), MWNamespace::exists(), generateDebugHTML(), MWNamespace::getCanonicalName(), getCategories(), getCopyright(), getCopyrightIcon(), Credits::getCredits(), OutputPage::getHeadLinks(), OutputPage::getHTMLTitle(), OutputPage::getLanguageLinks(), getPageClasses(), OutputPage::getPageTitle(), getPoweredBy(), OutputPage::getScript(), Skin::getSkinName(), OutputPage::getSubtitle(), OutputPage::getSyndicationLinks(), OutputPage::getTitle(), SpecialPage::getTitleFor(), getUndeleteLink(), OutputPage::headElement(), Skin::initPage(), OutputPage::isArticle(), OutputPage::isArticleRelated(), OutputPage::isPrintable(), OutputPage::isSyndicated(), OutputPage::isUserJsAllowed(), lastModified(), Linker::link(), logoText(), makeKnownUrlDetails(), makeUrl(), makeUrlDetails(), Title::newFromText(), printOrError(), printSource(), privacyLink(), Skin::setMembers(), OutputPage::setSquidMaxage(), setupPageCss(), setupTemplate(), setupUserCss(), setupUserJs(), showIPinHeader(), subPageSubtitle(), wfArrayToCGI(), wfDebug(), wfGetDB(), wfGetSiteNotice(), wfMsg(), wfMsgExt(), wfMsgHtml(), wfProfileIn(), wfProfileOut(), wfReportTime(), wfRunHooks(), wfUrlencode(), and wfWikiID().

SkinTemplate::printOrError ( str  ) 

Output the string, or print error message if it's an error object of the appropriate type.

For the base class, assume strings all around.

Parameters:
mixed $str
Access:
private

Definition at line 531 of file SkinTemplate.php.

Referenced by outputPage().

SkinTemplate::setupPageCss (  ) 

Code for extensions to hook into to provide per-page CSS, see extensions/PageCSS/PageCSS.php for an implementation of this.

Access:
private

Definition at line 1054 of file SkinTemplate.php.

References $out, wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by outputPage().

SkinTemplate::setupSkinUserCss ( OutputPage out  ) 

#@-

Add specific styles for this skin

Parameters:
$out OutputPage

Reimplemented in SkinChick, SkinModern, SkinMonoBook, and SkinSimple.

Definition at line 103 of file SkinTemplate.php.

References OutputPage::addStyle().

SkinTemplate::setupTemplate ( classname,
repository = false,
cache_dir = false 
)

Create the template engine object; we feed it a bunch of data and eventually it spits out some HTML.

Should have interface roughly equivalent to PHPTAL 0.7.

Parameters:
$callback string (or file)
$repository string: subdirectory where we keep template files
$cache_dir string
Returns:
object
Access:
private

Definition at line 119 of file SkinTemplate.php.

Referenced by outputPage().

SkinTemplate::setupUserJs ( allowUserJs  ) 

Access:
private

Definition at line 1031 of file SkinTemplate.php.

References $action, $wgJsMimeType, $wgRequest, makeUrl(), Skin::userCanPreview(), wfProfileIn(), and wfProfileOut().

Referenced by outputPage().

SkinTemplate::tabAction ( title,
message,
selected,
query = '',
checkEdit = false 
)


Member Data Documentation

SkinTemplate::$skinname = 'monobook'

#@+

Access:
private Name of our skin, it probably needs to be all lower case. Child classes should override the default.

Reimplemented from Skin.

Reimplemented in SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.

Definition at line 76 of file SkinTemplate.php.

SkinTemplate::$stylename = 'monobook'

Stylesheets set to use.

Subdirectory in skins/ where various stylesheets are located. Child classes should override the default.

Reimplemented in SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.

Definition at line 82 of file SkinTemplate.php.

SkinTemplate::$template = 'QuickTemplate'

For QuickTemplate, the name of the subclass which will actually fill the template.

Child classes should override the default.

Reimplemented in SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.

Definition at line 88 of file SkinTemplate.php.

SkinTemplate::$useHeadElement = false

Whether this skin use OutputPage::headElement() to generate the <head> tag.

Reimplemented in SkinChick, SkinModern, SkinMonoBook, SkinMySkin, SkinSimple, and SkinVector.

Definition at line 94 of file SkinTemplate.php.


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

Generated on Sat Apr 30 22:57:49 2011 for MediaWiki by  doxygen 1.5.9