Rename the class to SkinChristmas or somesuch. That's what's producing the error; the duplicate class definition.
Rob Church
On 30/12/05, Travian Wiki travian.wiki@gmail.com wrote:
I am afraid it is not that easy! I copied Monobook.php and renamed it to Christmas.php. I then copied the monobook folder and renamed it Christmas. I uploaded it, went into skins and chose Christmas. As soon as I hit save, nothing works and you get an error!
*Fatal error*: Cannot redeclare class skinmonobook in * /home/supportw/public_html/wiki/skins/Christmas.php* on line *25*
You can see for yourself by going to http://www.supportwiki.2plans.com/wikiand logging in as Username - Demo Password - demo
I searched for monobook in the Christmas.php file, and changed each one to Christmas. I ended up changing only
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
function initPage( &$out ) {
SkinTemplate::initPage( $out );
$this->skinname = 'Christmas';
$this->stylename = 'Christmas';
$this->template = 'ChristmasTemplate';
}
}
On 12/23/05, Rob Church robchur@gmail.com wrote:
Rename the references to MonoBook within the skin files to Christmas or whatever.
Rob Church
On 23/12/05, Travian Wiki travian.wiki@gmail.com wrote:
What? How can I take Monobook, and then make a copy of it, and then
rename
the copied skin?
First, I copy the Monobook.php file and rename it to the skin name, Christmas.php. I then copy the monobook folder and rename it Christmas. Where do I go from there so that my copy of the skin works? If I just upload the Christmas.php and Christmas folder the way they are, you get
an
error message when you choose to use that skin!
On 12/22/05, Rob Church robchur@gmail.com wrote:
I mean, you now modify your copy of the skin fine.
Rob Church
On 22/12/05, Travian Wiki travian.wiki@gmail.com wrote:
I can modify the existing skin. I want to copy MonoBook and then
modify
the
copied version and still have the original version of MonoBook run
along
side the new skin.
On 12/22/05, Rob Church robchur@gmail.com wrote:
Nothing. That's the whole idea of class inheritance. You ought to
find
that modification of the skin will now be relatively painless.
Rob Church
On 22/12/05, Travian Wiki travian.wiki@gmail.com wrote: > Is it possible to make a copy of the MonoBook skin, and then
rename
it
to > something else? I want to copy the MonoBook skin, and then
start
modifying > it from there. > > So far, I know that you have to copy the MonoBook folder and
rename
it
to > the skin name. You then have to copy Monobook.php and rename it
to
the
skin > name. You then have to change the lines - > > > class SkinChristmas extends SkinTemplate { > > /** Using monobook. */ > > function initPage( &$out ) { > > SkinTemplate::initPage( $out ); > > $this->skinname = 'Christmas'; > > $this->stylename = 'Christmas'; > > $this->template = 'ChristmasTemplate'; > > } > > } > > In this example, it would make a skin called Christmas. Where
do
you go
> from here? What has to be modified in SkinTemplate.php and SkinPHPTal.php? > _______________________________________________ > MediaWiki-l mailing list > MediaWiki-l@Wikimedia.org > http://mail.wikipedia.org/mailman/listinfo/mediawiki-l > _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l