Go to the documentation of this file.
36 $this->
data[
'namespace_urls'] = $this->
data[
'content_navigation'][
'namespaces'];
37 $this->
data[
'view_urls'] = $this->
data[
'content_navigation'][
'views'];
38 $this->
data[
'action_urls'] = $this->
data[
'content_navigation'][
'actions'];
39 $this->
data[
'variant_urls'] = $this->
data[
'content_navigation'][
'variants'];
42 if ( $this->config->get(
'VectorUseIconWatch' ) ) {
43 $mode = $this->
getSkin()->getUser()->isWatched( $this->
getSkin()->getRelevantTitle() )
47 if ( isset( $this->
data[
'action_urls'][$mode] ) ) {
48 $this->
data[
'view_urls'][$mode] = $this->
data[
'action_urls'][$mode];
49 unset( $this->
data[
'action_urls'][$mode] );
52 $this->
data[
'pageLanguage'] =
53 $this->
getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
56 $this->
html(
'headelement' );
58 <div
id=
"mw-page-base" class=
"noprint"></
div>
59 <
div id=
"mw-head-base" class=
"noprint"></
div>
60 <
div id=
"content" class=
"mw-body" role=
"main">
63 if ( $this->
data[
'sitenotice'] ) {
67 'class' =>
'mw-body-content',
70 $this->
get(
'sitenotice' )
73 if ( is_callable( [ $this,
'getIndicators' ] ) ) {
77 if ( $this->
data[
'title'] !=
'' ) {
80 'id' =>
'firstHeading',
81 'class' =>
'firstHeading',
82 'lang' => $this->
get(
'pageLanguage' ),
89 $this->
html(
'prebodyhtml' );
91 <div
id=
"bodyContent" class=
"mw-body-content">
93 if ( $this->
data[
'isarticle'] ) {
103 <div
id=
"contentSub"<?
php $this->
html(
'userlangattributes' ) ?>><?php
104 $this->
html(
'subtitle' )
107 if ( $this->
data[
'undelete'] ) {
109 [
'id' =>
'contentSub2' ],
111 $this->
get(
'undelete' )
114 if ( $this->
data[
'newtalk'] ) {
116 [
'class' =>
'usermessage' ],
118 $this->
get(
'newtalk' )
125 <
a class=
"mw-jump-link" href=
"#mw-head"><?
php $this->
msg(
'vector-jumptonavigation' ) ?></a>
126 <
a class=
"mw-jump-link" href=
"#p-search"><?
php $this->
msg(
'vector-jumptosearch' ) ?></a>
128 $this->
html(
'bodycontent' );
130 if ( $this->
data[
'printfooter'] ) {
132 <div
class=
"printfooter">
133 <?
php $this->
html(
'printfooter' ); ?>
138 if ( $this->
data[
'catlinks'] ) {
139 $this->
html(
'catlinks' );
142 if ( $this->
data[
'dataAfterContent'] ) {
143 $this->
html(
'dataAfterContent' );
146 <div
class=
"visualClear"></
div>
147 <?
php $this->
html(
'debughtml' ); ?>
150 <
div id=
"mw-navigation">
151 <h2><?
php $this->
msg(
'navigation-heading' ) ?></h2>
154 <div
id=
"left-navigation">
157 <
div id=
"right-navigation">
162 <
div id=
"p-logo" role=
"banner"><
a class=
"mw-wiki-logo" href=
"<?php
163 echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] )
171 <
div id=
"footer" role=
"contentinfo"<?
php $this->
html(
'userlangattributes' ) ?>>
175 <ul
id=
"footer-<?php echo $category ?>">
179 <li
id=
"footer-<?php echo $category ?>-<?php echo $link ?>"><?
php $this->
html( $link ) ?></li>
188 if (
count( $footericons ) > 0 ) {
190 <ul
id=
"footer-icons" class=
"noprint">
194 <li
id=
"footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
196 foreach ( $footerIcons
as $icon ) {
197 echo $this->
getSkin()->makeFooterIcon( $icon );
224 if ( !isset( $portals[
'TOOLBOX'] ) ) {
225 $portals[
'TOOLBOX'] =
true;
227 if ( !isset( $portals[
'LANGUAGES'] ) ) {
228 $portals[
'LANGUAGES'] =
true;
247 if ( $this->
data[
'language_urls'] !==
false ) {
248 $this->
renderPortal(
'lang', $this->
data[
'language_urls'],
'otherlanguages' );
265 if ( $msg ===
null ) {
268 $msgObj = $this->
getMsg( $msg );
269 $labelId = Sanitizer::escapeIdForAttribute(
"p-$name-label" );
271 <
div class=
"portal" role=
"navigation" id=
"<?php
272 echo htmlspecialchars( Sanitizer::escapeIdForAttribute( "p-
$name" ) )
275 ?> aria-labelledby=
"<?php echo htmlspecialchars( $labelId ) ?>">
276 <h3<?
php $this->
html(
'userlangattributes' ) ?>
id=
"<?php echo htmlspecialchars( $labelId )
278 echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg );
289 if ( $hook !==
null ) {
317 foreach ( $elements
as $name => $element ) {
318 switch ( $element ) {
321 <
div id=
"p-namespaces" role=
"navigation" class=
"vectorTabs<?php
322 if ( count( $this->data['namespace_urls'] ) == 0 ) {
323 echo ' emptyPortlet';
325 ?>" aria-labelledby=
"p-namespaces-label">
326 <h3
id=
"p-namespaces-label"><?
php $this->
msg(
'namespaces' ) ?></h3>
327 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
329 foreach ( $this->
data[
'namespace_urls']
as $key => $item ) {
331 'vector-wrap' =>
true,
341 <
div id=
"p-variants" role=
"navigation" class=
"vectorMenu<?php
342 if ( count( $this->data['variant_urls'] ) == 0 ) {
343 echo ' emptyPortlet';
345 ?>" aria-labelledby=
"p-variants-label">
349 foreach ( $this->
data[
'variant_urls']
as $item ) {
350 if ( isset( $item[
'class'] ) && stripos( $item[
'class'],
'selected' ) !==
false ) {
356 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-variants-label" />
357 <h3
id=
"p-variants-label">
363 foreach ( $this->
data[
'variant_urls']
as $key => $item ) {
374 <
div id=
"p-views" role=
"navigation" class=
"vectorTabs<?php
375 if ( count( $this->data['view_urls'] ) == 0 ) {
376 echo ' emptyPortlet';
378 ?>" aria-labelledby=
"p-views-label">
379 <h3
id=
"p-views-label"><?
php $this->
msg(
'views' ) ?></h3>
380 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
382 foreach ( $this->
data[
'view_urls']
as $key => $item ) {
384 'vector-wrap' =>
true,
385 'vector-collapsible' =>
true,
395 <
div id=
"p-cactions" role=
"navigation" class=
"vectorMenu<?php
396 if ( count( $this->data['action_urls'] ) == 0 ) {
397 echo ' emptyPortlet';
399 ?>" aria-labelledby=
"p-cactions-label">
400 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-cactions-label" />
401 <h3
id=
"p-cactions-label"><span><?
php
402 $this->
msg(
'vector-more-actions' )
405 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
407 foreach ( $this->
data[
'action_urls']
as $key => $item ) {
418 <
div id=
"p-personal" role=
"navigation" class=
"<?php
419 if ( count( $this->data['personal_urls'] ) == 0 ) {
420 echo ' emptyPortlet';
422 ?>" aria-labelledby=
"p-personal-label">
423 <h3
id=
"p-personal-label"><?
php $this->
msg(
'personaltools' ) ?></h3>
424 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
428 if ( !$this->
getSkin()->getUser()->isLoggedIn() &&
433 [
'id' =>
'pt-anonuserpage' ],
458 <
div id=
"p-search" role=
"search">
459 <h3<?
php $this->
html(
'userlangattributes' ) ?>>
460 <label
for=
"searchInput"><?
php $this->
msg(
'search' ) ?></label>
462 <
form action=
"<?php $this->text( 'wgScript' ) ?>" id=
"searchform">
463 <
div<?
php echo $this->config->get(
'VectorUseSimpleSearch' ) ?
' id="simpleSearch"' :
'' ?>>
481 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton mw-fallbackSearchButton' ]
485 [
'id' =>
'searchButton',
'class' =>
'searchButton' ]
516 $this->config->get(
'VectorUseIconWatch' )
517 && ( $key ===
'watch' || $key ===
'unwatch' )
519 $item[
'class'] = rtrim(
'icon ' . $item[
'class'],
' ' );
520 $item[
'primary'] =
true;
525 isset(
$options[
'vector-collapsible'] ) &&
$options[
'vector-collapsible'] ) {
526 $item[
'class'] = rtrim(
'collapsible ' . $item[
'class'],
' ' );
530 unset( $item[
'redundant'] );
532 return parent::makeListItem( $key, $item,
$options );
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.
static expandAttributes( $attribs)
Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : att...
case __pad3__ if(count( $this->data['personal_urls'])==0) $this msg('personaltools') $this html('userlangattributes') $notLoggedIn
makeSearchButton( $mode, $attrs=[])
renderNavigation(array $elements)
Render one or more navigations elements by name, automatically reversed by css when UI is in RTL mode...
</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
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
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 tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
QuickTemplate subclass for Vector.
makeListItem( $key, $item, $options=[])
@inheritDoc
$this html('userlangattributes') foreach( $this->getFooterLinks() as $category=> $links) foreach( $links as $link) $this html($link) $footericons
makeLink( $key, $item, $options=[])
@inheritDoc
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 and may include noclasses & $html
execute()
Outputs the entire contents of the (X)HTML page.
printTrail()
Output getTrail.
null means default in associative array form
renderPortal( $name, $content, $msg=null, $hook=null)
getIndicators()
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed i...
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
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
Allows to change the fields on the form that will be generated $name
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
renderAfterPortlet( $name)
getMsg( $name)
Get a Message object with its context set.
makeSearchInput( $attrs=[])
renderPortals(array $portals)
Render a series of portals.
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
getToolbox()
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
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 & $options
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 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
usually copyright or history_copyright This message must be in HTML not wikitext & $link
if(! $this->getSkin() ->getUser() ->isLoggedIn() &&User::groupHasPermission(' *', 'edit') $personalTools)
case __pad0__ if(count( $this->data['variant_urls'])==0) $variantLabel
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.
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
New base template for a skin's template extended from QuickTemplate this class features helper method...
$this html( 'userlangattributes')
case __pad4__ $this html('userlangattributes') $this msg('search') $this text( 'wgScript')