Topic on Talk:ResourceLoader/Migration guide for extension developers

203.97.121.69 (talkcontribs)

Can someone in the know explain why custom skins can't use the same $wgResourceModules['ext.myExtension'] = array(... resource definition method that extensions use?

I've worked around this by treating resources/Resources.php as a configuration file, and have added my skin definitions directly to it, but that's far from portable.

Further more, skin definitions don't seem to honour dependencies; I put jquery.ui.widget in, so I can use a smooth div scrolling plugin, but it never loads (even when I'm using debug=true). I ended up adding it to my scripts section, but given what ResourceLoader is all about, that's a bit of a retrograde step.

(I do love the automatic minify and combine, though. Great stuff.)

Using mediawiki 1.18.

203.97.121.69 (talkcontribs)

Nice move liquidthreads. Let's see if I can reproduce that in comments...

203.97.121.69 (talkcontribs)

Nope. Preview before save did the right thing. I leave it up to a moderator to clean up this mess. Sorry.

Krinkle (talkcontribs)

I'm not very home in the skins area but from what I know, extensions can extend functionality. This includes Skins.

Historically people provided skins and instructed users to download the skin and put it in the ./skins/ directory, however I think in the latest version this is no longer supported (if it works, fine, but it's not tested for). Try creating it as an actual extension instead.

btw, what were you trying to reproduce in the comments? I don't see anything..

203.97.121.69 (talkcontribs)

Of course, the instructions for installing an extension is to download the extension and put it in the ./extensions/ directory, so that's hardly a better distribution and installation system. I'm not sure a skin would behave like a skin under the extensions directory, either.

(I was trying to reproduce double posting on a single submit. An editor has culled the duplicate post.)

Krinkle (talkcontribs)

Using it as an extension is better because it survives any upgrade or change to the core skins directory, and extensions have a place for registering resource modules, hooks, i18n messages etc. etc.

203.97.121.69 (talkcontribs)

So all the old skin documentation really needs to be replaced with new skins-as-extensions docs. Is this something anyone is actually working on?

Reply to "Custom skins"