40 $html = $this->
get(
'headelement' );
41 $html .= Html::openElement(
'div', [
'id' =>
'globalWrapper' ] );
43 $html .= Html::openElement(
'div', [
'id' =>
'column-content' ] );
44 $html .= Html::rawElement(
'div', [
'id' =>
'content',
'class' =>
'mw-body',
'role' =>
'main' ],
45 Html::element(
'a', [
'id' =>
'top' ] ) .
48 'parameters' => [
'id' =>
'siteNotice',
'class' =>
'mw-body-content' ]
55 'id' =>
'firstHeading',
56 'class' =>
'firstHeading',
57 'lang' => $this->
getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode()
60 Html::rawElement(
'div', [
'id' =>
'bodyContent',
'class' =>
'mw-body-content' ],
61 Html::rawElement(
'div', [
'id' =>
'siteSub' ], $this->
getMsg(
'tagline' )->parse() ) .
64 [
'id' =>
'contentSub',
'lang' => $this->
get(
'userlang' ),
'dir' => $this->
get(
'dir' ) ],
65 $this->
get(
'subtitle' )
67 $this->
getIfExists(
'undelete', [
'wrapper' =>
'div',
'parameters' => [
70 $this->
getIfExists(
'newtalk', [
'wrapper' =>
'div',
'parameters' => [
71 'class' =>
'usermessage'
73 Html::element(
'div', [
'id' =>
'jump-to-nav' ] ) .
74 Html::element(
'a', [
'href' =>
'#column-one',
'class' =>
'mw-jump-link' ],
75 $this->
getMsg(
'monobook-jumptonavigation' )->
text()
77 Html::element(
'a', [
'href' =>
'#searchInput',
'class' =>
'mw-jump-link' ],
78 $this->
getMsg(
'monobook-jumptosearch' )->
text()
80 '<!-- start content -->' .
82 $this->
get(
'bodytext' ) .
85 '<!-- end content -->' .
91 $html .= Html::closeElement(
'div' );
93 $html .= Html::rawElement(
'div',
96 'lang' => $this->
get(
'userlang' ),
97 'dir' => $this->
get(
'dir' )
99 Html::element(
'h2', [], $this->
getMsg(
'navigation-heading' )->
text() ) .
102 Html::rawElement(
'div', [
'class' =>
'portlet',
'id' =>
'p-logo',
'role' =>
'banner' ],
105 'href' => $this->data[
'nav_urls'][
'mainpage'][
'href'],
106 'class' =>
'mw-wiki-logo',
118 $this->
getMsg(
'monobook-jumptopersonal' )->
text()
125 $html .=
'<!-- end of the left (by default at least) column -->';
129 $html .= Html::closeElement(
'div' );
133 $html .= Html::closeElement(
'body' );
134 $html .= Html::closeElement(
'html' );
151 return Html::element(
'a', [
152 'href' =>
"#$target",
154 'class' =>
'menu-toggle',
155 'id' =>
"$target-toggle"
166 $allTabs = $this->data[
'content_actions'];
167 $tabCount = count( $allTabs );
170 if ( $tabCount > 2 ) {
171 $html .= $this->
getBox(
'cactions', $allTabs,
'monobook-cactions-label' );
174 $html .= $this->
getBox(
'cactions', $allTabs,
'monobook-cactions-label',
175 [
'extra-classes' =>
'nomobile' ]
180 $tabs = $this->data[
'content_navigation'][
'namespaces'];
181 foreach ( $tabs as $tab =>
$attribs ) {
186 if ( $tabCount !== 1 ) {
189 'text' => $this->
getMsg(
'monobook-more-actions' )->text(),
190 'href' =>
'#p-cactions',
195 'text' => $this->
getMsg(
'toolbox' )->text(),
198 'title' => $this->
getMsg(
'toolbox' )->text()
200 if ( $this->data[
'language_urls'] !==
false ) {
201 $tabs[
'languages'] = [
202 'text' => $this->
getMsg(
'otherlanguages' )->text(),
204 'id' =>
'ca-languages',
205 'title' => $this->
getMsg(
'otherlanguages' )->text()
209 $html .= $this->
getBox(
'cactions-mobile', $tabs,
'monobook-cactions-label' );
220 $sidebar = $this->data[
'sidebar'];
223 if ( !
isset( $sidebar[
'SEARCH'] ) ) {
224 $sidebar[
'SEARCH'] =
true;
226 if ( !
isset( $sidebar[
'TOOLBOX'] ) ) {
227 $sidebar[
'TOOLBOX'] =
true;
229 if ( !
isset( $sidebar[
'LANGUAGES'] ) ) {
230 $sidebar[
'LANGUAGES'] =
true;
233 foreach ( $sidebar as $boxName =>
$content ) {
239 $boxName = (
string)$boxName;
241 if ( $boxName ==
'SEARCH' ) {
243 }
elseif ( $boxName ==
'TOOLBOX' ) {
245 }
elseif ( $boxName ==
'LANGUAGES' ) {
252 [
'extra-classes' =>
'generated-sidebar' ]
268 if ( $this->config->get(
'UseTwoButtonsSearchForm' ) ) {
271 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton' ]
274 $optionButtons = Html::rawElement(
'div', [],
275 Html::rawElement(
'a', [
'href' => $this->
get(
'searchaction' ),
'rel' =>
'search' ],
276 $this->
getMsg(
'powersearch-legend' )->escaped()
280 $searchInputId =
'searchInput';
281 $searchForm = Html::rawElement(
'form', [
282 'action' => $this->
get(
'wgScript' ),
285 Html::hidden(
'title', $this->
get(
'searchtitle' ) ) .
287 $this->
makeSearchButton(
'go', [
'id' =>
'searchGoButton',
'class' =>
'searchButton' ] ) .
291 $html .= $this->
getBox(
'search', $searchForm,
null, [
292 'search-input-id' => $searchInputId,
294 'body-id' =>
'searchBody'
311 'MonoBookTemplateToolboxEnd' => [ &$skin ],
312 'SkinTemplateToolboxEnd' => [ &$skin,
true ]
328 if ( $this->data[
'language_urls'] !==
false ) {
329 $html .= $this->
getBox(
'lang', $this->data[
'language_urls'],
'otherlanguages' );
345 protected function getBox( $name, $contents, $msg =
null, $setOptions = [] ) {
347 'class' =>
'portlet',
348 'body-class' =>
'pBody',
351 foreach ( $setOptions as $key =>
$value ) {
356 if ( $name ==
'personal' ) {
361 $prependiture .= $this->
makeListItem(
'uls', $contents[
'uls'] );
362 unset( $contents[
'uls'] );
364 if ( !$this->
getSkin()->getUser()->isLoggedIn() &&
367 $prependiture .= Html::rawElement(
369 [
'id' =>
'pt-anonuserpage' ],
370 $this->
getMsg(
'notloggedin' )->escaped()
393 'role' =>
'navigation',
394 'search-input-id' =>
'searchInput',
396 'id' =>
'p-' .
$name,
397 'class' =>
'mw-portlet',
398 'extra-classes' =>
'',
400 'body-class' =>
'mw-portlet-body',
401 'body-extra-classes' =>
'',
403 'text-wrapper' => [
'tag' =>
'span' ],
410 foreach ( $setOptions as $key =>
$value ) {
415 if ( $msg ===
null ) {
425 $msgObj = $this->
getMsg( $msg, $msgParams );
426 if ( $msgObj->exists() ) {
427 $msgString = $msgObj->parse();
432 $labelId = Sanitizer::escapeIdForAttribute(
"p-$name-label" );
435 $contentText = Html::openElement(
'ul',
436 [
'lang' => $this->
get(
'userlang' ),
'dir' => $this->
get(
'dir' ) ]
438 $contentText .=
$options[
'list-prepend'];
439 foreach (
$content as $key => $item ) {
444 [
'text-wrapper' =>
$options[
'text-wrapper'] ]
456 foreach (
$options[
'hooks'] as $hook => $hookOptions ) {
461 $contentText .= Html::closeElement(
'ul' );
470 'id' => Sanitizer::escapeIdForAttribute(
$options[
'id'] ),
473 if (
$options[
'role'] !==
'search' ) {
474 $divOptions[
'aria-labelledby'] =
$labelId;
478 'lang' => $this->
get(
'userlang' ),
479 'dir' => $this->
get(
'dir' )
481 if (
$options[
'role'] ==
'search' ) {
482 $msgString = Html::rawElement(
'label', [
'for' =>
$options[
'search-input-id'] ], $msgString );
489 $bodyDivOptions[
'id'] =
$options[
'body-id'];
492 $html = Html::rawElement(
'div', $divOptions,
493 Html::rawElement(
'h3', $labelOptions, $msgString ) .
494 Html::rawElement(
'div', $bodyDivOptions,
537 Hooks::run( $hook, $hookOptions );
540 if ( !
trim( $hookContents ) ) {
561 foreach ( $setOptions as $key =>
$value ) {
567 if ( (
$options[
'loose'] && $this->data[$object] !=
'' ) ||
568 ( !
$options[
'loose'] && $this->data[$object] ) ) {
569 if (
$options[
'wrapper'] ==
'none' ) {
570 $html .= $this->
get( $object );
572 $html .= Html::rawElement(
575 $this->
get( $object )
594 $html .= Html::openElement(
'div', [
596 'role' =>
'contentinfo',
597 'lang' => $this->
get(
'userlang' ),
598 'dir' => $this->
get(
'dir' )
601 foreach ( $validFooterIcons as $blockName => $footerIcons ) {
602 $html .= Html::openElement(
'div', [
603 'id' => Sanitizer::escapeIdForAttribute(
"f-{$blockName}ico" ),
604 'class' =>
'footer-icons'
606 foreach ( $footerIcons as $icon ) {
609 $html .= Html::closeElement(
'div' );
611 if ( count( $validFooterLinks ) > 0 ) {
612 $html .= Html::openElement(
'ul', [
'id' =>
'f-list' ] );
613 foreach ( $validFooterLinks as $aLink ) {
614 $html .= Html::rawElement(
616 [
'id' => Sanitizer::escapeIdForAttribute( $aLink ) ],
620 $html .= Html::closeElement(
'ul' );
622 $html .= Html::closeElement(
'div' );
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
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=[])
getToolbox()
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
getTrail()
Get the basic end-page trail including bottomscripts, reporttime, and debug stuff.
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 ...
makeListItem( $key, $item, $options=[])
Generates a list item for a navigation, portlet, portal, sidebar... list.
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=[])
getClear()
Get a div with the core visualClear class, for clearing floats.
getAfterPortlet( $name)
Allows extensions to hook into known portlets and add stuff to them.
static titleAttrib( $name, $options=null, array $msgParams=[])
Given the id of an interface element, constructs the appropriate title attribute from the system mess...
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null)
Returns the attributes for the tooltip and access key.
execute()
Template filter callback for MonoBook skin.
getBox( $name, $contents, $msg=null, $setOptions=[])
Generate a sidebar box using getPortlet(); prefill some common stuff.
getSimpleFooter()
Renderer for getFooterIcons and getFooterLinks as a generic footer block.
getMobileNavigationIcon( $target, $title)
Create a wrapped link to create a mobile toggle/jump icon Needs to be an on-page link (as opposed to ...
getSearchBox()
Generate the search, using config options for buttons (?)
getPortlet( $name, $content, $msg=null, $setOptions=[])
Generates a block of navigation links with a header.
getRenderedSidebar()
Generate the full sidebar.
getLanguageBox()
Generate the languages box.
getIfExists( $object, $setOptions=[])
Simple wrapper for random if-statement-wrapped $this->data things.
mergeClasses( $class, $extraClasses)
Helper function for getPortlet.
getCactions()
Generate the cactions (content actions) tabs, as well as a second set of spoof tabs for mobile.
getToolboxBox()
Generate the toolbox, complete with all three old hooks.
deprecatedHookHack( $hook, $hookOptions=[])
Wrapper to catch output of old hooks expecting to write directly to page We no longer do things that ...
getSkin()
Get the Skin object related to this object.
static groupHasPermission( $group, $role)
Check, if the given group has the given permission.
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 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
Allows to change the fields on the form that will be generated $name
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 after processing & $attribs