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, SkinMonoBookCBT, SkinMySkin, and SkinSimple.

List of all members.

Public Member Functions

 initPage (OutputPage $out)
 #@-
 setupSkinUserCss (OutputPage $out)
 Add specific styles for this skin.
 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
 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.

Public Attributes

 $skinname
 #@+
 $stylename
 Stylesheets set to use Sub directory in .
 $template
 For QuickTemplate, the name of the subclass which will actually fill the template.

Private Member Functions

 printOrError ($str)
 Output the string, or print error message if it's an error object of the appropriate type.
 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 651 of file SkinTemplate.php.

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

Referenced by outputPage().

SkinTemplate::buildNavUrls (  ) 

SkinTemplate::buildPersonalUrls (  ) 

SkinTemplate::getNameSpaceKey (  ) 

Generate strings used for xml 'id' names.

Returns:
string
Access:
private

Definition at line 965 of file SkinTemplate.php.

SkinTemplate::initPage ( OutputPage out  ) 

#@-

Setup the base parameters... Child classes should override this to set the name, style subdirectory, and template filler callback.

Parameters:
$out OutputPage

Reimplemented from Skin.

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

Definition at line 99 of file SkinTemplate.php.

Referenced by SkinMonoBookCBT::execute(), and outputPage().

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

Definition at line 636 of file SkinTemplate.php.

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

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

Definition at line 623 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 136 of file SkinTemplate.php.

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

SkinTemplate::printOrError ( str  )  [private]

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

Definition at line 480 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 996 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 111 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 127 of file SkinTemplate.php.

Referenced by outputPage().

SkinTemplate::setupUserJs ( allowUserJs  ) 

Access:
private

Definition at line 972 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

#@+

Access:
private Name of our skin, set in initPage() It probably need to be all lower case.

Reimplemented from Skin.

Definition at line 76 of file SkinTemplate.php.

SkinTemplate::$stylename

Stylesheets set to use Sub directory in .

/skins/ where various stylesheets are located

Definition at line 82 of file SkinTemplate.php.

SkinTemplate::$template


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

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