BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SkinTemplate Class Reference
Inheritance diagram for SkinTemplate:
Collaboration diagram for SkinTemplate:

Public Member Functions

 setupSkinUserCss (OutputPage $out)
 getLanguages ()
 outputPage (OutputPage $out=null)
 getPersonalToolsList ()
 useCombinedLoginLink ()
 tabAction ($title, $message, $selected, $query= '', $checkEdit=false)
 makeTalkUrlDetails ($name, $urlaction= '')
 makeArticleUrlDetails ($name, $urlaction= '')
- Public Member Functions inherited from Skin
 getSkinName ()
 initPage (OutputPage $out)
 getDefaultModules ()
 preloadExistence ()
 getRevisionId ()
 isRevisionCurrent ()
 setRelevantTitle ($t)
 getRelevantTitle ()
 setRelevantUser ($u)
 getRelevantUser ()
 outputPage (OutputPage $out=null)
 setupSkinUserCss (OutputPage $out)
 getPageClasses ($title)
 getHtmlElementAttributes ()
 addToBodyAttributes ($out, &$bodyAttrs)
 getLogo ()
 getCategoryLinks ()
 drawCategoryBrowser ($tree)
 getCategories ()
 bottomScripts ()
 printSource ()
 getUndeleteLink ()
 subPageSubtitle ()
 showIPinHeader ()
 getSearchLink ()
 escapeSearchLink ()
 getCopyright ($type= 'detect')
 getCopyrightIcon ()
 getPoweredBy ()
 logoText ($align= '')
 makeFooterIcon ($icon, $withImage= 'withImage')
 mainPageLink ()
 footerLink ($desc, $page)
 privacyLink ()
 aboutLink ()
 disclaimerLink ()
 showEmailUser ($id)
 getSkinStylePath ($name)
 buildSidebar ()
 addToSidebar (&$bar, $message)
 addToSidebarPlain (&$bar, $text)
 getNewtalks ()
 getSiteNotice ()
 doEditSectionLink (Title $nt, $section, $tooltip=null, $lang=false)
 commentBlock ($comment, $title=null, $local=false, $wikiId=null)
 generateRollback ($rev, IContextSource $context=null, $options=[ 'verify'])
 link ($target, $html=null, $customAttribs=[], $query=[], $options=[])
 linkKnown ($target, $html=null, $customAttribs=[], $query=[], $options=[ 'known', 'noclasses'])
 userLink ($userId, $userName, $altUserName=false)
 userToolLinks ($userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
- Public Member Functions inherited from ContextSource
 getContext ()
 setContext (IContextSource $context)
 getConfig ()
 getRequest ()
 getTitle ()
 canUseWikiPage ()
 getWikiPage ()
 getOutput ()
 getUser ()
 getLanguage ()
 getSkin ()
 getTiming ()
 getStats ()
 msg ()
 exportSession ()

Public Attributes

 $skinname = 'monobook'
 $template = 'QuickTemplate'
- Public Attributes inherited from Skin
 $stylename = null

Protected Member Functions

 setupTemplateForOutput ()
 wrapHTML ($title, $html)
 prepareQuickTemplate ()
 buildPersonalUrls ()
 buildContentNavigationUrls ()
 buildNavUrls ()
 getNameSpaceKey ()
- Protected Member Functions inherited from Skin
 afterContentHook ()
 generateDebugHTML ()
 lastModified ()

Additional Inherited Members

- Static Public Member Functions inherited from Skin
static getSkinNames ()
static getSkinNameMessages ()
static getAllowedSkins ()
static normalizeKey ($key)
static makeVariablesScript ($data)
static getDynamicStylesheetQuery ()
static makeMainPageUrl ($urlaction= '')
static makeSpecialUrl ($name, $urlaction= '', $proto=null)
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= '')
static checkTitle (&$title, $name)
- Protected Attributes inherited from Skin
 $skinname = null
 $mRelevantTitle = null
 $mRelevantUser = null

Detailed Description

Base class for template-based skins.

Template-filler skin base class Formerly generic PHPTal ( skin Based on Brion's smarty skin

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.

Member Function Documentation

SkinTemplate::buildContentNavigationUrls ( )

a structured array of links usually used for the tabs in a skin

There are 4 standard sections namespaces: Used for namespace tabs like special, page, and talk namespaces views: Used for primary page views like read, edit, history actions: Used for most extra page actions like deletion, protection, etc... variants: Used to list the language variants for the page

Each section's value is a key/value array of links for that section. The links themselves have these common keys:

  • class: The css classes to apply to the tab
  • text: The text to display on the tab
  • href: The href for the tab to point to
  • rel: An optional rel= for the tab's link
  • redundant: If true the tab will be dropped in skins using content_actions this is useful for tabs like "Read" which only have meaning in skins that take special meaning from the grouped structure of content_navigation

Views also have an extra key which can be used:

  • primary: If this is not true skins like vector may try to hide the tab when the user has limited space in their browser window

content_navigation using code also expects these ids to be present on the links, however these are usually automatically generated by SkinTemplate itself and are not necessary when using a hook. The only things these may matter to are people modifying content_navigation after it's initial creation:

  • id: A "preferred" id, most skins are best off outputting this preferred id for best compatibility.
  • tooltiponly: This is set to true for some tabs in cases where the system believes that the accesskey should not be added to the tab.

The following actions use messages which, if made particular to the any specific skins, would break the Ajax code which makes this action happen entirely inline. OutputPage::getJSVars defines a set of messages in a javascript object - and these messages are assumed to be global for all skins. Without making a change to that procedure these messages will have to remain as the global versions.

SkinTemplate::buildNavUrls ( )

build array of common navigation links

SkinTemplate::buildPersonalUrls ( )

build array of urls for personal toolbar

SkinTemplate::getLanguages ( )

Generates array of language links for the current page

SkinTemplate::getNameSpaceKey ( )

Generate strings used for xml 'id' names

SkinTemplate::getPersonalToolsList ( )

Get the HTML for the p-personal list

SkinTemplate::makeArticleUrlDetails (   $name,
  $urlaction = '' 
is this even used?
SkinTemplate::outputPage ( OutputPage  $out = null)

initialize various variables and generate the template

SkinTemplate::prepareQuickTemplate ( )

initialize various variables and generate the template

QuickTemplate The template to be executed by outputPage
SkinTemplate::setupSkinUserCss ( OutputPage  $out)

Add specific styles for this skin

SkinTemplate::tabAction (   $title,
  $query = '',
  $checkEdit = false 

Builds an array with tab definition

Title$titlePage Where the tab links to
string | array$messageMessage key or an array of message keys (will fall back)
bool$selectedDisplay the tab as selected
string$queryQuery string attached to tab URL
bool$checkEditCheck if $title exists and mark with .new if one doesn't
SkinTemplate::useCombinedLoginLink ( )

Output a boolean indicating if buildPersonalUrls should output separate login and create account links or output a combined link By default we simply return a global config setting that affects most skins This is setup as a method so that like with $wgLogo and getLogo() a skin can override this setting and always output one or the other if it has a reason it can't output one of the two modes.

SkinTemplate::wrapHTML (   $title,

Wrap the body text with language information and identifiable element

string$htmlbody text
string html

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