2 # Generic PHPTal (http://phptal.sourceforge.net/) skin
3 # Based on Brion's smarty skin
4 # Copyright (C) Gabriel Wicke -- http://www.aulinx.de/
6 # Todo: Needs some serious refactoring into functions that correspond
7 # to the computations individual esi snippets need. Most importantly no body
8 # parsing for most of those of course.
10 # Set this in LocalSettings to enable phptal:
11 # set_include_path(get_include_path() . ":" . $IP.'/PHPTAL-NP-0.7.0/libs');
12 # $wgUsePHPTal = true;
14 # This program is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write to the Free Software Foundation, Inc.,
26 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 # http://www.gnu.org/copyleft/gpl.html
29 require_once "GlobalFunctions.php";
31 require_once $IP."/PHPTAL-NP-0.7.0/libs/PHPTAL.php";
33 class MediaWiki_I18N
extends PHPTAL_I18N
35 var $_context = array();
37 function set($varName, $value) {
38 $this->_context
[$varName] = $value;
41 function translate($value) {
42 $value = wfMsg( $value );
43 // interpolate variables
44 while (preg_match('/\$([0-9]*?)/sm', $value, $m)) {
45 list($src, $var) = $m;
47 $varValue = $this->_context
[$var];
49 $value = str_replace($src, $varValue, $value);
55 class SkinPHPTal
extends Skin
{
58 function initPage( &$out ) {
59 parent
::initPage( $out );
60 $this->skinname
= "davinci";
61 $this->template
= "xhtml_slim";
64 function outputPage( &$out ) {
65 global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
66 global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
67 global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
68 global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgSiteNotice;
69 global $wgMaxCredits, $wgShowCreditsIfMax;
71 extract( $wgRequest->getValues( 'oldid', 'diff' ) );
73 $this->initPage( $out );
74 $tpl = new PHPTAL($this->template
. '.pt', 'templates');
76 #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText
77 $tpl->setTranslator(new MediaWiki_I18N());
80 $this->thispage
= $wgTitle->getPrefixedDbKey();
81 $this->thisurl
= $wgTitle->getPrefixedURL();
82 $this->loggedin
= $wgUser->getID() != 0;
83 $this->iscontent
= ($wgTitle->getNamespace() != Namespace::getSpecial() );
84 $this->iseditable
= ($this->iscontent
and !($action == 'edit' or $action == 'submit'));
85 $this->username
= $wgUser->getName();
86 $this->userpage
= $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
87 $this->userpageUrlDetails
= $this->makeUrlDetails($this->userpage
);
89 $this->usercss
= $this->userjs
= $this->userjsprev
= false;
90 $this->setupUserCssJs();
92 $this->titletxt
= $wgTitle->getPrefixedText();
94 $tpl->set( "title", $wgOut->getPageTitle() );
95 $tpl->set( "pagetitle", $wgOut->getHTMLTitle() );
97 $tpl->setRef( "thispage", $this->thispage
);
98 $subpagestr = $this->subPageSubtitle();
100 "subtitle", !empty($subpagestr)?
101 '<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle():
104 $undelete = $this->getUndeleteLink();
106 "undelete", !empty($undelete)?
107 '<span class="subpages">'.$undelete.'</span>':
111 $tpl->set( 'catlinks', $this->getCategories());
112 if( $wgOut->isSyndicated() ) {
114 foreach( $wgFeedClasses as $format => $class ) {
115 $feeds[$format] = array(
117 'href' => $wgRequest->appendQuery( "feed=$format" ),
118 'ttip' => wfMsg('tooltip-'.$format)
121 $tpl->setRef( 'feeds', $feeds );
123 $tpl->setRef( 'mimetype', $wgMimeType );
124 $tpl->setRef( 'charset', $wgOutputEncoding );
125 $tpl->set( 'headlinks', $out->getHeadLinks() );
126 $tpl->setRef( 'skinname', $this->skinname
);
127 $tpl->setRef( "loggedin", $this->loggedin
);
128 $tpl->set('nsclass', 'ns-'.$wgTitle->getNamespace());
129 /* XXX currently unused, might get useful later
130 $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) );
131 $tpl->set( "exists", $wgTitle->getArticleID() != 0 );
132 $tpl->set( "watch", $wgTitle->userIsWatching() ? "unwatch" : "watch" );
133 $tpl->set( "protect", count($wgTitle->getRestrictions()) ? "unprotect" : "protect" );
134 $tpl->set( "helppage", wfMsg('helppage'));
135 $tpl->set( "sysop", $wgUser->isSysop() );
137 $tpl->set( "searchaction", $this->escapeSearchLink() );
138 $tpl->setRef( "stylepath", $wgStylePath );
139 $tpl->setRef( "logopath", $wgLogo );
140 $tpl->setRef( "lang", $wgLanguageCode );
141 $tpl->set( "dir", $wgLang->isRTL() ?
"rtl" : "ltr" );
142 $tpl->set( "rtl", $wgLang->isRTL() );
143 $tpl->set( "langname", $wgLang->getLanguageName( $wgLanguageCode ) );
144 $tpl->setRef( "username", $this->username
);
145 $tpl->setRef( "userpage", $this->userpage
);
146 $tpl->setRef( "userpageurl", $this->userpageUrlDetails
['href']);
147 $tpl->setRef( "usercss", $this->usercss
);
148 $tpl->setRef( "userjs", $this->userjs
);
149 $tpl->setRef( "userjsprev", $this->userjsprev
);
150 if($this->loggedin
) {
151 $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&smaxage=0&gen=js') );
153 $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js') );
155 if( $wgUser->getNewtalk() ) {
156 $usertitle = Title
::newFromText( $this->userpage
);
157 $usertalktitle = $usertitle->getTalkPage();
158 if($usertalktitle->getPrefixedDbKey() != $this->thispage
){
160 $ntl = wfMsg( "newmessages",
161 $this->makeKnownLink(
162 $wgLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
163 . ":" . $this->username
,
164 wfMsg("newmessageslink") )
171 $tpl->setRef( "newtalk", $ntl );
172 $tpl->setRef( "skin", $this);
173 $tpl->set( "logo", $this->logoText() );
174 if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and 0 != $wgArticle->getID() ) {
175 if ( !$wgDisableCounters ) {
176 $viewcount = $wgLang->formatNum( $wgArticle->getCount() );
178 $tpl->set('viewcount', wfMsg( "viewcount", $viewcount ));
181 $tpl->set('lastmod', $this->lastModified());
182 $tpl->set('copyright',$this->getCopyright());
184 $this->credits
= false;
186 if (isset($wgMaxCredits) && $wgMaxCredits != 0) {
187 require_once("Credits.php");
188 $this->credits
= getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
191 $tpl->setRef( "credits", $this->credits
);
193 } elseif ( isset( $oldid ) && !isset( $diff ) ) {
194 $tpl->set('copyright', $this->getCopyright());
197 $tpl->set( "copyrightico", $this->getCopyrightIcon() );
198 $tpl->set( "poweredbyico", $this->getPoweredBy() );
199 $tpl->set( "disclaimer", $this->disclaimerLink() );
200 $tpl->set( "about", $this->aboutLink() );
202 $tpl->setRef( "debug", $out->mDebugtext
);
203 $tpl->set( "reporttime", $out->reportTime() );
204 $tpl->set( "sitenotice", $wgSiteNotice );
206 $tpl->setRef( "bodytext", $out->mBodytext
);
208 $language_urls = array();
209 foreach( $wgOut->getLanguageLinks() as $l ) {
210 $nt = Title
::newFromText( $l );
211 $language_urls[] = array('href' => $nt->getFullURL(),
212 'text' => ($wgLang->getLanguageName( $nt->getInterwiki()) != ''?
$wgLang->getLanguageName( $nt->getInterwiki()) : $l),
213 'class' => $wgLang->isRTL() ?
'rtl' : 'ltr');
215 if(count($language_urls)) {
216 $tpl->setRef( 'language_urls', $language_urls);
218 $tpl->set('language_urls', false);
220 $tpl->set('personal_urls', $this->buildPersonalUrls());
221 $content_actions = $this->buildContentActionUrls();
222 $tpl->setRef('content_actions', $content_actions);
223 // XXX: attach this from javascript, same with section editing
224 if($this->iseditable
&& $wgUser->getOption("editondblclick") )
226 $tpl->set('body-ondblclick', 'document.location = "' .$content_actions['edit']['href'] .'";');
228 $tpl->set('body-ondblclick', false);
230 $tpl->set( "nav_urls", $this->buildNavUrls() );
233 $res = $tpl->execute();
234 // result may be an error
235 if (PEAR
::isError($res)) {
236 echo $res->toString(), "\n";
243 # build array of urls for personal toolbar
244 function buildPersonalUrls() {
245 /* set up the default links for the personal toolbar */
246 global $wgShowIPinHeader;
247 $personal_urls = array();
248 if ($this->loggedin
) {
249 $personal_urls['userpage'] = array(
250 'text' => $this->username
,
251 'href' => &$this->userpageUrlDetails
['href'],
252 'class' => $this->userpageUrlDetails
['exists']?
false:'new'
254 $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage
);
255 $personal_urls['mytalk'] = array(
256 'text' => wfMsg('mytalk'),
257 'href' => &$usertalkUrlDetails['href'],
258 'class' => $usertalkUrlDetails['exists']?
false:'new'
260 $personal_urls['preferences'] = array(
261 'text' => wfMsg('preferences'),
262 'href' => $this->makeSpecialUrl('Preferences')
264 $personal_urls['watchlist'] = array(
265 'text' => wfMsg('watchlist'),
266 'href' => $this->makeSpecialUrl('Watchlist')
268 $personal_urls['mycontris'] = array(
269 'text' => wfMsg('mycontris'),
270 'href' => $this->makeSpecialUrl('Contributions','target=' . urlencode( $this->username
) )
272 $personal_urls['logout'] = array(
273 'text' => wfMsg('userlogout'),
274 'href' => $this->makeSpecialUrl('Userlogout','returnto=' . $this->thisurl
)
277 if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) {
278 $personal_urls['anonuserpage'] = array(
279 'text' => $this->username
,
280 'href' => &$this->userpageUrlDetails
['href'],
281 'class' => $this->userpageUrlDetails
['exists']?
false:'new'
283 $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage
);
284 $personal_urls['anontalk'] = array(
285 'text' => wfMsg('anontalk'),
286 'href' => &$usertalkUrlDetails['href'],
287 'class' => $usertalkUrlDetails['exists']?
false:'new'
289 $personal_urls['anonlogin'] = array(
290 'text' => wfMsg('userlogin'),
291 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl
)
295 $personal_urls['login'] = array(
296 'text' => wfMsg('userlogin'),
297 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl
)
302 return $personal_urls;
305 # an array of edit links by default used for the tabs
306 function buildContentActionUrls () {
307 global $wgTitle, $wgUser, $wgRequest, $wgUseValidation;
308 $action = $wgRequest->getText( 'action' );
309 $section = $wgRequest->getText( 'section' );
310 $oldid = $wgRequest->getVal( 'oldid' );
311 $diff = $wgRequest->getVal( 'diff' );
312 $content_actions = array();
314 if( $this->iscontent
) {
316 $nskey = $this->getNameSpaceKey();
317 $content_actions[$nskey] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ?
'selected' : false,
318 'text' => wfMsg($nskey),
319 'href' => $this->makeArticleUrl($this->thispage
));
321 /* set up the classes for the talk link */
322 $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ?
'selected' : false);
323 $talktitle = Title
::newFromText( $this->titletxt
);
324 $talktitle = $talktitle->getTalkPage();
325 $this->checkTitle($talktitle, $this->titletxt
);
326 if($talktitle->getArticleId() != 0) {
327 $content_actions['talk'] = array(
328 'class' => $talk_class,
329 'text' => wfMsg('talk'),
330 'href' => $this->makeTalkUrl($this->titletxt
)
333 $content_actions['talk'] = array(
334 'class' => $talk_class?
$talk_class.' new':'new',
335 'text' => wfMsg('talk'),
336 'href' => $this->makeTalkUrl($this->titletxt
,'action=edit')
340 if ( $wgTitle->userCanEdit() ) {
341 $oid = ( $oldid && ! isset( $diff ) ) ?
"&oldid={$oldid}" : false;
342 $istalk = ( Namespace::isTalk( $wgTitle->getNamespace()) );
343 $istalkclass = $istalk?
' istalk':'';
344 $content_actions['edit'] = array(
345 'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ?
'selected' : '').$istalkclass,
346 'text' => wfMsg('edit'),
347 'href' => $this->makeUrl($this->thispage
, 'action=edit'.$oid)
350 $content_actions['addsection'] = array(
351 'class' => $section == 'new'?
'selected':false,
352 'text' => wfMsg('addsection'),
353 'href' => $this->makeUrl($this->thispage
, 'action=edit§ion=new')
357 $oid = ( $oldid && ! isset( $diff ) ) ?
"&oldid={$oldid}" : '';
358 $content_actions['viewsource'] = array('class' => ($action == 'edit') ?
'selected' : false,
359 'text' => wfMsg('viewsource'),
360 'href' => $this->makeUrl($this->thispage
, 'action=edit'.$oid));
363 if ( $wgTitle->getArticleId() ) {
365 $content_actions['history'] = array('class' => ($action == 'history') ?
'selected' : false,
366 'text' => wfMsg('history_short'),
367 'href' => $this->makeUrl($this->thispage
, 'action=history'));
369 # XXX: is there a rollback action anywhere or is it planned?
370 # Don't recall where i got this from...
371 /*if( $wgUser->getNewtalk() ) {
372 $content_actions['rollback'] = array('class' => ($action == 'rollback') ? 'selected' : false,
373 'text' => wfMsg('rollback_short'),
374 'href' => $this->makeUrl($this->thispage, 'action=rollback'),
375 'ttip' => wfMsg('tooltip-rollback'),
376 'akey' => wfMsg('accesskey-rollback'));
379 if($wgUser->isSysop()){
380 if(!$wgTitle->isProtected()){
381 $content_actions['protect'] = array(
382 'class' => ($action == 'protect') ?
'selected' : false,
383 'text' => wfMsg('protect'),
384 'href' => $this->makeUrl($this->thispage
, 'action=protect')
388 $content_actions['unprotect'] = array(
389 'class' => ($action == 'unprotect') ?
'selected' : false,
390 'text' => wfMsg('unprotect'),
391 'href' => $this->makeUrl($this->thispage
, 'action=unprotect')
394 $content_actions['delete'] = array(
395 'class' => ($action == 'delete') ?
'selected' : false,
396 'text' => wfMsg('delete'),
397 'href' => $this->makeUrl($this->thispage
, 'action=delete')
400 if ( $wgUser->getID() != 0 ) {
401 if ( $wgTitle->userCanEdit()) {
402 $content_actions['move'] = array('class' => ($wgTitle->getDbKey() == 'Movepage' and $wgTitle->getNamespace
== Namespace::getSpecial()) ?
'selected' : false,
403 'text' => wfMsg('move'),
404 'href' => $this->makeSpecialUrl('Movepage', 'target='. urlencode( $this->thispage
))
407 $content_actions['move'] = array('class' => 'inactive',
408 'text' => wfMsg('move'),
414 //article doesn't exist or is deleted
415 if($wgUser->isSysop()){
416 if( $n = $wgTitle->isDeleted() ) {
417 $content_actions['delete'] = array(
419 'text' => wfMsg( "undelete_short", $n ),
420 'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage
)
426 if ( $wgUser->getID() != 0 and $action != 'edit' and $action != 'submit' ) {
427 if( !$wgTitle->userIsWatching()) {
428 $content_actions['watch'] = array('class' => ($action == 'watch' or $action == 'unwatch') ?
'selected' : false,
429 'text' => wfMsg('watch'),
430 'href' => $this->makeUrl($this->thispage
, 'action=watch'));
432 $content_actions['unwatch'] = array('class' => ($action == 'unwatch' or $action == 'watch') ?
'selected' : false,
433 'text' => wfMsg('unwatch'),
434 'href' => $this->makeUrl($this->thispage
, 'action=unwatch'));
438 if ( $wgUseValidation && $wgUser->getID() != 0 && $wgTitle->getArticleId() && $wgTitle->getNamespace() == 0 ) {
440 $article_time = "×tamp=" . $wgArticle->mTimestamp
;
441 $content_actions['validate'] = array('class' => ($action == 'validate') ?
'selected' : false ,
442 'text' => wfMsg('val_tab'),
443 'href' => $this->makeUrl($this->thispage
, "action=validate{$article_time}"));
447 /* show special page tab */
449 $content_actions['article'] = array('class' => 'selected',
450 'text' => wfMsg('specialpage'),
454 return $content_actions;
457 # build array of common navigation links
458 function buildNavUrls () {
459 global $wgTitle, $wgUser, $wgRequest;
460 global $wgSiteSupportPage;
462 $action = $wgRequest->getText( 'action' );
463 $oldid = $wgRequest->getVal( 'oldid' );
464 $diff = $wgRequest->getVal( 'diff' );
465 // XXX: remove htmlspecialchars when tal:attributes works with i18n:attributes
467 $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
468 $nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage')));
469 $nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges')));
470 $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage
))));
471 $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ?
array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
472 $nav_urls['portal'] = (wfMsg('portal') != '-') ?
array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
473 $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage
))));
474 $nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage')));
475 // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage')));
476 $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
477 $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage')));
478 $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload')));
479 $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages')));
481 if( $wgTitle->getNamespace() == NS_USER ||
$wgTitle->getNamespace() == NS_USER_TALK
) {
482 $id = User
::idFromName($wgTitle->getText());
483 $ip = User
::isIP($wgTitle->getText());
489 if($id ||
$ip) { # both anons and non-anons have contri list
490 $nav_urls['contributions'] = array(
491 'href' => htmlspecialchars( $this->makeSpecialUrl('Contributions', "target=" . $wgTitle->getPartialURL() ) )
494 if ( 0 != $wgUser->getID() ) { # show only to signed in users
495 if($id) { # can only email non-anons
496 $nav_urls['emailuser'] = array(
497 'href' => htmlspecialchars( $this->makeSpecialUrl('Emailuser', "target=" . $wgTitle->getPartialURL() ) )
506 function getNameSpaceKey () {
508 switch ($wgTitle->getNamespace()) {
516 return 'nstab-media';
518 return 'nstab-special';
524 return 'nstab-image';
526 case NS_MEDIAWIKI_TALK
:
527 return 'nstab-mediawiki';
529 case NS_TEMPLATE_TALK
:
530 return 'nstab-template';
535 case NS_CATEGORY_TALK
:
536 return 'nstab-category';
541 /* private */ function setupUserCssJs () {
542 global $wgRequest, $wgTitle;
543 $action = $wgRequest->getText('action');
545 $this->usercss
= '@import "'.$this->makeUrl('-','action=raw&gen=css').'";'."\n";
547 if( $this->loggedin
) {
548 if($wgTitle->isCssSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
550 $this->usercss
= '@import "'.$this->makeUrl('-','action=raw&smaxage=0&maxage=0&gen=css').'";'."\n";
552 $this->usercss
.= $wgRequest->getText('wpTextbox1');
555 $this->usercss
.= '@import "'.$this->makeUrl('-','action=raw&smaxage=0&gen=css').'";'."\n";
556 # import user stylesheet
557 $this->usercss
.= '@import "'.
558 $this->makeUrl($this->userpage
.'/'.$this->skinname
.'.css', 'action=raw&ctype=text/css').'";'."\n";
560 if($wgTitle->isJsSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
561 # XXX: additional security check/prompt?
562 $this->userjsprev
= $wgRequest->getText('wpTextbox1');
564 $this->userjs
= $this->makeUrl($this->userpage
.'/'.$this->skinname
.'.js', 'action=raw&ctype=text/javascript&dontcountme=s');
568 # returns css with user-specific options
569 function getUserStylesheet() {
570 global $wgUser, $wgRequest, $wgTitle, $wgLang, $wgSquidMaxage, $wgStylePath;
571 $action = $wgRequest->getText('action');
572 $maxage = $wgRequest->getText('maxage');
573 $s = "/* generated user stylesheet */\n";
574 if($wgLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->skinname
.'/rtl.css";'."\n";
576 $this->makeNSUrl(ucfirst($this->skinname
).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI
)."\";\n";
577 if($wgUser->getID() != 0) {
578 if ( 1 == $wgUser->getOption( "underline" ) ) {
579 $s .= "a { text-decoration: underline; }\n";
581 $s .= "a { text-decoration: none; }\n";
584 if ( 1 != $wgUser->getOption( "highlightbroken" ) ) {
585 $s .= "a.new, #quickbar a.new { color: #CC2200; }\n";
587 if ( 1 == $wgUser->getOption( "justify" ) ) {
588 $s .= "#bodyContent { text-align: justify; }\n";
592 function getUserJs() {
593 global $wgUser, $wgStylePath;
594 $s = "/* generated javascript */";
595 $s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';";
596 $s .= '/* MediaWiki:'.ucfirst($this->skinname
)." */\n";
597 $s .= wfMsg(ucfirst($this->skinname
).'.js');
603 class SkinDaVinci
extends SkinPHPTal
{
604 function initPage( &$out ) {
605 SkinPHPTal
::initPage( $out );
606 $this->skinname
= "davinci";
610 class SkinMono
extends SkinPHPTal
{
611 function initPage( &$out ) {
612 SkinPHPTal
::initPage( $out );
613 $this->skinname
= "mono";
617 class SkinMonoBook
extends SkinPHPTal
{
618 function initPage( &$out ) {
619 SkinPHPTal
::initPage( $out );
620 $this->skinname
= "monobook";
624 class SkinMySkin
extends SkinPHPTal
{
625 function initPage( &$out ) {
626 SkinPHPTal
::initPage( $out );
627 $this->skinname
= "myskin";