On 2014-05-20, 2:25 PM, Bartosz Dziewoński wrote:
> * $IP/skins/SkinName/ for both assets and PHP files
> ($IP/skins/skinname/SkinName.php etc.), using require_once in
> LocalSettings like extensions to load the skin, manually adding an
> entry to $wgValidSkinNames in the main PHP file. This seems to be the
> preferred method among "modern" skins, for example Erudite [3] or
> Nimbus [4].
We've been discussing $IP/skins/skinname/skinname.php vs.
$IP/skins/SkinName/SkinName.php for awhile, but it occurs to me now –
after reading this patchset[1] – that it's possible some people in the
discussion may actually not know or have a misunderstanding of what this
file is.

$IP/skins/vector/vector.php or $IP/skins/Vector/Vector.php (whichever we
go with) is NOT what is currently at $IP/skins/Vector.php.

$IP/skins/Vector.php (and the like) contain classes like SkinVector and
VectorTemplate.

The proposed $IP/skins/vector/vector.php and $IP/skins/Vector/Vector.php
are meta(?) files – like an extension's $IP/extensions/{name}/{name}.php
file – which are responsible for setting things like the skin's credits,
autoloading, i18n, resourceloader modules, and registering the skin
inside $wgValidSkinNames.


For example my tutorial[1] describes 3 files in the skin structure:

  * skins/myskin/myskin.php – The new skin file containing definitions
    for credits, $wgValidSkinNames, $wgAutoloadClasses, $
    wgExtensionMessagesFiles, and $wgResourceModules.
  * skins/myskin/MySkin.skin.php – The file containing SkinMySkin and
    MySkinTemplate classes. The naming came from the FooBar.hooks.php
    pattern some extensions use but can be anything you want.
  * skins/myskin/MySkin.i18n.php – The old i18n for the skin (from the
    pre-json era of i18n). Likewise the name can be anything you want.


[1] https://gerrit.wikimedia.org/r/#/c/135384/
[2]
https://www.mediawiki.org/wiki/Manual:Skinning/Tutorial#Creating_the_skin

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://danielfriesen.name/]


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to