Hi! Some year ago, I used to create Vector-based skin with redesigned layout (very different positions of sidebar and action links) in MW 1.17 from scratch, via copying all of Vector subtree and modifying it, then adding my skin resources into Resources.php. It worked, but was a lot of work, including core patching.
Now I work with 1.20 and there's an article written by Daniel Friesen on how to create Vector-derived skins without modifying Resources.php and using Vector classes and styles as a base. So I do not have to modify the core and to copy the whole skin subtree: http://blog.redwerks.org/2012/02/28/mediawiki-subskin-tutorial/
I mostly followed the instructions in the guide. However my skin also changes skin execute() method, because not just css and quite a lot of layout is changed. execute() works fine.
I need to override a lot of Vector's css, located in 'skins.vector' resource module.
But the following code: /** * @param $out OutputPage object */ function setupSkinUserCss( OutputPage $out ){ parent::setupSkinUserCss( $out ); $out->addModuleStyles( "skins.artmuseum" ); }
causes 'skins.vector' styles to be loaded after my 'skins.artmuseum' styles. So, the Vector styles are not overwritten by my skin styles. Changing the order does not help: function setupSkinUserCss( OutputPage $out ){ $out->addModuleStyles( "skins.artmuseum" ); parent::setupSkinUserCss( $out ); }
ResourceLoader has 'dependencies' key to make resource automatically be dependent on another resource: $wgResourceModules['skins.artmuseum'] = array( 'styles' => array( 'artmuseum/screen.css' => array( 'media' => 'screen' ), ), 'remoteBasePath' => &$GLOBALS['wgStylePath'], 'localBasePath' => &$GLOBALS['wgStyleDirectory'], 'dependencies' => 'skin.vector' );
However, 'skin.vector' module includes both styles and scripts. And setupSkinUserCss() adds styles only. So 'dependencies' did not help, vector styles are loaded later, anyway. What can I do with that?
Also, I need to load remote google webfonts. Does ResourceLoader support this or I have to use old-fashionated methods of OutputPage() ? Dmitriy