Hi all,
I've created a copy of the Vector skin. What is the recommended way to register resources (for the resource loader) for a custom skin?
Vector registers the resources in resources/Resources.php
The recommended method for extensions seems to define $wgResourceModules['ext.myExtension'] in the MyExtension.php file
This does not seem to work for styles. I get a blank page when I do this in my skin, and load /load.php?debug=true&lang=en-gb&modules=skins.myskin&only=styles&skin=myskin&* in my browser.
Here is what I tried so far: 1. Don't define anything --> PHP Fatal error: Call to a member function getGroup() on a non-object in includes/OutputPage.php on line 2958
2. define $wgResourceModules['skins.myskin'] in the MySkin.php --> blank page
3. define $wgResourceModules['skins.myskin'] in SkinMySkin (extends SkinTemplate) __construct() function --> blank page
4. call $resourceLoader->register('skins.myskin', ...) from a hook function, defined by $wgHooks['ResourceLoaderRegisterModules'][] in MySkin.php. --> blank page
5. define $wgResourceModules['skins.myskin'] in the MySkin.deps.php --> blank page
6. define 'skins.myskin' in resources/Resources.php --> works fine (but I rather not modify this file)
7. define $wgResourceModules['skins.myskin'] in LocalSettings.php --> works fine (but feels rather hackerish, since I have to manually set $wgStyleDirectory)
Unfortunately, http://www.mediawiki.org/wiki/Manual:Skinning is deprecated, and http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(developers) does not mention skins at all.
Apparently, more people struggle with this: http://www.mediawiki.org/wiki/Manual_talk:Skinning/Vector
Any help is kindly appreciated!
Regards, Freek Dijkstra