Go to the documentation of this file.
35 $this->
data[
'namespace_urls'] = $this->
data[
'content_navigation'][
'namespaces'];
36 $this->
data[
'view_urls'] = $this->
data[
'content_navigation'][
'views'];
37 $this->
data[
'action_urls'] = $this->
data[
'content_navigation'][
'actions'];
38 $this->
data[
'variant_urls'] = $this->
data[
'content_navigation'][
'variants'];
41 if ( $this->config->get(
'VectorUseIconWatch' ) ) {
42 $mode = $this->
getSkin()->getUser()->isWatched( $this->
getSkin()->getRelevantTitle() )
46 if ( isset( $this->
data[
'action_urls'][$mode] ) ) {
47 $this->
data[
'view_urls'][$mode] = $this->
data[
'action_urls'][$mode];
48 unset( $this->
data[
'action_urls'][$mode] );
59 'html-headelement' => $this->
get(
'headelement',
'' ),
60 'html-sitenotice' => $this->
get(
'sitenotice',
null ),
62 'page-langcode' => $this->
getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode(),
63 'page-isarticle' => (bool)$this->
data[
'isarticle'],
67 'html-title' => $this->
get(
'title',
'' ),
69 'html-prebodyhtml' => $this->
get(
'prebodyhtml',
'' ),
70 'msg-tagline' => $this->
getMsg(
'tagline' )->text(),
72 'html-userlangattributes' => $this->
get(
'userlangattributes',
'' ),
74 'html-subtitle' => $this->
get(
'subtitle',
'' ),
78 'html-undelete' => $this->
get(
'undelete',
null ) ?:
null,
81 'html-newtalk' => $this->
get(
'newtalk',
'' ) ?:
null,
83 'msg-jumptonavigation' => $this->
getMsg(
'vector-jumptonavigation' )->text(),
84 'msg-jumptosearch' => $this->
getMsg(
'vector-jumptosearch' )->text(),
87 'html-bodycontent' => $this->
get(
'bodycontent' ),
89 'html-printfooter' => $this->
get(
'printfooter',
null ),
90 'html-catlinks' => $this->
get(
'catlinks',
'' ),
91 'html-dataAfterContent' => $this->
get(
'dataAfterContent',
'' ),
93 'html-debuglog' => $this->
get(
'debughtml',
'' ),
95 'html-printtail' => $this->
getTrail(),
101 <
div id=
"mw-navigation">
102 <h2><?
php $this->
msg(
'navigation-heading' ) ?></h2>
105 <div
id=
"left-navigation">
108 <
div id=
"right-navigation">
113 <
div id=
"p-logo" role=
"banner"><
a class=
"mw-wiki-logo" href=
"<?php
114 echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] )
122 <
div id=
"footer" role=
"contentinfo"<?
php $this->
html(
'userlangattributes' ) ?>>
126 <ul
id=
"footer-<?php echo $category ?>">
130 <li
id=
"footer-<?php echo $category ?>-<?php echo $link ?>"><?
php $this->
html( $link ) ?></li>
139 if (
count( $footericons ) > 0 ) {
141 <ul
id=
"footer-icons" class=
"noprint">
145 <li
id=
"footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
147 foreach ( $footerIcons
as $icon ) {
148 echo $this->
getSkin()->makeFooterIcon( $icon );
177 if ( !isset( $portals[
'TOOLBOX'] ) ) {
178 $portals[
'TOOLBOX'] =
true;
180 if ( !isset( $portals[
'LANGUAGES'] ) ) {
181 $portals[
'LANGUAGES'] =
true;
200 if ( $this->
data[
'language_urls'] !==
false ) {
201 $this->
renderPortal(
'lang', $this->
data[
'language_urls'],
'otherlanguages' );
218 if ( $msg ===
null ) {
221 $msgObj = $this->
getMsg( $msg );
222 $labelId = Sanitizer::escapeIdForAttribute(
"p-$name-label" );
224 <
div class=
"portal" role=
"navigation" id=
"<?php
225 echo htmlspecialchars( Sanitizer::escapeIdForAttribute( "p-
$name" ) )
228 ?> aria-labelledby=
"<?php echo htmlspecialchars( $labelId ) ?>">
229 <h3<?
php $this->
html(
'userlangattributes' ) ?>
id=
"<?php echo htmlspecialchars( $labelId )
231 echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg );
242 if ( $hook !==
null ) {
270 foreach ( $elements
as $name => $element ) {
271 switch ( $element ) {
274 <
div id=
"p-namespaces" role=
"navigation" class=
"vectorTabs<?php
275 if ( count( $this->data['namespace_urls'] ) == 0 ) {
276 echo ' emptyPortlet';
278 ?>" aria-labelledby=
"p-namespaces-label">
279 <h3
id=
"p-namespaces-label"><?
php $this->
msg(
'namespaces' ) ?></h3>
280 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
282 foreach ( $this->
data[
'namespace_urls']
as $key => $item ) {
284 'vector-wrap' =>
true,
294 <
div id=
"p-variants" role=
"navigation" class=
"vectorMenu<?php
295 if ( count( $this->data['variant_urls'] ) == 0 ) {
296 echo ' emptyPortlet';
298 ?>" aria-labelledby=
"p-variants-label">
302 foreach ( $this->
data[
'variant_urls']
as $item ) {
303 if ( isset( $item[
'class'] ) && stripos( $item[
'class'],
'selected' ) !==
false ) {
309 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-variants-label" />
310 <h3
id=
"p-variants-label">
315 foreach ( $this->
data[
'variant_urls']
as $key => $item ) {
325 <
div id=
"p-views" role=
"navigation" class=
"vectorTabs<?php
326 if ( count( $this->data['view_urls'] ) == 0 ) {
327 echo ' emptyPortlet';
329 ?>" aria-labelledby=
"p-views-label">
330 <h3
id=
"p-views-label"><?
php $this->
msg(
'views' ) ?></h3>
331 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
333 foreach ( $this->
data[
'view_urls']
as $key => $item ) {
335 'vector-wrap' =>
true,
336 'vector-collapsible' =>
true,
346 <
div id=
"p-cactions" role=
"navigation" class=
"vectorMenu<?php
347 if ( count( $this->data['action_urls'] ) == 0 ) {
348 echo ' emptyPortlet';
350 ?>" aria-labelledby=
"p-cactions-label">
351 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-cactions-label" />
352 <h3
id=
"p-cactions-label"><span><?
php
353 $this->
msg(
'vector-more-actions' )
355 <ul
class=
"menu"<?
php $this->
html(
'userlangattributes' ) ?>>
357 foreach ( $this->
data[
'action_urls']
as $key => $item ) {
367 <
div id=
"p-personal" role=
"navigation"<?
php
368 if (
count( $this->
data[
'personal_urls'] ) == 0 ) {
369 echo
' class="emptyPortlet"';
371 ?> aria-labelledby=
"p-personal-label">
372 <h3
id=
"p-personal-label"><?
php $this->
msg(
'personaltools' ) ?></h3>
373 <ul<?
php $this->
html(
'userlangattributes' ) ?>>
377 if ( !$this->
getSkin()->getUser()->isLoggedIn() &&
382 [
'id' =>
'pt-anonuserpage' ],
407 <
div id=
"p-search" role=
"search">
408 <h3<?
php $this->
html(
'userlangattributes' ) ?>>
409 <label
for=
"searchInput"><?
php $this->
msg(
'search' ) ?></label>
411 <
form action=
"<?php $this->text( 'wgScript' ) ?>" id=
"searchform">
412 <
div<?
php echo $this->config->get(
'VectorUseSimpleSearch' ) ?
' id="simpleSearch"' :
'' ?>>
415 echo Html::hidden(
'title', $this->
get(
'searchtitle' ) );
430 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton mw-fallbackSearchButton' ]
434 [
'id' =>
'searchButton',
'class' =>
'searchButton' ]
454 $html = Html::rawElement(
'span', [],
$html );
465 $this->config->get(
'VectorUseIconWatch' )
466 && ( $key ===
'watch' || $key ===
'unwatch' )
468 $item[
'class'] = rtrim(
'icon ' . $item[
'class'],
' ' );
469 $item[
'primary'] =
true;
474 isset(
$options[
'vector-collapsible'] ) &&
$options[
'vector-collapsible'] ) {
475 $item[
'class'] = rtrim(
'collapsible ' . $item[
'class'],
' ' );
479 unset( $item[
'redundant'] );
481 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 HTML page.
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
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
Allows to change the fields on the form that will be generated $name
if(count( $footericons) > 0) foreach( $footerIcons as $icon) $params['html-unported']
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
getTrail()
Get the basic end-page trail including bottomscripts, reporttime, and debug stuff.
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
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')