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
{
41 * Template filter callback for Modern skin.
42 * Takes an associative array of data set from a SkinTemplate-based
43 * class, and a wrapper for MediaWiki's localization database, and
44 * outputs a formatted page.
49 $this->skin
= $skin = $this->data
['skin'];
51 // Suppress warnings to prevent notices about missing indexes in $this->data
54 $this->html( 'headelement' );
58 <div id
="mw_header"><h1 id
="firstHeading"><?php
$this->html('title') ?
></h1
></div
>
61 <div id
="mw_contentwrapper">
62 <!-- navigation portlet
-->
63 <?php
$this->cactions( $skin ); ?
>
67 <!-- contentholder does nothing by
default, but it allows users to style the text inside
68 the content area without affecting the meaning of
'em' in
#mw_content, which is used
70 <div id
="mw_contentholder" <?php
$this->html("specialpageattributes") ?
>>
71 <div
class='mw-topboxes'>
72 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes')?
>></div
>
73 <div
class="mw-topbox" id
="siteSub"><?php
$this->msg('tagline') ?
></div
>
74 <?php
if($this->data
['newtalk'] ) {
75 ?
><div
class="usermessage mw-topbox"><?php
$this->html('newtalk') ?
></div
>
77 <?php
if($this->data
['sitenotice']) {
78 ?
><div
class="mw-topbox" id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
>
82 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html('subtitle') ?
></div
>
84 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub2"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
85 <?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
} ?
>
87 <?php
$this->html('bodytext') ?
>
88 <?php
if($this->data
['printfooter']) { ?
><div
class="printfooter"><?php
$this->html('printfooter'); ?
></div
><?php
} ?
>
89 <?php
$this->html('debughtml'); ?
>
90 <div
class='mw_clear'></div
>
91 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
92 <?php
$this->html ('dataAfterContent') ?
>
93 </div
><!-- mw_contentholder
-->
94 </div
><!-- mw_content
-->
95 </div
><!-- mw_contentwrapper
-->
97 <div id
="mw_portlets"<?php
$this->html("userlangattributes") ?
>>
101 $sidebar = $this->data
['sidebar'];
102 if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
103 if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
104 if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
106 foreach ($sidebar as $boxName => $cont) {
107 if ( $boxName == 'SEARCH' ) {
109 } elseif ( $boxName == 'TOOLBOX' ) {
111 } elseif ( $boxName == 'LANGUAGES' ) {
112 $this->languageBox();
114 $this->customBox( $boxName, $cont );
119 </div
><!-- mw_portlets
-->
124 <div
class="mw_clear"></div
>
126 <!-- personal portlet
-->
127 <div
class="portlet" id
="p-personal">
128 <h5
><?php
$this->msg('personaltools') ?
></h5
>
131 <?php
foreach($this->getPersonalTools() as $key => $item) { ?
>
132 <?php
echo $this->makeListItem($key, $item); ?
>
141 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
144 foreach( $this->getFooterLinks("flat") as $aLink ) {
145 if( isset( $this->data
[$aLink] ) && $this->data
[$aLink] ) {
146 ?
> <li id
="<?php echo$aLink?>"><?php
$this->html($aLink) ?
></li
>
152 foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?
>
153 <div id
="mw_<?php echo htmlspecialchars($blockName); ?>">
155 foreach ( $footerIcons as $icon ) { ?
>
156 <?php
echo $this->skin
->makeFooterIcon( $icon, 'withoutImage' ); ?
>
166 <?php
$this->printTrail(); ?
>
170 } // end of execute() method