3 * Modern skin, derived from monobook template.
10 if( !defined( 'MEDIAWIKI' ) )
13 require( dirname(__FILE__
) . '/MonoBook.php' );
16 * Inherit main code from SkinTemplate, set the CSS and template filter.
20 class SkinModern
extends SkinTemplate
{
21 var $skinname = 'modern', $stylename = 'modern',
22 $template = 'ModernTemplate', $useHeadElement = true;
24 function setupSkinUserCss( OutputPage
$out ){
25 parent
::setupSkinUserCss( $out );
26 $out->addModuleStyles ('skins.modern');
34 class ModernTemplate
extends MonoBookTemplate
{
37 * Template filter callback for Modern skin.
38 * Takes an associative array of data set from a SkinTemplate-based
39 * class, and a wrapper for MediaWiki's localization database, and
40 * outputs a formatted page.
46 $this->skin
= $skin = $this->data
['skin'];
47 $action = $wgRequest->getText( 'action' );
49 // Suppress warnings to prevent notices about missing indexes in $this->data
52 $this->html( 'headelement' );
56 <div id
="mw_header"><h1 id
="firstHeading"><?php
$this->html('title') ?
></h1
></div
>
59 <div id
="mw_contentwrapper">
60 <!-- navigation portlet
-->
61 <div id
="p-cactions" class="portlet">
62 <h5
><?php
$this->msg('views') ?
></h5
>
65 <?php
foreach($this->data
['content_actions'] as $key => $tab) {
67 <li id="' . Sanitizer
::escapeId( "ca-$key" ) . '"';
69 echo ' class="'.htmlspecialchars($tab['class']).'"';
71 echo'><a href="'.htmlspecialchars($tab['href']).'"';
72 if( isset($tab["tooltiponly"]) && $tab["tooltiponly"] ) {
73 echo $skin->tooltip( "ca-$key" );
75 echo $skin->tooltipAndAccesskey( "ca-$key" );
77 echo '>'.htmlspecialchars($tab['text']).'</a></li>';
85 <!-- contentholder does nothing by
default, but it allows users to style the text inside
86 the content area without affecting the meaning of
'em' in
#mw_content, which is used
88 <div id
="mw_contentholder" <?php
$this->html("specialpageattributes") ?
>>
89 <div
class='mw-topboxes'>
90 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes')?
>></div
>
91 <div
class="mw-topbox" id
="siteSub"><?php
$this->msg('tagline') ?
></div
>
92 <?php
if($this->data
['newtalk'] ) {
93 ?
><div
class="usermessage mw-topbox"><?php
$this->html('newtalk') ?
></div
>
95 <?php
if($this->data
['sitenotice']) {
96 ?
><div
class="mw-topbox" id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
>
100 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html('subtitle') ?
></div
>
102 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub2"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
103 <?php
if($this->data
['showjumplinks']) { ?
><div id
="jump-to-nav"><?php
$this->msg('jumpto') ?
> <a href
="#mw_portlets"><?php
$this->msg('jumptonavigation') ?
></a
>, <a href
="#searchInput"><?php
$this->msg('jumptosearch') ?
></a
></div
><?php
} ?
>
105 <?php
$this->html('bodytext') ?
>
106 <div
class='mw_clear'></div
>
107 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
108 <?php
$this->html ('dataAfterContent') ?
>
109 </div
><!-- mw_contentholder
-->
110 </div
><!-- mw_content
-->
111 </div
><!-- mw_contentwrapper
-->
113 <div id
="mw_portlets"<?php
$this->html("userlangattributes") ?
>>
117 $sidebar = $this->data
['sidebar'];
118 if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
119 if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
120 if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
122 foreach ($sidebar as $boxName => $cont) {
123 if ( $boxName == 'SEARCH' ) {
125 } elseif ( $boxName == 'TOOLBOX' ) {
127 } elseif ( $boxName == 'LANGUAGES' ) {
128 $this->languageBox();
130 $this->customBox( $boxName, $cont );
135 </div
><!-- mw_portlets
-->
140 <div
class="mw_clear"></div
>
142 <!-- personal portlet
-->
143 <div
class="portlet" id
="p-personal">
144 <h5
><?php
$this->msg('personaltools') ?
></h5
>
147 <?php
foreach($this->getPersonalTools() as $key => $item) { ?
>
148 <?php
echo $this->makeListItem($key, $item); ?
>
157 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
160 foreach( $this->getFooterLinks("flat") as $aLink ) {
161 if( isset( $this->data
[$aLink] ) && $this->data
[$aLink] ) {
162 ?
> <li id
="<?php echo$aLink?>"><?php
$this->html($aLink) ?
></li
>
168 foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?
>
169 <div id
="mw_<?php echo htmlspecialchars($blockName); ?>">
171 foreach ( $footerIcons as $icon ) { ?
>
172 <?php
echo $this->skin
->makeFooterIcon( $icon, 'withoutImage' ); ?
>
182 <?php
$this->printTrail(); ?
>
186 } // end of execute() method