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;
46 $varValue = @$this->_context
[$var];
47 $value = str_replace($src, $varValue, $value);
53 class SkinPHPTal
extends Skin
{
56 function initPage( &$out ) {
57 parent
::initPage( $out );
58 $this->skinname
= "davinci";
59 $this->template
= "xhtml_slim";
62 function outputPage( &$out ) {
63 global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
64 global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
65 global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
66 global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgSiteNotice;
68 extract( $wgRequest->getValues( 'oldid', 'diff' ) );
70 $this->initPage( $out );
71 $tpl = new PHPTAL($this->template
. '.pt', 'templates');
73 #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText
74 $tpl->setTranslator(new MediaWiki_I18N());
77 $this->thispage
= $wgTitle->getPrefixedDbKey();
78 $this->thisurl
= $wgTitle->getPrefixedURL();
79 $this->loggedin
= $wgUser->getID() != 0;
80 $this->iscontent
= ($wgTitle->getNamespace() != Namespace::getSpecial() );
81 $this->iseditable
= ($this->iscontent
and !($action == 'edit' or $action == 'submit'));
82 $this->username
= $wgUser->getName();
83 $this->userpage
= $wgLang->getNsText( Namespace::getUser() ) . ":" . $wgUser->getName();
84 $this->userpageUrlDetails
= $this->makeUrlDetails($this->userpage
);
86 $this->usercss
= $this->userjs
= $this->userjsprev
= false;
87 $this->setupUserCssJs();
89 $this->titletxt
= $wgTitle->getPrefixedText();
91 $tpl->set( "title", $wgOut->getPageTitle() );
92 $tpl->set( "pagetitle", $wgOut->getHTMLTitle() );
94 $tpl->setRef( "thispage", $this->thispage
);
95 $subpagestr = $this->subPageSubtitle();
97 "subtitle", !empty($subpagestr)?
98 '<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle():
101 $undelete = $this->getUndeleteLink();
103 "undelete", !empty($undelete)?
104 '<span class="subpages">'.$undelete.'</span>':
108 $tpl->set( 'catlinks', $this->getCategories());
109 if( $wgOut->isSyndicated() ) {
111 foreach( $wgFeedClasses as $format => $class ) {
112 $feeds[$format] = array(
114 'href' => $wgRequest->appendQuery( "feed=$format" ),
115 'ttip' => wfMsg('tooltip-'.$format)
118 $tpl->setRef( 'feeds', $feeds );
120 $tpl->setRef( 'mimetype', $wgMimeType );
121 $tpl->setRef( 'charset', $wgOutputEncoding );
122 $tpl->set( 'headlinks', $out->getHeadLinks() );
123 $tpl->setRef( 'skinname', $this->skinname
);
124 $tpl->setRef( "loggedin", $this->loggedin
);
125 $tpl->set('nsclass', 'ns-'.$wgTitle->getNamespace());
126 /* XXX currently unused, might get useful later
127 $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) );
128 $tpl->set( "exists", $wgTitle->getArticleID() != 0 );
129 $tpl->set( "watch", $wgTitle->userIsWatching() ? "unwatch" : "watch" );
130 $tpl->set( "protect", count($wgTitle->getRestrictions()) ? "unprotect" : "protect" );
131 $tpl->set( "helppage", wfMsg('helppage'));
132 $tpl->set( "sysop", $wgUser->isSysop() );
134 $tpl->set( "searchaction", $this->escapeSearchLink() );
135 $tpl->setRef( "stylepath", $wgStylePath );
136 $tpl->setRef( "logopath", $wgLogo );
137 $tpl->setRef( "lang", $wgLanguageCode );
138 $tpl->set( "dir", $wgLang->isRTL() ?
"rtl" : "ltr" );
139 $tpl->set( "rtl", $wgLang->isRTL() );
140 $tpl->set( "langname", $wgLang->getLanguageName( $wgLanguageCode ) );
141 $tpl->setRef( "username", $this->username
);
142 $tpl->setRef( "userpage", $this->userpage
);
143 $tpl->setRef( "userpageurl", $this->userpageUrlDetails
['href']);
144 $tpl->setRef( "usercss", $this->usercss
);
145 $tpl->setRef( "userjs", $this->userjs
);
146 $tpl->setRef( "userjsprev", $this->userjsprev
);
147 if($this->loggedin
) {
148 $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js&smaxage=0') );
150 $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js') );
152 if( $wgUser->getNewtalk() ) {
153 $usertitle = Title
::newFromText( $this->userpage
);
154 $usertalktitle = $usertitle->getTalkPage();
155 if($usertalktitle->getPrefixedDbKey() != $this->thispage
){
157 $ntl = wfMsg( "newmessages",
158 $this->makeKnownLink(
159 $wgLang->getNsText( Namespace::getTalk( Namespace::getUser() ) )
160 . ":" . $this->username
,
161 wfMsg("newmessageslink") )
168 $tpl->setRef( "newtalk", $ntl );
169 $tpl->setRef( "skin", $this);
170 $tpl->set( "logo", $this->logoText() );
171 if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and 0 != $wgArticle->getID() ) {
172 if ( !$wgDisableCounters ) {
173 $viewcount = $wgLang->formatNum( $wgArticle->getCount() );
175 $tpl->set('viewcount', wfMsg( "viewcount", $viewcount ));
178 $tpl->set('lastmod', $this->lastModified());
179 $tpl->set('copyright',$this->getCopyright());
181 $tpl->set( "copyrightico", $this->getCopyrightIcon() );
182 $tpl->set( "poweredbyico", $this->getPoweredBy() );
183 $tpl->set( "disclaimer", $this->disclaimerLink() );
184 $tpl->set( "about", $this->aboutLink() );
186 $tpl->setRef( "debug", $out->mDebugtext
);
187 $tpl->set( "reporttime", $out->reportTime() );
188 $tpl->set( "sitenotice", $wgSiteNotice );
190 $tpl->setRef( "bodytext", $out->mBodytext
);
192 $language_urls = array();
193 foreach( $wgOut->getLanguageLinks() as $l ) {
194 $nt = Title
::newFromText( $l );
195 $language_urls[] = array('href' => $nt->getFullURL(),
196 'text' => ($wgLang->getLanguageName( $nt->getInterwiki()) != ''?
$wgLang->getLanguageName( $nt->getInterwiki()) : $l),
197 'class' => $wgLang->isRTL() ?
'rtl' : 'ltr');
199 if(count($language_urls)) {
200 $tpl->setRef( 'language_urls', $language_urls);
202 $tpl->set('language_urls', false);
204 $tpl->set('personal_urls', $this->buildPersonalUrls());
205 $content_actions = $this->buildContentActionUrls();
206 $tpl->setRef('content_actions', $content_actions);
207 // XXX: attach this from javascript, same with section editing
208 if($this->iseditable
&& $wgUser->getOption("editondblclick") )
210 $tpl->set('body-ondblclick', 'document.location = "' .$content_actions['edit']['href'] .'";');
212 $tpl->set('body-ondblclick', false);
214 $tpl->set( "nav_urls", $this->buildNavUrls() );
217 $res = $tpl->execute();
218 // result may be an error
219 if (PEAR
::isError($res)) {
220 echo $res->toString(), "\n";
227 # build array of urls for personal toolbar
228 function buildPersonalUrls() {
229 /* set up the default links for the personal toolbar */
230 global $wgShowIPinHeader;
231 $personal_urls = array();
232 if ($this->loggedin
) {
233 $personal_urls['userpage'] = array(
234 'text' => $this->username
,
235 'href' => &$this->userpageUrlDetails
['href'],
236 'class' => $this->userpageUrlDetails
['exists']?
false:'new'
238 $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage
);
239 $personal_urls['mytalk'] = array(
240 'text' => wfMsg('mytalk'),
241 'href' => &$usertalkUrlDetails['href'],
242 'class' => $usertalkUrlDetails['exists']?
false:'new'
244 $personal_urls['preferences'] = array(
245 'text' => wfMsg('preferences'),
246 'href' => $this->makeSpecialUrl('Preferences')
248 $personal_urls['watchlist'] = array(
249 'text' => wfMsg('watchlist'),
250 'href' => $this->makeSpecialUrl('Watchlist')
252 $personal_urls['mycontris'] = array(
253 'text' => wfMsg('mycontris'),
254 'href' => $this->makeSpecialUrl('Contributions','target=' . urlencode( $this->username
) )
256 $personal_urls['logout'] = array(
257 'text' => wfMsg('userlogout'),
258 'href' => $this->makeSpecialUrl('Userlogout','returnto=' . $this->thisurl
)
261 if( $wgShowIPinHeader && isset( $_COOKIE[ini_get("session.name")] ) ) {
262 $personal_urls['anonuserpage'] = array(
263 'text' => $this->username
,
264 'href' => &$this->userpageUrlDetails
['href'],
265 'class' => $this->userpageUrlDetails
['exists']?
false:'new'
267 $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage
);
268 $personal_urls['anontalk'] = array(
269 'text' => wfMsg('anontalk'),
270 'href' => &$usertalkUrlDetails['href'],
271 'class' => $usertalkUrlDetails['exists']?
false:'new'
273 $personal_urls['anonlogin'] = array(
274 'text' => wfMsg('userlogin'),
275 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl
)
279 $personal_urls['login'] = array(
280 'text' => wfMsg('userlogin'),
281 'href' => $this->makeSpecialUrl('Userlogin', 'returnto=' . $this->thisurl
)
286 return $personal_urls;
289 # an array of edit links by default used for the tabs
290 function buildContentActionUrls () {
291 global $wgTitle, $wgUser, $wgRequest;
292 $action = $wgRequest->getText( 'action' );
293 $section = $wgRequest->getText( 'section' );
294 $oldid = $wgRequest->getVal( 'oldid' );
295 $diff = $wgRequest->getVal( 'diff' );
296 $content_actions = array();
298 if( $this->iscontent
) {
300 $nskey = $this->getNameSpaceKey();
301 $content_actions[$nskey] = array('class' => (!Namespace::isTalk( $wgTitle->getNamespace())) ?
'selected' : false,
302 'text' => wfMsg($nskey),
303 'href' => $this->makeArticleUrl($this->thispage
));
305 /* set up the classes for the talk link */
306 $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ?
'selected' : false);
307 $talktitle = Title
::newFromText( $this->titletxt
);
308 $talktitle = $talktitle->getTalkPage();
309 $this->checkTitle($talktitle, $this->titletxt
);
310 if($talktitle->getArticleId() != 0) {
311 $content_actions['talk'] = array(
312 'class' => $talk_class,
313 'text' => wfMsg('talk'),
314 'href' => $this->makeTalkUrl($this->titletxt
)
317 $content_actions['talk'] = array(
318 'class' => $talk_class?
$talk_class.' new':'new',
319 'text' => wfMsg('talk'),
320 'href' => $this->makeTalkUrl($this->titletxt
,'action=edit')
324 if ( $wgTitle->userCanEdit() ) {
325 $oid = ( $oldid && ! isset( $diff ) ) ?
"&oldid={$oldid}" : false;
326 $istalk = ( Namespace::isTalk( $wgTitle->getNamespace()) );
327 $istalkclass = $istalk?
' istalk':'';
328 $content_actions['edit'] = array(
329 'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ?
'selected' : '').$istalkclass,
330 'text' => wfMsg('edit'),
331 'href' => $this->makeUrl($this->thispage
, 'action=edit'.$oid)
334 $content_actions['addsection'] = array(
335 'class' => $section == 'new'?
'selected':false,
336 'text' => wfMsg('addsection'),
337 'href' => $this->makeUrl($this->thispage
, 'action=edit§ion=new')
341 $oid = ( $oldid && ! isset( $diff ) ) ?
"&oldid={$oldid}" : '';
342 $content_actions['viewsource'] = array('class' => ($action == 'edit') ?
'selected' : false,
343 'text' => wfMsg('viewsource'),
344 'href' => $this->makeUrl($this->thispage
, 'action=edit'.$oid));
347 if ( $wgTitle->getArticleId() ) {
349 $content_actions['history'] = array('class' => ($action == 'history') ?
'selected' : false,
350 'text' => wfMsg('history_short'),
351 'href' => $this->makeUrl($this->thispage
, 'action=history'));
353 # XXX: is there a rollback action anywhere or is it planned?
354 # Don't recall where i got this from...
355 /*if( $wgUser->getNewtalk() ) {
356 $content_actions['rollback'] = array('class' => ($action == 'rollback') ? 'selected' : false,
357 'text' => wfMsg('rollback_short'),
358 'href' => $this->makeUrl($this->thispage, 'action=rollback'),
359 'ttip' => wfMsg('tooltip-rollback'),
360 'akey' => wfMsg('accesskey-rollback'));
363 if($wgUser->isSysop()){
364 if(!$wgTitle->isProtected()){
365 $content_actions['protect'] = array(
366 'class' => ($action == 'protect') ?
'selected' : false,
367 'text' => wfMsg('protect'),
368 'href' => $this->makeUrl($this->thispage
, 'action=protect')
372 $content_actions['unprotect'] = array(
373 'class' => ($action == 'unprotect') ?
'selected' : false,
374 'text' => wfMsg('unprotect'),
375 'href' => $this->makeUrl($this->thispage
, 'action=unprotect')
378 $content_actions['delete'] = array(
379 'class' => ($action == 'delete') ?
'selected' : false,
380 'text' => wfMsg('delete'),
381 'href' => $this->makeUrl($this->thispage
, 'action=delete')
384 if ( $wgUser->getID() != 0 ) {
385 if ( $wgTitle->userCanEdit()) {
386 $content_actions['move'] = array('class' => ($wgTitle->getDbKey() == 'Movepage' and $wgTitle->getNamespace
== Namespace::getSpecial()) ?
'selected' : false,
387 'text' => wfMsg('move'),
388 'href' => $this->makeSpecialUrl('Movepage', 'target='. urlencode( $this->thispage
))
391 $content_actions['move'] = array('class' => 'inactive',
392 'text' => wfMsg('move'),
398 //article doesn't exist or is deleted
399 if($wgUser->isSysop()){
400 if( $n = $wgTitle->isDeleted() ) {
401 $content_actions['delete'] = array(
403 'text' => wfMsg( "undelete_short", $n ),
404 'href' => $this->makeSpecialUrl('Undelete/'.$this->thispage
)
410 if ( $wgUser->getID() != 0 and $action != 'edit' and $action != 'submit' ) {
411 if( !$wgTitle->userIsWatching()) {
412 $content_actions['watch'] = array('class' => ($action == 'watch' or $action == 'unwatch') ?
'selected' : false,
413 'text' => wfMsg('watch'),
414 'href' => $this->makeUrl($this->thispage
, 'action=watch'));
416 $content_actions['watch'] = array('class' => ($action == 'unwatch' or $action == 'watch') ?
'selected' : false,
417 'text' => wfMsg('unwatch'),
418 'href' => $this->makeUrl($this->thispage
, 'action=unwatch'));
422 /* show special page tab */
424 $content_actions['article'] = array('class' => 'selected',
425 'text' => wfMsg('specialpage'),
429 return $content_actions;
432 # build array of common navigation links
433 function buildNavUrls () {
434 global $wgTitle, $wgUser, $wgRequest;
435 global $wgSiteSupportPage;
437 $action = $wgRequest->getText( 'action' );
438 $oldid = $wgRequest->getVal( 'oldid' );
439 $diff = $wgRequest->getVal( 'diff' );
440 // XXX: remove htmlspecialchars when tal:attributes works with i18n:attributes
442 $nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
443 $nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage')));
444 $nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges')));
445 $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage
))));
446 $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ?
array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
447 $nav_urls['portal'] = (wfMsg('portal') != '-') ?
array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
448 $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage
))));
449 $nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage')));
450 // $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage')));
451 $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
452 $nav_urls['help'] = array('href' => htmlspecialchars( $this->makeI18nUrl('helppage')));
453 $nav_urls['upload'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Upload')));
454 $nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages')));
456 if( $wgTitle->getNamespace() == NS_USER ||
$wgTitle->getNamespace() == NS_USER_TALK
) {
457 $id = User
::idFromName($wgTitle->getText());
458 $ip = User
::isIP($wgTitle->getText());
464 if($id ||
$ip) { # both anons and non-anons have contri list
465 $nav_urls['contributions'] = array(
466 'href' => htmlspecialchars( $this->makeSpecialUrl('Contributions', "target=" . $wgTitle->getPartialURL() ) )
469 if ( 0 != $wgUser->getID() ) { # show only to signed in users
470 if($id) { # can only email non-anons
471 $nav_urls['emailuser'] = array(
472 'href' => htmlspecialchars( $this->makeSpecialUrl('Emailuser', "target=" . $wgTitle->getPartialURL() ) )
481 function getNameSpaceKey () {
483 switch ($wgTitle->getNamespace()) {
491 return 'nstab-media';
493 return 'nstab-special';
499 return 'nstab-image';
501 case NS_MEDIAWIKI_TALK
:
502 return 'nstab-mediawiki';
504 case NS_TEMPLATE_TALK
:
505 return 'nstab-template';
510 case NS_CATEGORY_TALK
:
511 return 'nstab-category';
516 /* private */ function setupUserCssJs () {
517 global $wgRequest, $wgTitle;
518 $action = $wgRequest->getText('action');
520 $this->usercss
= '@import "'.$this->makeUrl('-','action=raw&gen=css').'";'."\n";
522 if( $this->loggedin
) {
523 if($wgTitle->isCssSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
525 $this->usercss
= '@import "'.$this->makeUrl('-','action=raw&gen=css&smaxage=0&maxage=0').');'."\n";
527 $this->usercss
.= $wgRequest->getText('wpTextbox1');
530 $this->usercss
.= '@import "'.$this->makeUrl('-','action=raw&gen=css&smaxage=0').'";'."\n";
531 # import user stylesheet
532 $this->usercss
.= '@import "'.
533 $this->makeUrl($this->userpage
.'/'.$this->skinname
.'.css', 'action=raw&ctype=text/css').'";'."\n";
535 if($wgTitle->isJsSubpage() and $action == 'submit' and $wgTitle->userCanEditCssJsSubpage()) {
536 # XXX: additional security check/prompt?
537 $this->userjsprev
= $wgRequest->getText('wpTextbox1');
539 $this->userjs
= $this->makeUrl($this->userpage
.'/'.$this->skinname
.'.js', 'action=raw&ctype=text/javascript');
543 # returns css with user-specific options
544 function getUserStylesheet() {
545 global $wgUser, $wgRequest, $wgTitle, $wgLang, $wgSquidMaxage, $wgStylePath;
546 $action = $wgRequest->getText('action');
547 $maxage = $wgRequest->getText('maxage');
548 $s = "/* generated user stylesheet */\n";
549 if($wgLang->isRTL()) $s .= '@import "'.$wgStylePath.'/'.$this->skinname
.'/rtl.css";'."\n";
551 $this->makeNSUrl(ucfirst($this->skinname
).'.css', 'action=raw&ctype=text/css&smaxage='.$wgSquidMaxage, NS_MEDIAWIKI
)."\";\n";
552 if($wgUser->getID() != 0) {
553 if ( 1 == $wgUser->getOption( "underline" ) ) {
554 $s .= "a { text-decoration: underline; }\n";
556 $s .= "a { text-decoration: none; }\n";
559 if ( 1 != $wgUser->getOption( "highlightbroken" ) ) {
560 $s .= "a.new, #quickbar a.new { color: #CC2200; }\n";
562 if ( 1 == $wgUser->getOption( "justify" ) ) {
563 $s .= "#bodyContent { text-align: justify; }\n";
567 function getUserJs() {
568 global $wgUser, $wgStylePath;
569 $s = "/* generated javascript */";
570 $s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';";
571 $s .= '/* MediaWiki:'.ucfirst($this->skinname
)." */\n";
572 $s .= wfMsg(ucfirst($this->skinname
).'.js');
578 class SkinDaVinci
extends SkinPHPTal
{
579 function initPage( &$out ) {
580 SkinPHPTal
::initPage( $out );
581 $this->skinname
= "davinci";
585 class SkinMono
extends SkinPHPTal
{
586 function initPage( &$out ) {
587 SkinPHPTal
::initPage( $out );
588 $this->skinname
= "mono";
592 class SkinMonoBook
extends SkinPHPTal
{
593 function initPage( &$out ) {
594 SkinPHPTal
::initPage( $out );
595 $this->skinname
= "monobook";
599 class SkinMySkin
extends SkinPHPTal
{
600 function initPage( &$out ) {
601 SkinPHPTal
::initPage( $out );
602 $this->skinname
= "myskin";