3 * Modern skin, derived from monobook template.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
25 if( !defined( 'MEDIAWIKI' ) )
28 require( dirname(__FILE__
) . '/MonoBook.php' );
31 * Inherit main code from SkinTemplate, set the CSS and template filter.
35 class SkinModern
extends SkinTemplate
{
36 var $skinname = 'modern', $stylename = 'modern',
37 $template = 'ModernTemplate', $useHeadElement = true;
40 * @param $out OutputPage
42 function setupSkinUserCss( OutputPage
$out ){
43 parent
::setupSkinUserCss( $out );
44 $out->addModuleStyles ('skins.modern');
52 class ModernTemplate
extends MonoBookTemplate
{
55 * Template filter callback for Modern skin.
56 * Takes an associative array of data set from a SkinTemplate-based
57 * class, and a wrapper for MediaWiki's localization database, and
58 * outputs a formatted page.
63 // Suppress warnings to prevent notices about missing indexes in $this->data
66 $this->html( 'headelement' );
70 <div id
="mw_header"><h1 id
="firstHeading"><span dir
="auto"><?php
$this->html('title') ?
></span
></h1
></div
>
73 <div id
="mw_contentwrapper">
74 <!-- navigation portlet
-->
75 <?php
$this->cactions(); ?
>
79 <!-- contentholder does nothing by
default, but it allows users to style the text inside
80 the content area without affecting the meaning of
'em' in
#mw_content, which is used
82 <div id
="mw_contentholder">
83 <div
class='mw-topboxes'>
84 <div id
="mw-js-message" style
="display:none;"<?php
$this->html('userlangattributes')?
>></div
>
85 <div
class="mw-topbox" id
="siteSub"><?php
$this->msg('tagline') ?
></div
>
86 <?php
if($this->data
['newtalk'] ) {
87 ?
><div
class="usermessage mw-topbox"><?php
$this->html('newtalk') ?
></div
>
89 <?php
if($this->data
['sitenotice']) {
90 ?
><div
class="mw-topbox" id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
>
94 <div id
="contentSub"<?php
$this->html('userlangattributes') ?
>><?php
$this->html('subtitle') ?
></div
>
96 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub2"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
97 <?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
} ?
>
99 <?php
$this->html('bodytext') ?
>
100 <div
class='mw_clear'></div
>
101 <?php
if($this->data
['catlinks']) { $this->html('catlinks'); } ?
>
102 <?php
$this->html ('dataAfterContent') ?
>
103 </div
><!-- mw_contentholder
-->
104 </div
><!-- mw_content
-->
105 </div
><!-- mw_contentwrapper
-->
107 <div id
="mw_portlets"<?php
$this->html("userlangattributes") ?
>>
110 <?php
$this->renderPortals( $this->data
['sidebar'] ); ?
>
112 </div
><!-- mw_portlets
-->
117 <div
class="mw_clear"></div
>
119 <!-- personal portlet
-->
120 <div
class="portlet" id
="p-personal">
121 <h5
><?php
$this->msg('personaltools') ?
></h5
>
124 <?php
foreach($this->getPersonalTools() as $key => $item) { ?
>
125 <?php
echo $this->makeListItem($key, $item); ?
>
134 <div id
="footer"<?php
$this->html('userlangattributes') ?
>>
137 foreach( $this->getFooterLinks("flat") as $aLink ) {
138 if( isset( $this->data
[$aLink] ) && $this->data
[$aLink] ) {
139 ?
> <li id
="<?php echo$aLink?>"><?php
$this->html($aLink) ?
></li
>
145 foreach ( $this->getFooterIcons("nocopyright") as $blockName => $footerIcons ) { ?
>
146 <div id
="mw_<?php echo htmlspecialchars($blockName); ?>">
148 foreach ( $footerIcons as $icon ) { ?
>
149 <?php
echo $this->getSkin()->makeFooterIcon( $icon, 'withoutImage' ); ?
>
159 <?php
$this->printTrail(); ?
>
163 } // end of execute() method