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;
25 * @param $out OutputPage
27 function setupSkinUserCss( OutputPage
$out ){
28 parent
::setupSkinUserCss( $out );
29 $out->addModuleStyles ('skins.modern');
37 class ModernTemplate
extends MonoBookTemplate
{
40 * Template filter callback for Modern skin.
41 * Takes an associative array of data set from a SkinTemplate-based
42 * class, and a wrapper for MediaWiki's localization database, and
43 * outputs a formatted page.
48 // Suppress warnings to prevent notices about missing indexes in $this->data
51 $this->html( 'headelement' );
55 <div id
="mw_header"><h1 id
="firstHeading"><span dir
="auto"><?php
$this->html('title') ?
></span
></h1
></div
>
58 <div id
="mw_contentwrapper">
59 <!-- navigation portlet
-->
60 <?php
$this->cactions(); ?
>
64 <!-- contentholder does nothing by
default, but it allows users to style the text inside
65 the content area without affecting the meaning of
'em' in
#mw_content, which is used
67 <div id
="mw_contentholder">
68 <div
class='mw-topboxes'>
69 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes')?
>></div
>
70 <div
class="mw-topbox" id
="siteSub"><?php
$this->msg('tagline') ?
></div
>
71 <?php
if($this->data
['newtalk'] ) {
72 ?
><div
class="usermessage mw-topbox"><?php
$this->html('newtalk') ?
></div
>
74 <?php
if($this->data
['sitenotice']) {
75 ?
><div
class="mw-topbox" id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
>
79 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html('subtitle') ?
></div
>
81 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub2"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
82 <?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
} ?
>
84 <?php
$this->html('bodytext') ?
>
85 <div
class='mw_clear'></div
>
86 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
87 <?php
$this->html ('dataAfterContent') ?
>
88 </div
><!-- mw_contentholder
-->
89 </div
><!-- mw_content
-->
90 </div
><!-- mw_contentwrapper
-->
92 <div id
="mw_portlets"<?php
$this->html("userlangattributes") ?
>>
95 <?php
$this->renderPortals( $this->data
['sidebar'] ); ?
>
97 </div
><!-- mw_portlets
-->
102 <div
class="mw_clear"></div
>
104 <!-- personal portlet
-->
105 <div
class="portlet" id
="p-personal">
106 <h5
><?php
$this->msg('personaltools') ?
></h5
>
109 <?php
foreach($this->getPersonalTools() as $key => $item) { ?
>
110 <?php
echo $this->makeListItem($key, $item); ?
>
119 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
122 foreach( $this->getFooterLinks("flat") as $aLink ) {
123 if( isset( $this->data
[$aLink] ) && $this->data
[$aLink] ) {
124 ?
> <li id
="<?php echo$aLink?>"><?php
$this->html($aLink) ?
></li
>
130 foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?
>
131 <div id
="mw_<?php echo htmlspecialchars($blockName); ?>">
133 foreach ( $footerIcons as $icon ) { ?
>
134 <?php
echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?
>
144 <?php
$this->printTrail(); ?
>
148 } // end of execute() method