Page MenuHomePhabricator

Interwiki links for Gadget files
Closed, DuplicatePublic

Description

https://www.mediawiki.org/wiki/Extension:Gadgets should accept interwiki links in https://www.mediawiki.org/wiki/MediaWiki:Gadgets-definition so gadgets are shareable over multiple wikis in a wiki family.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 31 2017, 2:47 PM
He7d3r added a subscriber: He7d3r.Jul 31 2017, 4:47 PM

By "shareable" do you mean a single copy of the code being used by multiple wikis? Or is this task about the links in the sidebar? (similar to what is requested on T123063)

MediaWiki:Gadgets-definition has the following format:

* gadget_name [options (can be omitted)] | page names

where page names have to be something like this:

mygadget.js

which will result in that being loaded by the ResourceLoader:

/w/index.php?title=MediaWiki:Gadget-mygadget.js&action=raw&ctype=text/javascript

You see, you can't simply prefix "mygadget.js" with an interwiki prefix like "commons:" because that would result in:

MediaWiki:Gadget-commons:mygadget.js

But it should result in:

commons:MediaWiki:Gadget-mygadget.js

so you are able to use the same gadgets in every wiki.

He7d3r added a comment.Aug 2 2017, 5:58 PM

In that case, this looks like the feature you want was planed for mw:Gadgets 2.0 and now only for mw:Gadgets 3.0. Marking as a duplicate of T22153: Implement global gadgets (WMF-wide).