5 * Translated from gwicke's previous TAL template version to remove
6 * dependency on PHPTAL.
13 if( !defined( 'MEDIAWIKI' ) )
17 require_once('includes/SkinTemplate.php');
20 * Inherit main code from SkinTemplate, set the CSS and template filter.
25 class SkinMonoBook
extends SkinTemplate
{
26 /** Using monobook. */
27 function initPage( &$out ) {
28 SkinTemplate
::initPage( $out );
29 $this->skinname
= 'monobook';
30 $this->stylename
= 'monobook';
31 $this->template
= 'MonoBookTemplate';
40 class MonoBookTemplate
extends QuickTemplate
{
42 * Template filter callback for MonoBook skin.
43 * Takes an associative array of data set from a SkinTemplate-based
44 * class, and a wrapper for MediaWiki's localization database, and
45 * outputs a formatted page.
50 // Suppress warnings to prevent notices about missing indexes in $this->data
53 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
54 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="<?php $this->text('lang') ?>" lang
="<?php $this->text('lang') ?>" dir
="<?php $this->text('dir') ?>">
56 <meta http
-equiv
="Content-Type" content
="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
57 <?php
$this->html('headlinks') ?
>
58 <title
><?php
$this->text('pagetitle') ?
></title
>
59 <style type
="text/css" media
="screen,projection">/*<![CDATA[*/ @import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css"; /*]]>*/</style
>
60 <link rel
="stylesheet" type
="text/css" media
="print" href
="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
61 <!--[if lt IE
5.5000]><style type
="text/css">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style
><![endif]-->
62 <!--[if IE
5.5000]><style type
="text/css">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style
><![endif]-->
63 <!--[if IE
6]><style type
="text/css">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style
><![endif]-->
64 <!--[if IE
]><script type
="text/javascript" src
="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script
>
65 <meta http
-equiv
="imagetoolbar" content
="no" /><![endif]-->
66 <?php
if($this->data
['jsvarurl' ]) { ?
><script type
="text/javascript" src
="<?php $this->text('jsvarurl' ) ?>"></script
><?php
} ?
>
67 <script type
="text/javascript" src
="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script
>
68 <?php
if($this->data
['usercss' ]) { ?
><style type
="text/css"><?php
$this->html('usercss' ) ?
></style
><?php
} ?
>
69 <?php
if($this->data
['userjs' ]) { ?
><script type
="text/javascript" src
="<?php $this->text('userjs' ) ?>"></script
><?php
} ?
>
70 <?php
if($this->data
['userjsprev']) { ?
><script type
="text/javascript"><?php
$this->html('userjsprev') ?
></script
><?php
} ?
>
72 <body
<?php
if($this->data
['body_ondblclick']) { ?
>ondblclick
="<?php $this->text('body_ondblclick') ?>"<?php
} ?
>
73 <?php
if($this->data
['body_onload' ]) { ?
>onload
="<?php $this->text('body_onload') ?>"<?php
} ?
>
74 <?php
if($this->data
['nsclass' ]) { ?
>class="<?php $this->text('nsclass') ?>"<?php
} ?
>>
75 <div id
="globalWrapper">
76 <div id
="column-content">
78 <a name
="top" id
="contentTop"></a
>
79 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
80 <h1
class="firstHeading"><?php
$this->text('title') ?
></h1
>
81 <div id
="bodyContent">
82 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
83 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
84 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
85 <?php
if($this->data
['newtalk'] ) { ?
><div
class="usermessage"><?php
$this->html('newtalk') ?
></div
><?php
} ?
>
86 <!-- start content
-->
87 <?php
$this->html('bodytext') ?
>
88 <?php
if($this->data
['catlinks']) { ?
><div id
="catlinks"><?php
$this->html('catlinks') ?
></div
><?php
} ?
>
90 <div
class="visualClear"></div
>
95 <div id
="p-cactions" class="portlet">
98 <?php
foreach($this->data
['content_actions'] as $key => $action) {
99 ?
><li id
="ca-<?php echo htmlspecialchars($key) ?>"
100 <?php
if($action['class']) { ?
>class="<?php echo htmlspecialchars($action['class']) ?>"<?php
} ?
>
101 ><a href
="<?php echo htmlspecialchars($action['href']) ?>"><?php
102 echo htmlspecialchars($action['text']) ?
></a
></li
><?php
106 <div
class="portlet" id
="p-personal">
107 <h5
><?php
$this->msg('personaltools') ?
></h5
>
110 <?php
foreach($this->data
['personal_urls'] as $key => $item) {
111 ?
><li id
="pt-<?php echo htmlspecialchars($key) ?>"><a href
="<?php
112 echo htmlspecialchars($item['href']) ?>"<?php
113 if(!empty($item['class'])) { ?
> class="<?php
114 echo htmlspecialchars($item['class']) ?>"<?php
} ?
>><?php
115 echo htmlspecialchars($item['text']) ?
></a
></li
><?php
120 <div
class="portlet" id
="p-logo">
121 <a style
="background-image: url(<?php $this->text('logopath') ?>);"
122 href
="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"
123 title
="<?php $this->msg('mainpage') ?>"></a
>
125 <script type
="text/javascript"> if (window
.isMSIE55
) fixalpha(); </script
>
126 <div
class="portlet" id
="p-nav">
127 <h5
><?php
$this->msg('navigation') ?
></h5
>
130 <?php
foreach($this->data
['navigation_urls'] as $navlink) { ?
>
131 <li id
="<?php echo htmlspecialchars($navlink['id'])
132 ?>"><a href
="<?php echo htmlspecialchars($navlink['href']) ?>"><?php
133 echo htmlspecialchars($navlink['text']) ?
></a
></li
><?php
} ?
>
137 <div id
="p-search" class="portlet">
138 <h5
><label
for="searchInput"><?php
$this->msg('search') ?
></label
></h5
>
140 <form name
="searchform" action
="<?php $this->text('searchaction') ?>" id
="searchform">
141 <input id
="searchInput" name
="search" type
="text"
142 <?php
if($this->haveMsg('accesskey-search')) {
143 ?
>accesskey
="<?php $this->msg('accesskey-search') ?>"<?php
}
144 if( isset( $this->data
['search'] ) ) {
145 ?
> value
="<?php $this->text('search') ?>"<?php
} ?
> />
146 <input type
='submit' name
="go" class="searchButton" id
="searchGoButton"
147 value
="<?php $this->msg('go') ?>"
148 /> 
;<input type
='submit' name
="fulltext"
150 value
="<?php $this->msg('search') ?>" />
154 <div
class="portlet" id
="p-tb">
155 <h5
><?php
$this->msg('toolbox') ?
></h5
>
158 <?php
if($this->data
['notspecialpage']) { foreach( array( 'whatlinkshere', 'recentchangeslinked' ) as $special ) { ?
>
159 <li id
="t-<?php echo $special?>"><a href
="<?php
160 echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
161 ?>"><?php
echo $this->msg($special) ?
></a
></li
>
163 <?php
if($this->data
['feeds']) { ?
><li id
="feedlinks"><?php
foreach($this->data
['feeds'] as $key => $feed) {
164 ?
><span id
="feed-<?php echo htmlspecialchars($key) ?>"><a href
="<?php
165 echo htmlspecialchars($feed['href']) ?>"><?php
echo htmlspecialchars($feed['text'])?
></a
> 
;</span
>
166 <?php
} ?
></li
><?php
} ?
>
167 <?php
foreach( array('contributions', 'emailuser', 'upload', 'specialpages') as $special ) { ?
>
168 <?php
if($this->data
['nav_urls'][$special]) {?
><li id
="t-<?php echo $special ?>"><a href
="<?php
169 echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
170 ?>"><?php
$this->msg($special) ?
></a
></li
><?php
} ?
>
175 <?php
if( $this->data
['language_urls'] ) { ?
><div id
="p-lang" class="portlet">
176 <h5
><?php
$this->msg('otherlanguages') ?
></h5
>
179 <?php
foreach($this->data
['language_urls'] as $langlink) { ?
>
181 <a href
="<?php echo htmlspecialchars($langlink['href'])
182 ?>"><?php
echo $langlink['text'] ?
></a
>
189 </div
><!-- end of the
left (by
default at least
) column
-->
190 <div
class="visualClear"></div
>
192 <?php
if($this->data
['poweredbyico']) { ?
><div id
="f-poweredbyico"><?php
$this->html('poweredbyico') ?
></div
><?php
} ?
>
193 <?php
if($this->data
['copyrightico']) { ?
><div id
="f-copyrightico"><?php
$this->html('copyrightico') ?
></div
><?php
} ?
>
195 <?php
if($this->data
['lastmod' ]) { ?
><li id
="f-lastmod"><?php
$this->html('lastmod') ?
></li
><?php
} ?
>
196 <?php
if($this->data
['viewcount' ]) { ?
><li id
="f-viewcount"><?php
$this->html('viewcount') ?
></li
><?php
} ?
>
197 <?php
if($this->data
['numberofwatchingusers' ]) { ?
><li id
="f-numberofwatchingusers"><?php
$this->html('numberofwatchingusers') ?
></li
><?php
} ?
>
198 <?php
if($this->data
['credits' ]) { ?
><li id
="f-credits"><?php
$this->html('credits') ?
></li
><?php
} ?
>
199 <?php
if($this->data
['copyright' ]) { ?
><li id
="f-copyright"><?php
$this->html('copyright') ?
></li
><?php
} ?
>
200 <?php
if($this->data
['about' ]) { ?
><li id
="f-about"><?php
$this->html('about') ?
></li
><?php
} ?
>
201 <?php
if($this->data
['disclaimer']) { ?
><li id
="f-disclaimer"><?php
$this->html('disclaimer') ?
></li
><?php
} ?
>
202 <?php
if($this->data
['tagline']) { ?
><li id
="f-tagline"><?php
echo $this->data
['tagline'] ?
></li
><?php
} ?
>
206 <?php
$this->html('reporttime') ?
>