Go to the documentation of this file.
39 $this->
html(
'headelement' );
40 ?><div
id=
"globalWrapper">
41 <div
id=
"column-content">
42 <div
id=
"content" class=
"mw-body" role=
"main">
45 if ( $this->
data[
'sitenotice'] ) {
47 <div
id=
"siteNotice" class=
"mw-body-content"><?
php
48 $this->
html(
'sitenotice' )
56 if ( $this->
data[
'title'] !=
'' ) {
58 <h1
id=
"firstHeading" class=
"firstHeading" lang=
"<?php
59 $this->data['pageLanguage'] =
60 $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
61 $this->text( 'pageLanguage' );
62 ?>"><?
php $this->
html(
'title' ) ?></h1>
67 <div
id=
"bodyContent" class=
"mw-body-content">
68 <div
id=
"siteSub"><?
php $this->
msg(
'tagline' ) ?></div>
69 <div
id=
"contentSub"<?
php
70 $this->
html(
'userlangattributes' ) ?>><?
php $this->
html(
'subtitle' )
72 <?
php if ( $this->
data[
'undelete'] ) { ?>
73 <div
id=
"contentSub2"><?
php $this->
html(
'undelete' ) ?></div>
77 if ( $this->
data[
'newtalk'] ) {
79 <div
class=
"usermessage"><?
php $this->
html(
'newtalk' ) ?></div>
83 <div
id=
"jump-to-nav" class=
"mw-jump"><?
php
84 $this->
msg(
'jumpto' )
85 ?> <
a href=
"#column-one"><?
php
86 $this->
msg(
'jumptonavigation' )
88 $this->
msg(
'comma-separator' )
89 ?><
a href=
"#searchInput"><?
php
90 $this->
msg(
'jumptosearch' )
94 <?
php $this->
html(
'bodytext' ) ?>
96 if ( $this->
data[
'catlinks'] ) {
97 $this->
html(
'catlinks' );
102 if ( $this->
data[
'dataAfterContent'] ) {
103 $this->
html(
'dataAfterContent' );
106 <div
class=
"visualClear"></div>
111 <div
id=
"column-one"<?
php $this->
html(
'userlangattributes' ) ?>>
112 <h2><?
php $this->
msg(
'navigation-heading' ) ?></h2>
114 <div
class=
"portlet" id=
"p-personal" role=
"navigation">
115 <h3><?
php $this->
msg(
'personaltools' ) ?></h3>
118 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
127 if ( !$this->
getSkin()->getUser()->isLoggedIn() &&
131 'id' =>
'pt-anonuserpage'
132 ], $this->
getMsg(
'notloggedin' )->escaped() );
144 <div
class=
"portlet" id=
"p-logo" role=
"banner">
147 'href' => $this->
data[
'nav_urls'][
'mainpage'][
'href'],
148 'class' =>
'mw-wiki-logo',
157 </div><!-- end
of the left (
by default at least) column -->
158 <div
class=
"visualClear"></div>
166 <div
id=
"footer" role=
"contentinfo"<?
php $this->
html(
'userlangattributes' ) ?>>
168 $footerEnd =
'</div>';
175 <div
id=
"f-<?php echo htmlspecialchars( $blockName ); ?>ico">
176 <?
php foreach ( $footerIcons
as $icon ) { ?>
177 <?
php echo $this->
getSkin()->makeFooterIcon( $icon ); ?>
192 <li
id=
"<?php echo $aLink ?>"><?
php $this->
html( $aLink ) ?></li>
215 if ( !isset( $sidebar[
'SEARCH'] ) ) {
216 $sidebar[
'SEARCH'] =
true;
218 if ( !isset( $sidebar[
'TOOLBOX'] ) ) {
219 $sidebar[
'TOOLBOX'] =
true;
221 if ( !isset( $sidebar[
'LANGUAGES'] ) ) {
222 $sidebar[
'LANGUAGES'] =
true;
225 foreach ( $sidebar
as $boxName => $content ) {
226 if ( $content ===
false ) {
231 $boxName = (
string)$boxName;
233 if ( $boxName ==
'SEARCH' ) {
235 } elseif ( $boxName ==
'TOOLBOX' ) {
237 } elseif ( $boxName ==
'LANGUAGES' ) {
247 <div
id=
"p-search" class=
"portlet" role=
"search">
248 <h3><label
for=
"searchInput"><?
php $this->
msg(
'search' ) ?></label></h3>
250 <div
id=
"searchBody" class=
"pBody">
251 <
form action=
"<?php $this->text( 'wgScript' ) ?>" id=
"searchform">
252 <input
type=
"hidden" name=
"title" value=
"<?php $this->text( 'searchtitle' ) ?>"/>
258 [
'id' =>
'searchGoButton',
'class' =>
'searchButton' ]
261 if ( $this->config->get(
'UseTwoButtonsSearchForm' ) ) {
265 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton' ]
271 $this->text( 'searchaction' )
272 ?>" rel=
"search"><?
php $this->
msg(
'powersearch-legend' ) ?></
a></div><?
php
289 <div
id=
"p-cactions" class=
"portlet" role=
"navigation">
290 <h3><?
php $this->
msg(
'views' ) ?></h3>
294 foreach ( $this->
data[
'content_actions']
as $key => $tab ) {
308 <div
class=
"portlet" id=
"p-tb" role=
"navigation">
309 <h3><?
php $this->
msg(
'toolbox' ) ?></h3>
334 if ( $this->
data[
'language_urls'] !==
false ) {
336 <div
id=
"p-lang" class=
"portlet" role=
"navigation">
337 <h3<?
php $this->
html(
'userlangattributes' ) ?>><?
php $this->
msg(
'otherlanguages' ) ?></h3>
341 <?
php foreach ( $this->
data[
'language_urls']
as $key => $langLink ) { ?>
362 'class' =>
'generated-sidebar portlet',
363 'id' => Sanitizer::escapeId(
"p-$bar" ),
364 'role' =>
'navigation'
368 if ( $tooltip !==
false ) {
369 $portletAttribs[
'title'] = $tooltip;
375 <h3><?
php echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $bar ); ?></h3>
378 if ( is_array( $cont ) ) {
382 foreach ( $cont
as $key => $val ) {
392 # allow raw HTML block to be defined by extensions
getPersonalTools()
Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate.
getFooterLinks( $option=null)
Returns an array of footerlinks trimmed down to only those footer links that are valid.
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
per default it will return the text for text based content
makeSearchButton( $mode, $attrs=[])
execute()
Template filter callback for MonoBook skin.
static groupHasPermission( $group, $role)
Check, if the given group has the given permission.
getSkin()
Get the Skin object related to this object.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static closeElement( $element)
Returns "</$element>".
</source > ! result< div class="mw-highlight mw-content-ltr" dir="ltr">< pre >< span ></span >< span class="kd"> var</span >< span class="nx"> a</span >< span class="p"></span ></pre ></div > ! end ! test Multiline< source/> in lists !input *< source > a b</source > *foo< source > a b</source > ! html< ul >< li >< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul >< ul >< li > foo< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul > ! html tidy< ul >< li >< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul >< ul >< li > foo< div class="mw-highlight mw-content-ltr" dir="ltr">< pre > a b</pre ></div ></li ></ul > ! end ! test Custom attributes !input< source lang="javascript" id="foo" class="bar" dir="rtl" style="font-size: larger;"> var a
printTrail()
Output getTrail.
makeListItem( $key, $item, $options=[])
Generates a list item for a navigation, portlet, portal, sidebar...
null means default in associative array form
getIndicators()
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed i...
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable or merely the Work and Derivative Works thereof Contribution shall mean any work of including the original version of the Work and any modifications or additions to that Work or Derivative Works that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner For the purposes of this submitted means any form of or written communication sent to the Licensor or its including but not limited to communication on electronic mailing source code control and issue tracking systems that are managed by
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string
renderAfterPortlet( $name)
$this msg('personaltools') $this html('userlangattributes') $personalTools
getMsg( $name)
Get a Message object with its context set.
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
makeSearchInput( $attrs=[])
foreach( $validFooterIcons as $blockName=> $footerIcons) foreach( $footerIcons as $icon) if(count( $validFooterLinks) > 0) $this html( $aLink)
cactions()
Prints the content actions (cactions) bar.
static titleAttrib( $name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
getToolbox()
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static openElement( $element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned $skin
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
getFooterIcons( $option=null)
Returns an array of footer icons filtered down by options relevant to how the skin wishes to display ...
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
New base template for a skin's template extended from QuickTemplate this class features helper method...
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data