(Firstly, apologies for breaking threading, and not quoting things as fully as I normally would. I only just subscribed to this list, so don't have previous mails in my mail client.)
I'm the main author of the Erudite skin[0], which Daniel Friesen helped a good deal with when shepherding it into the gerrit git system. So consider me biased to prefer the way that skin does everything ;)
I think Bartosz' proposal to clean this stuff up is good and important. In particular, making the official skins use their own directories (and not skinname.php & skinname/*) is nice for several reasons, not the least being to provide a good model for others developing skins to follow.
Bartosz' second proposal, "$IP/skins/SkinName/ for both assets and PHP files" is a good one I think. I agree with Tyler and Bartosz' points regarding the extensions/ vs. skins/ directories; namely that the skins/ directory is a sensible place for skins, and the fact that they in practise aren't fundamentally different to extensions is largely irrelevant.
To Tim Starling's point about making skin installation / upgrading automatable; that shouldn't be much more challenging at all using skins/ if they're in a separate directory to extensions; it can't really be a code reuse issue, unless it's really bad code ;)
To Tyler Romeo's point about how skins are needlessly complex, and a templating system would be much nicer, I don't really agree. Being regular PHP gives a lot of flexibility, and in practise the vast majority of a skin can already be just HTML with <?php tags for inserting the appropriate content. Have a skim of the Erudite code to see what I mean[1]. Granted I'm probably a bit code-blind from having spent a long time with that bit of PHP, but to me it feels really clean and straightforward. I'm sure there is some work that could be done to reduce boilerplate code a bit (as Daniel mentioned), but beyond that I think it's quite a good system.
As for the upper vs lower vs camel case issues, I'd like them to magically go away, but I don't have a good suggestion for that. Well, my suggestion would be lowercase everywhere, but that conflicts with general mediawiki style. So, again, I personally am inclined to generally agree with whatever Daniel says on the issue ;)
Nick
0. https://www.mediawiki.org/wiki/Skin:Erudite 1. https://git.wikimedia.org/blob/mediawiki%2Fskins%2Ferudite/fc5b86835e7b942d7...
One related thing that could be useful would be creating a "mediawiki-skin" type for composer, so skins could use composer and be assured of going into the skins/ directory.
I haven't used composer yet, but presumably it's a reasonable thing for skins to support, once they can be automatically installed into the appropriate directory.
Nick
You are late. ;-)
A type mediawiki-skin exists. It ensures that skins will go in the skins directory. The skin's subdirectory name is derived from the package name exactly the same way as for extensions, i.e. a package named "cologne-blue" would go to .../skins/CologneBlue, with the exception, that a trailing "-skin" on the name is truncated to be able to disambiguate skin package names from extensions. This means you could have a package "mediawiki/vector" of type "mediawiki-extension" which would go to .../extensions/Vector, and another package "mediawiki/vector-skin" of type "mediawiki-skin" which would go to .../skins/Vector. [1] and [2] use this type already.
Stephan
[1] https://packagist.org/packages/mediawiki/chameleon-skin [2] https://packagist.org/packages/mediawiki/refreshed-skin
On 27 May 2014 18:47, Nick White nick.white@durham.ac.uk wrote:
One related thing that could be useful would be creating a "mediawiki-skin" type for composer, so skins could use composer and be assured of going into the skins/ directory.
I haven't used composer yet, but presumably it's a reasonable thing for skins to support, once they can be automatically installed into the appropriate directory.
Nick
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Wed, May 28, 2014 at 02:00:36PM +0200, Stephan Gambke wrote:
You are late. ;-)
A type mediawiki-skin exists.
Oh, fantastic :) Thanks for letting me know.
It would probably be good to add this info to the Manual:Skinning/Tutorial page. I'll do that when I've made it work for Erudite, if someone doesn't beat me to it.
Nick
wikitech-l@lists.wikimedia.org