5 * Translated from gwicke's previous TAL template version to remove
6 * dependency on PHPTAL.
14 require_once('includes/SkinTemplate.php');
17 * Inherit main code from SkinTemplate, set the CSS and template filter.
22 class SkinMonoBook
extends SkinTemplate
{
23 /** Using monobook. */
24 function initPage( &$out ) {
25 SkinTemplate
::initPage( $out );
26 $this->skinname
= 'monobook';
27 $this->stylename
= 'monobook';
28 $this->template
= 'MonoBookTemplate';
32 class MonoBookTemplate
extends QuickTemplate
{
34 * Template filter callback for MonoBook skin.
35 * Takes an associative array of data set from a SkinTemplate-based
36 * class, and a wrapper for MediaWiki's localization database, and
37 * outputs a formatted page.
42 ?
><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
43 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="<?php $this->text('lang') ?>" lang
="<?php $this->text('lang') ?>" dir
="<?php $this->text('dir') ?>">
45 <meta http
-equiv
="Content-Type" content
="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
46 <?php
$this->html('headlinks') ?
>
47 <title
><?php
$this->text('pagetitle') ?
></title
>
48 <style type
="text/css" media
="screen,projection">/*<![CDATA[*/ @import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css"; /*]]>*/</style
>
49 <link rel
="stylesheet" type
="text/css" media
="print" href
="<?php $this->text('stylepath') ?>/common/commonPrint.css" />
50 <!--[if IE
]><style type
="text/css" media
="all">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IEFixes.css";</style
>
51 <script type
="text/javascript" src
="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script
>
52 <meta http
-equiv
="imagetoolbar" content
="no" /><![endif]-->
53 <?php
if($this->data
['jsvarurl' ]) { ?
><script type
="text/javascript" src
="<?php $this->text('jsvarurl' ) ?>"></script
><?php
} ?
>
54 <script type
="text/javascript" src
="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script
>
55 <?php
if($this->data
['usercss' ]) { ?
><style type
="text/css"><?php
$this->html('usercss' ) ?
></style
><?php
} ?
>
56 <?php
if($this->data
['userjs' ]) { ?
><script type
="text/javascript" src
="<?php $this->text('userjs' ) ?>"></script
><?php
} ?
>
57 <?php
if($this->data
['userjsprev']) { ?
><script type
="text/javascript"><?php
$this->html('userjsprev') ?
></script
><?php
} ?
>
59 <body
<?php
if($this->data
['body_ondblclick']) { ?
>ondblclick
="<?php $this->text('body_ondblclick') ?>"<?php
} ?
>
60 <?php
if($this->data
['nsclass' ]) { ?
>class="<?php $this->text('nsclass') ?>"<?php
} ?
>>
61 <div id
="globalWrapper">
62 <div id
="column-content">
64 <a name
="top" id
="contentTop"></a
>
65 <?php
if($this->data
['sitenotice']) { ?
><div id
="siteNotice"><?php
$this->html('sitenotice') ?
></div
><?php
} ?
>
66 <h1
class="firstHeading"><?php
$this->text('title') ?
></h1
>
67 <div id
="bodyContent">
68 <h3 id
="siteSub"><?php
$this->msg('tagline') ?
></h3
>
69 <div id
="contentSub"><?php
$this->html('subtitle') ?
></div
>
70 <?php
if($this->data
['undelete']) { ?
><div id
="contentSub"><?php
$this->html('undelete') ?
></div
><?php
} ?
>
71 <?php
if($this->data
['newtalk'] ) { ?
><div
class="usermessage"><?php
$this->html('newtalk') ?
></div
><?php
} ?
>
72 <!-- start content
-->
73 <?php
$this->html('bodytext') ?
>
74 <?php
if($this->data
['catlinks']) { ?
><div id
="catlinks"><?php
$this->html('catlinks') ?
></div
><?php
} ?
>
76 <div
class="visualClear"></div
>
81 <div id
="p-cactions" class="portlet">
84 <?php
foreach($this->data
['content_actions'] as $key => $action) {
85 ?
><li id
="ca-<?php echo htmlspecialchars($key) ?>"
86 <?php
if($action['class']) { ?
>class="<?php echo htmlspecialchars($action['class']) ?>"<?php
} ?
>
87 ><a href
="<?php echo htmlspecialchars($action['href']) ?>"><?php
88 echo htmlspecialchars($action['text']) ?
></a
></li
><?php
92 <div
class="portlet" id
="p-personal">
93 <h5
><?php
$this->msg('personaltools') ?
></h5
>
96 <?php
foreach($this->data
['personal_urls'] as $key => $item) {
97 ?
><li id
="pt-<?php echo htmlspecialchars($key) ?>"><a href
="<?php
98 echo htmlspecialchars($item['href']) ?>"<?php
99 if(!empty($item['class'])) { ?
> class="<?php
100 echo htmlspecialchars($item['class']) ?>"<?php
} ?
>><?php
101 echo htmlspecialchars($item['text']) ?
></a
></li
><?php
106 <div
class="portlet" id
="p-logo">
107 <a style
="background-image: url(<?php $this->text('logopath') ?>);"
108 href
="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"
109 title
="<?php $this->msg('mainpage') ?>"></a
>
111 <div
class="portlet" id
="p-nav">
112 <h5
><?php
$this->msg('navigation') ?
></h5
>
115 <?php
foreach($this->data
['navigation_urls'] as $navlink) { ?
>
116 <li id
="<?php echo htmlspecialchars($navlink['id'])
117 ?>"><a href
="<?php echo htmlspecialchars($navlink['href']) ?>"><?php
118 echo htmlspecialchars($navlink['text']) ?
></a
></li
><?php
} ?
>
122 <div id
="p-search" class="portlet">
123 <h5
><?php
$this->msg('search') ?
></h5
>
125 <form name
="searchform" action
="<?php $this->text('searchaction') ?>" id
="searchform">
126 <input id
="searchInput" name
="search" type
="text"
127 <?php
if($this->haveMsg('accesskey-search')) {
128 ?
>accesskey
="<?php $this->msg('accesskey-search') ?>"<?php
} ?
> />
129 <input type
='submit' name
="go" class="searchButton"
130 value
="<?php $this->msg('go') ?>"
131 /> 
;<input type
='submit' name
="fulltext"
133 value
="<?php $this->msg('search') ?>" />
137 <div
class="portlet" id
="p-tb">
138 <h5
><?php
$this->msg('toolbox') ?
></h5
>
141 <?php
if($this->data
['notspecialpage']) { foreach( array( 'whatlinkshere', 'recentchangeslinked' ) as $special ) { ?
>
142 <li id
="t-<?php echo $special?>"><a href
="<?php
143 echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
144 ?>"><?php
echo $this->msg($special) ?
></a
></li
>
146 <?php
if($this->data
['feeds']) { ?
><li id
="feedlinks"><?php
foreach($this->data
['feeds'] as $key => $feed) {
147 ?
><span id
="feed-<?php echo htmlspecialchars($key) ?>"><a href
="<?php
148 echo htmlspecialchars($feed['href']) ?>"><?php
echo htmlspecialchars($feed['text'])?
> 
;</span
>
149 <?php
} ?
></li
><?php
} ?
>
150 <?php
foreach( array('contributions', 'emailuser', 'upload', 'specialpages') as $special ) { ?
>
151 <?php
if($this->data
['nav_urls'][$special]) {?
><li id
="t-<?php echo $special ?>"><a href
="<?php
152 echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
153 ?>"><?php
$this->msg($special) ?
></a
></li
><?php
} ?
>
158 <?php
if( $this->data
['language_urls'] ) { ?
><div id
="p-lang" class="portlet">
159 <h5
><?php
$this->msg('otherlanguages') ?
></h5
>
162 <?php
foreach($this->data
['language_urls'] as $langlink) { ?
>
164 <a href
="<?php echo htmlspecialchars($langlink['href'])
165 ?>"><?php
echo htmlspecialchars($langlink['text']) ?
></a
>
172 </div
><!-- end of the
left (by
default at least
) column
-->
173 <div
class="visualClear"></div
>
175 <?php
if($this->data
['poweredbyico']) { ?
><div id
="f-poweredbyico"><?php
$this->html('poweredbyico') ?
></div
><?php
} ?
>
176 <?php
if($this->data
['copyrightico']) { ?
><div id
="f-copyrightico"><?php
$this->html('copyrightico') ?
></div
><?php
} ?
>
178 <?php
if($this->data
['lastmod' ]) { ?
><li id
="f-lastmod"><?php
$this->html('lastmod') ?
></li
><?php
} ?
>
179 <?php
if($this->data
['viewcount' ]) { ?
><li id
="f-viewcount"><?php
$this->html('viewcount') ?
></li
><?php
} ?
>
180 <?php
if($this->data
['credits' ]) { ?
><li id
="f-credits"><?php
$this->html('credits') ?
></li
><?php
} ?
>
181 <?php
if($this->data
['copyright' ]) { ?
><li id
="f-copyright"><?php
$this->html('copyright') ?
></li
><?php
} ?
>
182 <?php
if($this->data
['about' ]) { ?
><li id
="f-about"><?php
$this->html('about') ?
></li
><?php
} ?
>
183 <?php
if($this->data
['disclaimer']) { ?
><li id
="f-disclaimer"><?php
$this->html('disclaimer') ?
></li
><?php
} ?
>
187 <?php
$this->html('reporttime') ?
>