On 02/28/12 00:00, Daniel Friesen wrote:

> 
> One possibility why it stopped working on upgrade might be that the
> outdated css loading calls may not be loading the stylesheet.
> The near-guaranteed reason why copying Vector.php and editing it isn't
> working is because like everyone else you are changing
> `$out->addModuleStyle( 'skins.vector' );` to `$out->addModuleStyles(
> 'skins.resources' );` which naturally won't work because RL modules are
> not defined in skin files and hence the skins.resources module does not
> exist.

Exactly. I did wonder about this, but couldn't see what else to do. I
don't know what an 'RL module' is.

> 
> In any case, trying to create a new skin by copying the core skins is a
> really bad idea. Core skins use the old autoloader and hence their
> resources are mixed in with the rest of core instead of properly
> isolated as a skin. They also may have bad practices in them to retain
> old behaviors that are expected of them, stuff which new skins have no
> reason to do. And most of all, by copying them your copy gets out of
> sync and when you upgrade you have to deal with the fact that the code
> you copied is out of date. You also duplicate what you don't need to
> duplicate.
> 
> If you want to create a skin that just makes css tweaks to a core skin,
> I suggest something like this:
> https://gist.github.com/1927993
> 
I want to:

- hide most of the normal user options (I switch skin on login,
non-logeddin users see an apparently static web site with no editing
options or discussion pages)

- Add new logo & colour scheme to top of page

- Add some extra external links

> You would put a yourskinname.php and YourSkinName.skin.php file inside
> `skins/yourskinname/` as in that "Scalar" skin example above. And then
> add a yourskinname/screen.css which would contain the css tweaks you
> want to vector. And then require_once that from your LocalSettings.php
> 
> This way you inherit everything from vector and don't have to copy
> anything.

Perfect. I'd far rather override only where necessary, just didn't know
where to start. Thank you, I'll try this.

Graham

> 


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to