Index: trunk/phase3/skins/Modern.php |
— | — | @@ -1,369 +1,369 @@ |
2 | | -<?php
|
3 | | -/**
|
4 | | - * Modern skin, derived from monobook template.
|
5 | | - *
|
6 | | - * @todo document
|
7 | | - * @file
|
8 | | - * @ingroup Skins
|
9 | | - */
|
10 | | -
|
11 | | -if( !defined( 'MEDIAWIKI' ) )
|
12 | | - die( -1 );
|
13 | | -
|
14 | | -/**
|
15 | | - * Inherit main code from SkinTemplate, set the CSS and template filter.
|
16 | | - * @todo document
|
17 | | - * @ingroup Skins
|
18 | | - */
|
19 | | -class SkinModern extends SkinTemplate {
|
20 | | - /*
|
21 | | - * We don't like the default getPoweredBy, the icon clashes with the
|
22 | | - * skin L&F.
|
23 | | - */
|
24 | | - function getPoweredBy() {
|
25 | | - global $wgVersion;
|
26 | | - return "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
|
27 | | - }
|
28 | | -
|
29 | | - function initPage( OutputPage $out ) {
|
30 | | - parent::initPage( $out );
|
31 | | - $this->skinname = 'modern';
|
32 | | - $this->stylename = 'modern';
|
33 | | - $this->template = 'ModernTemplate';
|
34 | | - }
|
35 | | -
|
36 | | - function setupSkinUserCss( OutputPage $out ){
|
37 | | - // Do not call parent::setupSkinUserCss(), we have our own print style
|
38 | | - $out->addStyle( 'common/shared.css', 'screen' );
|
39 | | - $out->addStyle( 'modern/main.css', 'screen' );
|
40 | | - $out->addStyle( 'modern/print.css', 'print' );
|
41 | | - $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' );
|
42 | | - }
|
43 | | -}
|
44 | | -
|
45 | | -/**
|
46 | | - * @todo document
|
47 | | - * @ingroup Skins
|
48 | | - */
|
49 | | -class ModernTemplate extends QuickTemplate {
|
50 | | - var $skin;
|
51 | | - /**
|
52 | | - * Template filter callback for Modern skin.
|
53 | | - * Takes an associative array of data set from a SkinTemplate-based
|
54 | | - * class, and a wrapper for MediaWiki's localization database, and
|
55 | | - * outputs a formatted page.
|
56 | | - *
|
57 | | - * @access private
|
58 | | - */
|
59 | | - function execute() {
|
60 | | - global $wgRequest;
|
61 | | - $this->skin = $skin = $this->data['skin'];
|
62 | | - $action = $wgRequest->getText( 'action' );
|
63 | | -
|
64 | | - // Suppress warnings to prevent notices about missing indexes in $this->data
|
65 | | - wfSuppressWarnings();
|
66 | | -
|
67 | | -?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
68 | | -<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
|
69 | | - foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
|
70 | | - ?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
|
71 | | - } ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
|
72 | | - <head>
|
73 | | - <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
|
74 | | - <?php $this->html('headlinks') ?>
|
75 | | - <title><?php $this->text('pagetitle') ?></title>
|
76 | | - <?php $this->html('csslinks') ?>
|
77 | | - <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
|
78 | | -
|
79 | | - <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
|
80 | | -
|
81 | | - <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
|
82 | | - <!-- Head Scripts -->
|
83 | | -<?php $this->html('headscripts') ?>
|
84 | | -<?php if($this->data['jsvarurl' ]) { ?>
|
85 | | - <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"><!-- site js --></script>
|
86 | | -<?php } ?>
|
87 | | -<?php if($this->data['pagecss' ]) { ?>
|
88 | | - <style type="text/css"><?php $this->html('pagecss' ) ?></style>
|
89 | | -<?php }
|
90 | | - if($this->data['usercss' ]) { ?>
|
91 | | - <style type="text/css"><?php $this->html('usercss' ) ?></style>
|
92 | | -<?php }
|
93 | | - if($this->data['userjs' ]) { ?>
|
94 | | - <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
|
95 | | -<?php }
|
96 | | - if($this->data['userjsprev']) { ?>
|
97 | | - <script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
|
98 | | -<?php }
|
99 | | - if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
|
100 | | - </head>
|
101 | | -<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
|
102 | | -<?php if($this->data['body_onload' ]) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
|
103 | | - class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">
|
104 | | -
|
105 | | - <!-- heading -->
|
106 | | - <div id="mw_header"><h1 id="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div>
|
107 | | -
|
108 | | - <div id="mw_main">
|
109 | | - <div id="mw_contentwrapper">
|
110 | | - <!-- navigation portlet -->
|
111 | | - <div id="p-cactions" class="portlet">
|
112 | | - <h5><?php $this->msg('views') ?></h5>
|
113 | | - <div class="pBody">
|
114 | | - <ul>
|
115 | | - <?php foreach($this->data['content_actions'] as $key => $tab) {
|
116 | | - echo '
|
117 | | - <li id="ca-' . Sanitizer::escapeId($key).'"';
|
118 | | - if( $tab['class'] ) {
|
119 | | - echo ' class="'.htmlspecialchars($tab['class']).'"';
|
120 | | - }
|
121 | | - echo'><a href="'.htmlspecialchars($tab['href']).'"';
|
122 | | - # We don't want to give the watch tab an accesskey if the
|
123 | | - # page is being edited, because that conflicts with the
|
124 | | - # accesskey on the watch checkbox. We also don't want to
|
125 | | - # give the edit tab an accesskey, because that's fairly su-
|
126 | | - # perfluous and conflicts with an accesskey (Ctrl-E) often
|
127 | | - # used for editing in Safari.
|
128 | | - if( in_array( $action, array( 'edit', 'submit' ) )
|
129 | | - && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
|
130 | | - echo $skin->tooltip( "ca-$key" );
|
131 | | - } else {
|
132 | | - echo $skin->tooltipAndAccesskey( "ca-$key" );
|
133 | | - }
|
134 | | - echo '>'.htmlspecialchars($tab['text']).'</a></li>';
|
135 | | - } ?>
|
136 | | - </ul>
|
137 | | - </div>
|
138 | | - </div>
|
139 | | -
|
140 | | - <!-- content -->
|
141 | | - <div id="mw_content">
|
142 | | - <!-- contentholder does nothing by default, but it allows users to style the text inside
|
143 | | - the content area without affecting the meaning of 'em' in #mw_content, which is used
|
144 | | - for the margins -->
|
145 | | - <div id="mw_contentholder">
|
146 | | - <div class='mw-topboxes'>
|
147 | | - <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
|
148 | | - <?php if($this->data['newtalk'] ) {
|
149 | | - ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div>
|
150 | | - <?php } ?>
|
151 | | - <?php if($this->data['sitenotice']) {
|
152 | | - ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
|
153 | | - <?php } ?>
|
154 | | - </div>
|
155 | | -
|
156 | | - <div id="contentSub"><?php $this->html('subtitle') ?></div>
|
157 | | -
|
158 | | - <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
|
159 | | - <?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 } ?>
|
160 | | -
|
161 | | - <?php $this->html('bodytext') ?>
|
162 | | - <div class='mw_clear'></div>
|
163 | | - <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
|
164 | | - <?php $this->html ('dataAfterContent') ?>
|
165 | | - </div><!-- mw_contentholder -->
|
166 | | - </div><!-- mw_content -->
|
167 | | - </div><!-- mw_contentwrapper -->
|
168 | | -
|
169 | | - <div id="mw_portlets">
|
170 | | -
|
171 | | - <!-- portlets -->
|
172 | | - <?php
|
173 | | - $sidebar = $this->data['sidebar'];
|
174 | | - if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
|
175 | | - if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
|
176 | | - if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
|
177 | | -
|
178 | | - foreach ($sidebar as $boxName => $cont) {
|
179 | | - if ( $boxName == 'SEARCH' ) {
|
180 | | - $this->searchBox();
|
181 | | - } elseif ( $boxName == 'TOOLBOX' ) {
|
182 | | - $this->toolbox();
|
183 | | - } elseif ( $boxName == 'LANGUAGES' ) {
|
184 | | - $this->languageBox();
|
185 | | - } else {
|
186 | | - $this->customBox( $boxName, $cont );
|
187 | | - }
|
188 | | - }
|
189 | | - ?>
|
190 | | -
|
191 | | - </div><!-- mw_portlets -->
|
192 | | -
|
193 | | -
|
194 | | - </div><!-- main -->
|
195 | | -
|
196 | | - <div class="mw_clear"></div>
|
197 | | -
|
198 | | - <!-- personal portlet -->
|
199 | | - <div class="portlet" id="p-personal">
|
200 | | - <h5><?php $this->msg('personaltools') ?></h5>
|
201 | | - <div class="pBody">
|
202 | | - <ul>
|
203 | | -<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
|
204 | | - <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
|
205 | | - if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
|
206 | | - echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
|
207 | | - if(!empty($item['class'])) { ?> class="<?php
|
208 | | - echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
|
209 | | - echo htmlspecialchars($item['text']) ?></a></li>
|
210 | | -<?php } ?>
|
211 | | - </ul>
|
212 | | - </div>
|
213 | | - </div>
|
214 | | -
|
215 | | -
|
216 | | - <!-- footer -->
|
217 | | - <div id="footer">
|
218 | | - <ul id="f-list">
|
219 | | -<?php
|
220 | | - $footerlinks = array(
|
221 | | - 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
|
222 | | - 'privacy', 'about', 'disclaimer', 'tagline',
|
223 | | - );
|
224 | | - foreach( $footerlinks as $aLink ) {
|
225 | | - if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
|
226 | | -?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
|
227 | | -<?php }
|
228 | | - }
|
229 | | -?>
|
230 | | - </ul>
|
231 | | - <?php echo $this->html("poweredbyico"); ?>
|
232 | | - </div>
|
233 | | -
|
234 | | - <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
|
235 | | -<?php $this->html('reporttime') ?>
|
236 | | -<?php if ( $this->data['debug'] ): ?>
|
237 | | -<!-- Debug output:
|
238 | | -<?php $this->text( 'debug' ); ?>
|
239 | | -<?php endif; ?>
|
240 | | -</body></html>
|
241 | | -<?php
|
242 | | - wfRestoreWarnings();
|
243 | | - } // end of execute() method
|
244 | | -
|
245 | | - /*************************************************************************************************/
|
246 | | - function searchBox() {
|
247 | | -?>
|
248 | | - <!-- search -->
|
249 | | - <div id="p-search" class="portlet">
|
250 | | - <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
|
251 | | - <div id="searchBody" class="pBody">
|
252 | | - <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
|
253 | | - <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
|
254 | | - if( isset( $this->data['search'] ) ) {
|
255 | | - ?> value="<?php $this->text('search') ?>"<?php } ?> />
|
256 | | - <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
|
257 | | - <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
|
258 | | - </div></form>
|
259 | | - </div><!-- pBody -->
|
260 | | - </div><!-- portlet -->
|
261 | | -<?php
|
262 | | - }
|
263 | | -
|
264 | | - /*************************************************************************************************/
|
265 | | - function toolbox() {
|
266 | | -?>
|
267 | | - <!-- toolbox -->
|
268 | | - <div class="portlet" id="p-tb">
|
269 | | - <h5><?php $this->msg('toolbox') ?></h5>
|
270 | | - <div class="pBody">
|
271 | | - <ul>
|
272 | | -<?php
|
273 | | - if($this->data['notspecialpage']) { ?>
|
274 | | - <li id="t-whatlinkshere"><a href="<?php
|
275 | | - echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
|
276 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
|
277 | | -<?php
|
278 | | - if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
|
279 | | - <li id="t-recentchangeslinked"><a href="<?php
|
280 | | - echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
|
281 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
|
282 | | -<?php }
|
283 | | - }
|
284 | | - if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
|
285 | | - <li id="t-trackbacklink"><a href="<?php
|
286 | | - echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
|
287 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
|
288 | | -<?php }
|
289 | | - if($this->data['feeds']) { ?>
|
290 | | - <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
|
291 | | - ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
|
292 | | - echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
|
293 | | - <?php } ?></li><?php
|
294 | | - }
|
295 | | -
|
296 | | - foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
|
297 | | -
|
298 | | - if($this->data['nav_urls'][$special]) {
|
299 | | - ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
|
300 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
|
301 | | -<?php }
|
302 | | - }
|
303 | | -
|
304 | | - if(!empty($this->data['nav_urls']['print']['href'])) { ?>
|
305 | | - <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
|
306 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
|
307 | | - }
|
308 | | -
|
309 | | - if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
|
310 | | - <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
|
311 | | - ?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
|
312 | | - } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
|
313 | | - <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
|
314 | | - }
|
315 | | -
|
316 | | - wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
|
317 | | -?> </ul>
|
318 | | - </div><!-- pBody -->
|
319 | | - </div><!-- portlet -->
|
320 | | -<?php
|
321 | | - }
|
322 | | -
|
323 | | - /*************************************************************************************************/
|
324 | | - function languageBox() {
|
325 | | -?>
|
326 | | - <!-- languages -->
|
327 | | -<?php
|
328 | | - if( $this->data['language_urls'] ) { ?>
|
329 | | - <div id="p-lang" class="portlet">
|
330 | | - <h5><?php $this->msg('otherlanguages') ?></h5>
|
331 | | - <div class="pBody">
|
332 | | - <ul>
|
333 | | -<?php foreach($this->data['language_urls'] as $langlink) { ?>
|
334 | | - <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
|
335 | | - ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
|
336 | | -<?php } ?>
|
337 | | - </ul>
|
338 | | - </div><!-- pBody -->
|
339 | | - </div><!-- portlet -->
|
340 | | -<?php
|
341 | | - }
|
342 | | - }
|
343 | | -
|
344 | | - /*************************************************************************************************/
|
345 | | - function customBox( $bar, $cont ) {
|
346 | | -?>
|
347 | | - <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
|
348 | | - <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
|
349 | | - <div class='pBody'>
|
350 | | -<?php if ( is_array( $cont ) ) { ?>
|
351 | | - <ul>
|
352 | | -<?php foreach($cont as $key => $val) { ?>
|
353 | | - <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
|
354 | | - if ( $val['active'] ) { ?> class="active" <?php }
|
355 | | - ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
|
356 | | -<?php } ?>
|
357 | | - </ul>
|
358 | | -<?php } else {
|
359 | | - # allow raw HTML block to be defined by extensions
|
360 | | - print $cont;
|
361 | | - }
|
362 | | -?>
|
363 | | - </div><!-- pBody -->
|
364 | | - </div><!-- portlet -->
|
365 | | -<?php
|
366 | | - }
|
367 | | -
|
368 | | -} // end of class
|
369 | | -?>
|
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Modern skin, derived from monobook template. |
| 5 | + * |
| 6 | + * @todo document |
| 7 | + * @file |
| 8 | + * @ingroup Skins |
| 9 | + */ |
| 10 | + |
| 11 | +if( !defined( 'MEDIAWIKI' ) ) |
| 12 | + die( -1 ); |
| 13 | + |
| 14 | +/** |
| 15 | + * Inherit main code from SkinTemplate, set the CSS and template filter. |
| 16 | + * @todo document |
| 17 | + * @ingroup Skins |
| 18 | + */ |
| 19 | +class SkinModern extends SkinTemplate { |
| 20 | + /* |
| 21 | + * We don't like the default getPoweredBy, the icon clashes with the |
| 22 | + * skin L&F. |
| 23 | + */ |
| 24 | + function getPoweredBy() { |
| 25 | + global $wgVersion; |
| 26 | + return "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>"; |
| 27 | + } |
| 28 | + |
| 29 | + function initPage( OutputPage $out ) { |
| 30 | + parent::initPage( $out ); |
| 31 | + $this->skinname = 'modern'; |
| 32 | + $this->stylename = 'modern'; |
| 33 | + $this->template = 'ModernTemplate'; |
| 34 | + } |
| 35 | + |
| 36 | + function setupSkinUserCss( OutputPage $out ){ |
| 37 | + // Do not call parent::setupSkinUserCss(), we have our own print style |
| 38 | + $out->addStyle( 'common/shared.css', 'screen' ); |
| 39 | + $out->addStyle( 'modern/main.css', 'screen' ); |
| 40 | + $out->addStyle( 'modern/print.css', 'print' ); |
| 41 | + $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' ); |
| 42 | + } |
| 43 | +} |
| 44 | + |
| 45 | +/** |
| 46 | + * @todo document |
| 47 | + * @ingroup Skins |
| 48 | + */ |
| 49 | +class ModernTemplate extends QuickTemplate { |
| 50 | + var $skin; |
| 51 | + /** |
| 52 | + * Template filter callback for Modern skin. |
| 53 | + * Takes an associative array of data set from a SkinTemplate-based |
| 54 | + * class, and a wrapper for MediaWiki's localization database, and |
| 55 | + * outputs a formatted page. |
| 56 | + * |
| 57 | + * @access private |
| 58 | + */ |
| 59 | + function execute() { |
| 60 | + global $wgRequest; |
| 61 | + $this->skin = $skin = $this->data['skin']; |
| 62 | + $action = $wgRequest->getText( 'action' ); |
| 63 | + |
| 64 | + // Suppress warnings to prevent notices about missing indexes in $this->data |
| 65 | + wfSuppressWarnings(); |
| 66 | + |
| 67 | +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 68 | +<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php |
| 69 | + foreach($this->data['xhtmlnamespaces'] as $tag => $ns) { |
| 70 | + ?>xmlns:<?php echo "{$tag}=\"{$ns}\" "; |
| 71 | + } ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>"> |
| 72 | + <head> |
| 73 | + <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" /> |
| 74 | + <?php $this->html('headlinks') ?> |
| 75 | + <title><?php $this->text('pagetitle') ?></title> |
| 76 | + <?php $this->html('csslinks') ?> |
| 77 | + <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 78 | + |
| 79 | + <?php print Skin::makeGlobalVariablesScript( $this->data ); ?> |
| 80 | + |
| 81 | + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script> |
| 82 | + <!-- Head Scripts --> |
| 83 | +<?php $this->html('headscripts') ?> |
| 84 | +<?php if($this->data['jsvarurl' ]) { ?> |
| 85 | + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"><!-- site js --></script> |
| 86 | +<?php } ?> |
| 87 | +<?php if($this->data['pagecss' ]) { ?> |
| 88 | + <style type="text/css"><?php $this->html('pagecss' ) ?></style> |
| 89 | +<?php } |
| 90 | + if($this->data['usercss' ]) { ?> |
| 91 | + <style type="text/css"><?php $this->html('usercss' ) ?></style> |
| 92 | +<?php } |
| 93 | + if($this->data['userjs' ]) { ?> |
| 94 | + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script> |
| 95 | +<?php } |
| 96 | + if($this->data['userjsprev']) { ?> |
| 97 | + <script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script> |
| 98 | +<?php } |
| 99 | + if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?> |
| 100 | + </head> |
| 101 | +<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> |
| 102 | +<?php if($this->data['body_onload' ]) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?> |
| 103 | + class="mediawiki <?php $this->text('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>"> |
| 104 | + |
| 105 | + <!-- heading --> |
| 106 | + <div id="mw_header"><h1 id="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1></div> |
| 107 | + |
| 108 | + <div id="mw_main"> |
| 109 | + <div id="mw_contentwrapper"> |
| 110 | + <!-- navigation portlet --> |
| 111 | + <div id="p-cactions" class="portlet"> |
| 112 | + <h5><?php $this->msg('views') ?></h5> |
| 113 | + <div class="pBody"> |
| 114 | + <ul> |
| 115 | + <?php foreach($this->data['content_actions'] as $key => $tab) { |
| 116 | + echo ' |
| 117 | + <li id="ca-' . Sanitizer::escapeId($key).'"'; |
| 118 | + if( $tab['class'] ) { |
| 119 | + echo ' class="'.htmlspecialchars($tab['class']).'"'; |
| 120 | + } |
| 121 | + echo'><a href="'.htmlspecialchars($tab['href']).'"'; |
| 122 | + # We don't want to give the watch tab an accesskey if the |
| 123 | + # page is being edited, because that conflicts with the |
| 124 | + # accesskey on the watch checkbox. We also don't want to |
| 125 | + # give the edit tab an accesskey, because that's fairly su- |
| 126 | + # perfluous and conflicts with an accesskey (Ctrl-E) often |
| 127 | + # used for editing in Safari. |
| 128 | + if( in_array( $action, array( 'edit', 'submit' ) ) |
| 129 | + && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) { |
| 130 | + echo $skin->tooltip( "ca-$key" ); |
| 131 | + } else { |
| 132 | + echo $skin->tooltipAndAccesskey( "ca-$key" ); |
| 133 | + } |
| 134 | + echo '>'.htmlspecialchars($tab['text']).'</a></li>'; |
| 135 | + } ?> |
| 136 | + </ul> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + |
| 140 | + <!-- content --> |
| 141 | + <div id="mw_content"> |
| 142 | + <!-- contentholder does nothing by default, but it allows users to style the text inside |
| 143 | + the content area without affecting the meaning of 'em' in #mw_content, which is used |
| 144 | + for the margins --> |
| 145 | + <div id="mw_contentholder"> |
| 146 | + <div class='mw-topboxes'> |
| 147 | + <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div> |
| 148 | + <?php if($this->data['newtalk'] ) { |
| 149 | + ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div> |
| 150 | + <?php } ?> |
| 151 | + <?php if($this->data['sitenotice']) { |
| 152 | + ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div> |
| 153 | + <?php } ?> |
| 154 | + </div> |
| 155 | + |
| 156 | + <div id="contentSub"><?php $this->html('subtitle') ?></div> |
| 157 | + |
| 158 | + <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?> |
| 159 | + <?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 } ?> |
| 160 | + |
| 161 | + <?php $this->html('bodytext') ?> |
| 162 | + <div class='mw_clear'></div> |
| 163 | + <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?> |
| 164 | + <?php $this->html ('dataAfterContent') ?> |
| 165 | + </div><!-- mw_contentholder --> |
| 166 | + </div><!-- mw_content --> |
| 167 | + </div><!-- mw_contentwrapper --> |
| 168 | + |
| 169 | + <div id="mw_portlets"> |
| 170 | + |
| 171 | + <!-- portlets --> |
| 172 | + <?php |
| 173 | + $sidebar = $this->data['sidebar']; |
| 174 | + if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; |
| 175 | + if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; |
| 176 | + if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; |
| 177 | + |
| 178 | + foreach ($sidebar as $boxName => $cont) { |
| 179 | + if ( $boxName == 'SEARCH' ) { |
| 180 | + $this->searchBox(); |
| 181 | + } elseif ( $boxName == 'TOOLBOX' ) { |
| 182 | + $this->toolbox(); |
| 183 | + } elseif ( $boxName == 'LANGUAGES' ) { |
| 184 | + $this->languageBox(); |
| 185 | + } else { |
| 186 | + $this->customBox( $boxName, $cont ); |
| 187 | + } |
| 188 | + } |
| 189 | + ?> |
| 190 | + |
| 191 | + </div><!-- mw_portlets --> |
| 192 | + |
| 193 | + |
| 194 | + </div><!-- main --> |
| 195 | + |
| 196 | + <div class="mw_clear"></div> |
| 197 | + |
| 198 | + <!-- personal portlet --> |
| 199 | + <div class="portlet" id="p-personal"> |
| 200 | + <h5><?php $this->msg('personaltools') ?></h5> |
| 201 | + <div class="pBody"> |
| 202 | + <ul> |
| 203 | +<?php foreach($this->data['personal_urls'] as $key => $item) { ?> |
| 204 | + <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php |
| 205 | + if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php |
| 206 | + echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php |
| 207 | + if(!empty($item['class'])) { ?> class="<?php |
| 208 | + echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php |
| 209 | + echo htmlspecialchars($item['text']) ?></a></li> |
| 210 | +<?php } ?> |
| 211 | + </ul> |
| 212 | + </div> |
| 213 | + </div> |
| 214 | + |
| 215 | + |
| 216 | + <!-- footer --> |
| 217 | + <div id="footer"> |
| 218 | + <ul id="f-list"> |
| 219 | +<?php |
| 220 | + $footerlinks = array( |
| 221 | + 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', |
| 222 | + 'privacy', 'about', 'disclaimer', 'tagline', |
| 223 | + ); |
| 224 | + foreach( $footerlinks as $aLink ) { |
| 225 | + if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { |
| 226 | +?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> |
| 227 | +<?php } |
| 228 | + } |
| 229 | +?> |
| 230 | + </ul> |
| 231 | + <?php echo $this->html("poweredbyico"); ?> |
| 232 | + </div> |
| 233 | + |
| 234 | + <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> |
| 235 | +<?php $this->html('reporttime') ?> |
| 236 | +<?php if ( $this->data['debug'] ): ?> |
| 237 | +<!-- Debug output: |
| 238 | +<?php $this->text( 'debug' ); ?> |
| 239 | +--> |
| 240 | +<?php endif; ?> |
| 241 | +</body></html> |
| 242 | +<?php |
| 243 | + wfRestoreWarnings(); |
| 244 | + } // end of execute() method |
| 245 | + |
| 246 | + /*************************************************************************************************/ |
| 247 | + function searchBox() { |
| 248 | +?> |
| 249 | + <!-- search --> |
| 250 | + <div id="p-search" class="portlet"> |
| 251 | + <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> |
| 252 | + <div id="searchBody" class="pBody"> |
| 253 | + <form action="<?php $this->text('searchaction') ?>" id="searchform"><div> |
| 254 | + <input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search'); |
| 255 | + if( isset( $this->data['search'] ) ) { |
| 256 | + ?> value="<?php $this->text('search') ?>"<?php } ?> /> |
| 257 | + <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> /> |
| 258 | + <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /> |
| 259 | + </div></form> |
| 260 | + </div><!-- pBody --> |
| 261 | + </div><!-- portlet --> |
| 262 | +<?php |
| 263 | + } |
| 264 | + |
| 265 | + /*************************************************************************************************/ |
| 266 | + function toolbox() { |
| 267 | +?> |
| 268 | + <!-- toolbox --> |
| 269 | + <div class="portlet" id="p-tb"> |
| 270 | + <h5><?php $this->msg('toolbox') ?></h5> |
| 271 | + <div class="pBody"> |
| 272 | + <ul> |
| 273 | +<?php |
| 274 | + if($this->data['notspecialpage']) { ?> |
| 275 | + <li id="t-whatlinkshere"><a href="<?php |
| 276 | + echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) |
| 277 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li> |
| 278 | +<?php |
| 279 | + if( $this->data['nav_urls']['recentchangeslinked'] ) { ?> |
| 280 | + <li id="t-recentchangeslinked"><a href="<?php |
| 281 | + echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) |
| 282 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li> |
| 283 | +<?php } |
| 284 | + } |
| 285 | + if(isset($this->data['nav_urls']['trackbacklink'])) { ?> |
| 286 | + <li id="t-trackbacklink"><a href="<?php |
| 287 | + echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href']) |
| 288 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li> |
| 289 | +<?php } |
| 290 | + if($this->data['feeds']) { ?> |
| 291 | + <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) { |
| 292 | + ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php |
| 293 | + echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span> |
| 294 | + <?php } ?></li><?php |
| 295 | + } |
| 296 | + |
| 297 | + foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { |
| 298 | + |
| 299 | + if($this->data['nav_urls'][$special]) { |
| 300 | + ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) |
| 301 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li> |
| 302 | +<?php } |
| 303 | + } |
| 304 | + |
| 305 | + if(!empty($this->data['nav_urls']['print']['href'])) { ?> |
| 306 | + <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href']) |
| 307 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php |
| 308 | + } |
| 309 | + |
| 310 | + if(!empty($this->data['nav_urls']['permalink']['href'])) { ?> |
| 311 | + <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href']) |
| 312 | + ?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php |
| 313 | + } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> |
| 314 | + <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php |
| 315 | + } |
| 316 | + |
| 317 | + wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); |
| 318 | +?> </ul> |
| 319 | + </div><!-- pBody --> |
| 320 | + </div><!-- portlet --> |
| 321 | +<?php |
| 322 | + } |
| 323 | + |
| 324 | + /*************************************************************************************************/ |
| 325 | + function languageBox() { |
| 326 | +?> |
| 327 | + <!-- languages --> |
| 328 | +<?php |
| 329 | + if( $this->data['language_urls'] ) { ?> |
| 330 | + <div id="p-lang" class="portlet"> |
| 331 | + <h5><?php $this->msg('otherlanguages') ?></h5> |
| 332 | + <div class="pBody"> |
| 333 | + <ul> |
| 334 | +<?php foreach($this->data['language_urls'] as $langlink) { ?> |
| 335 | + <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php |
| 336 | + ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li> |
| 337 | +<?php } ?> |
| 338 | + </ul> |
| 339 | + </div><!-- pBody --> |
| 340 | + </div><!-- portlet --> |
| 341 | +<?php |
| 342 | + } |
| 343 | + } |
| 344 | + |
| 345 | + /*************************************************************************************************/ |
| 346 | + function customBox( $bar, $cont ) { |
| 347 | +?> |
| 348 | + <div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>> |
| 349 | + <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5> |
| 350 | + <div class='pBody'> |
| 351 | +<?php if ( is_array( $cont ) ) { ?> |
| 352 | + <ul> |
| 353 | +<?php foreach($cont as $key => $val) { ?> |
| 354 | + <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php |
| 355 | + if ( $val['active'] ) { ?> class="active" <?php } |
| 356 | + ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li> |
| 357 | +<?php } ?> |
| 358 | + </ul> |
| 359 | +<?php } else { |
| 360 | + # allow raw HTML block to be defined by extensions |
| 361 | + print $cont; |
| 362 | + } |
| 363 | +?> |
| 364 | + </div><!-- pBody --> |
| 365 | + </div><!-- portlet --> |
| 366 | +<?php |
| 367 | + } |
| 368 | + |
| 369 | +} // end of class |
| 370 | +?> |
Property changes on: trunk/phase3/skins/Modern.php |
___________________________________________________________________ |
Added: svn:eol-style |
370 | 371 | + native |