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'] ) {
64 echo Html::rawElement(
'div',
67 'class' =>
'mw-body-content',
70 $this->
get(
'sitenotice' )
73 if ( is_callable( [ $this,
'getIndicators' ] ) ) {
77 if ( $this->data[
'title'] !=
'' ) {
78 echo Html::rawElement(
'h1',
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'] ) {
94 echo Html::element(
'div',
103 <
div id=
"contentSub"<?php $this->
html(
'userlangattributes' ) ?>><?php
104 $this->
html(
'subtitle' )
107 if ( $this->data[
'undelete'] ) {
108 echo Html::rawElement(
'div',
109 [
'id' =>
'contentSub2' ],
111 $this->
get(
'undelete' )
114 if ( $this->data[
'newtalk'] ) {
115 echo Html::rawElement(
'div',
116 [
'class' =>
'usermessage' ],
118 $this->
get(
'newtalk' )
122 <
div id=
"jump-to-nav" class=
"mw-jump">
123 <?php $this->
msg(
'jumpto' ) ?>
124 <a
href=
"#mw-head"><?php
125 $this->
msg(
'jumptonavigation' )
126 ?></a><?php $this->
msg(
'comma-separator' ) ?>
127 <a
href=
"#p-search"><?php $this->
msg(
'jumptosearch' ) ?></a>
130 $this->
html(
'bodycontent' );
132 if ( $this->data[
'printfooter'] ) {
134 <
div class=
"printfooter">
135 <?php $this->
html(
'printfooter' ); ?>
140 if ( $this->data[
'catlinks'] ) {
141 $this->
html(
'catlinks' );
144 if ( $this->data[
'dataAfterContent'] ) {
145 $this->
html(
'dataAfterContent' );
148 <
div class=
"visualClear"></
div>
149 <?php $this->
html(
'debughtml' ); ?>
152 <
div id=
"mw-navigation">
153 <h2><?php $this->
msg(
'navigation-heading' ) ?></h2>
156 <
div id=
"left-navigation">
159 <
div id=
"right-navigation">
164 <
div id=
"p-logo" role=
"banner"><a
class=
"mw-wiki-logo" href=
"<?php
165 echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] )
172 <?php Hooks::run(
'VectorBeforeFooter' ); ?>
173 <
div id=
"footer" role=
"contentinfo"<?php $this->
html(
'userlangattributes' ) ?>>
177 <ul
id=
"footer-<?php echo $category ?>">
179 foreach ( $links as
$link ) {
181 <li
id=
"footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->
html( $link ) ?></li>
190 if ( count( $footericons ) > 0 ) {
192 <ul
id=
"footer-icons" class=
"noprint">
194 foreach ( $footericons as $blockName => $footerIcons ) {
196 <li
id=
"footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
198 foreach ( $footerIcons as $icon ) {
199 echo $this->
getSkin()->makeFooterIcon( $icon );
226 if ( !isset( $portals[
'TOOLBOX'] ) ) {
227 $portals[
'TOOLBOX'] =
true;
229 if ( !isset( $portals[
'LANGUAGES'] ) ) {
230 $portals[
'LANGUAGES'] =
true;
233 foreach ( $portals as $name => $content ) {
234 if ( $content ===
false ) {
246 Hooks::run(
'VectorAfterToolbox' );
249 if ( $this->data[
'language_urls'] !==
false ) {
250 $this->
renderPortal(
'lang', $this->data[
'language_urls'],
'otherlanguages' );
266 protected function renderPortal( $name, $content, $msg =
null, $hook =
null ) {
267 if ( $msg ===
null ) {
271 $labelId = Sanitizer::escapeIdForAttribute(
"p-$name-label" );
273 <
div class=
"portal" role=
"navigation" id=
"<?php
274 echo htmlspecialchars( Sanitizer::escapeIdForAttribute( "p-$name
" ) )
277 ?> aria-labelledby=
"<?php echo htmlspecialchars( $labelId ) ?>">
278 <h3<?php $this->
html(
'userlangattributes' ) ?>
id=
"<?php echo htmlspecialchars( $labelId )
280 echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg );
284 if ( is_array( $content ) ) {
288 foreach ( $content as $key => $val ) {
291 if ( $hook !==
null ) {
294 Hooks::run( $hook, [ &$skin,
true ] );
319 foreach ( $elements as $name => $element ) {
320 switch ( $element ) {
323 <
div id=
"p-namespaces" role=
"navigation" class=
"vectorTabs<?php
324 if ( count( $this->data['namespace_urls'] ) == 0 ) {
325 echo ' emptyPortlet';
327 ?>" aria-labelledby=
"p-namespaces-label">
328 <h3
id=
"p-namespaces-label"><?php $this->
msg(
'namespaces' ) ?></h3>
329 <ul<?php $this->
html(
'userlangattributes' ) ?>>
331 foreach ( $this->data[
'namespace_urls'] as $key => $item ) {
333 'vector-wrap' =>
true,
343 <
div id=
"p-variants" role=
"navigation" class=
"vectorMenu<?php
344 if ( count( $this->data['variant_urls'] ) == 0 ) {
345 echo ' emptyPortlet';
347 ?>" aria-labelledby=
"p-variants-label">
350 $variantLabel = $this->
getMsg(
'variants' )->text();
351 foreach ( $this->data[
'variant_urls'] as $item ) {
352 if ( isset( $item[
'class'] ) && stripos( $item[
'class'],
'selected' ) !==
false ) {
353 $variantLabel = $item[
'text'];
358 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-variants-label" />
359 <h3
id=
"p-variants-label">
360 <span><?php echo htmlspecialchars( $variantLabel ) ?></span>
365 foreach ( $this->data[
'variant_urls'] as $key => $item ) {
376 <
div id=
"p-views" role=
"navigation" class=
"vectorTabs<?php
377 if ( count( $this->data['view_urls'] ) == 0 ) {
378 echo ' emptyPortlet';
380 ?>" aria-labelledby=
"p-views-label">
381 <h3
id=
"p-views-label"><?php $this->
msg(
'views' ) ?></h3>
382 <ul<?php $this->
html(
'userlangattributes' ) ?>>
384 foreach ( $this->data[
'view_urls'] as $key => $item ) {
386 'vector-wrap' =>
true,
387 'vector-collapsible' =>
true,
397 <
div id=
"p-cactions" role=
"navigation" class=
"vectorMenu<?php
398 if ( count( $this->data['action_urls'] ) == 0 ) {
399 echo ' emptyPortlet';
401 ?>" aria-labelledby=
"p-cactions-label">
402 <input
type=
"checkbox" class=
"vectorMenuCheckbox" aria-labelledby=
"p-cactions-label" />
403 <h3
id=
"p-cactions-label"><span><?php
404 $this->
msg(
'vector-more-actions' )
407 <ul<?php $this->
html(
'userlangattributes' ) ?>>
409 foreach ( $this->data[
'action_urls'] as $key => $item ) {
420 <
div id=
"p-personal" role=
"navigation" class=
"<?php
421 if ( count( $this->data['personal_urls'] ) == 0 ) {
422 echo ' emptyPortlet';
424 ?>" aria-labelledby=
"p-personal-label">
425 <h3
id=
"p-personal-label"><?php $this->
msg(
'personaltools' ) ?></h3>
426 <ul<?php $this->
html(
'userlangattributes' ) ?>>
430 if ( !$this->
getSkin()->getUser()->isLoggedIn() &&
434 Html::rawElement(
'li',
435 [
'id' =>
'pt-anonuserpage' ],
436 $this->
getMsg(
'notloggedin' )->escaped()
443 if ( array_key_exists(
'uls', $personalTools ) ) {
444 $langSelector = $this->
makeListItem(
'uls', $personalTools[
'uls' ] );
445 unset( $personalTools[
'uls' ] );
450 foreach ( $personalTools as $key => $item ) {
460 <
div id=
"p-search" role=
"search">
461 <h3<?php $this->
html(
'userlangattributes' ) ?>>
462 <label
for=
"searchInput"><?php $this->
msg(
'search' ) ?></label>
464 <
form action=
"<?php $this->text( 'wgScript' ) ?>" id=
"searchform">
465 <
div<?php echo $this->config->get(
'VectorUseSimpleSearch' ) ?
' id="simpleSearch"' :
'' ?>>
468 echo Html::hidden(
'title', $this->
get(
'searchtitle' ) );
483 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton mw-fallbackSearchButton' ]
487 [
'id' =>
'searchButton',
'class' =>
'searchButton' ]
507 $html = Html::rawElement(
'span', [],
$html );
518 $this->config->get(
'VectorUseIconWatch' )
519 && ( $key ===
'watch' || $key ===
'unwatch' )
521 $item[
'class'] = rtrim(
'icon ' . $item[
'class'],
' ' );
522 $item[
'primary'] =
true;
527 isset(
$options[
'vector-collapsible'] ) &&
$options[
'vector-collapsible'] ) {
528 $item[
'class'] = rtrim(
'collapsible ' . $item[
'class'],
' ' );
532 unset( $item[
'redundant'] );
534 return parent::makeListItem( $key, $item,
$options );
New base template for a skin's template extended from QuickTemplate this class features helper method...
getFooterLinks( $option=null)
Returns an array of footerlinks trimmed down to only those footer links that are valid.
makeSearchButton( $mode, $attrs=[])
renderAfterPortlet( $name)
getToolbox()
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
printTrail()
Output getTrail.
getPersonalTools()
Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate.
getFooterIcons( $option=null)
Returns an array of footer icons filtered down by options relevant to how the skin wishes to display ...
getMsg( $name)
Get a Message object with its context set.
getIndicators()
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed i...
makeSearchInput( $attrs=[])
static tooltip( $name, $options=null)
Returns raw bits of HTML, use titleAttrib()
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
getSkin()
Get the Skin object related to this object.
static groupHasPermission( $group, $role)
Check, if the given group has the given permission.
QuickTemplate subclass for Vector.
makeLink( $key, $item, $options=[])
@inheritDoc
makeListItem( $key, $item, $options=[])
@inheritDoc
renderNavigation(array $elements)
Render one or more navigations elements by name, automatically reversed by css when UI is in RTL mode...
renderPortals(array $portals)
Render a series of portals.
execute()
Outputs the entire contents of the (X)HTML page.
renderPortal( $name, $content, $msg=null, $hook=null)
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 etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
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
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
null means default in associative array form
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 "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
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
usually copyright or history_copyright This message must be in HTML not wikitext & $link
Allows to change the fields on the form that will be generated $name
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 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