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 <?php
$this->cactions( $skin ); ?
>
65 <!-- contentholder does nothing by
default, but it allows users to style the text inside
66 the content area without affecting the meaning of
'em' in
#mw_content, which is used
68 <div id
="mw_contentholder" <?php
$this->html("specialpageattributes") ?
>>
69 <div
class='mw-topboxes'>
70 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes')?
>></div
>
71 <div
class="mw-topbox" id
="siteSub"><?php
$this->msg('tagline') ?
></div
>
72 <?php
if($this->data
['newtalk'] ) {
73 ?
><div
class="usermessage mw-topbox"><?php
$this->html('newtalk') ?
></div
>
75 <?php
if($this->data
['sitenotice']) {
76 ?
><div
class="mw-topbox" id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
>
80 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html('subtitle') ?
></div
>
82 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub2"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
83 <?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
} ?
>
85 <?php
$this->html('bodytext') ?
>
86 <div
class='mw_clear'></div
>
87 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
88 <?php
$this->html ('dataAfterContent') ?
>
89 </div
><!-- mw_contentholder
-->
90 </div
><!-- mw_content
-->
91 </div
><!-- mw_contentwrapper
-->
93 <div id
="mw_portlets"<?php
$this->html("userlangattributes") ?
>>
97 $sidebar = $this->data
['sidebar'];
98 if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
99 if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
100 if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
102 foreach ($sidebar as $boxName => $cont) {
103 if ( $boxName == 'SEARCH' ) {
105 } elseif ( $boxName == 'TOOLBOX' ) {
107 } elseif ( $boxName == 'LANGUAGES' ) {
108 $this->languageBox();
110 $this->customBox( $boxName, $cont );
115 </div
><!-- mw_portlets
-->
120 <div
class="mw_clear"></div
>
122 <!-- personal portlet
-->
123 <div
class="portlet" id
="p-personal">
124 <h5
><?php
$this->msg('personaltools') ?
></h5
>
127 <?php
foreach($this->getPersonalTools() as $key => $item) { ?
>
128 <?php
echo $this->makeListItem($key, $item); ?
>
137 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
140 foreach( $this->getFooterLinks("flat") as $aLink ) {
141 if( isset( $this->data
[$aLink] ) && $this->data
[$aLink] ) {
142 ?
> <li id
="<?php echo$aLink?>"><?php
$this->html($aLink) ?
></li
>
148 foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?
>
149 <div id
="mw_<?php echo htmlspecialchars($blockName); ?>">
151 foreach ( $footerIcons as $icon ) { ?
>
152 <?php
echo $this->skin
->makeFooterIcon( $icon, 'withoutImage' ); ?
>
162 <?php
$this->printTrail(); ?
>
166 } // end of execute() method