2010/9/7 Platonides <platoni...@gmail.com>:
> I see. It would have to be a hook into the resource loader.
You don't need a hook in the server-side PHP part of the resource
loader, as determining which modules to load on that side is already
supported. The Gadgets extension's PHP code could inspect variables
like $wgTitle->getNamespace() and determine whether to load a certain
gadget or not. This is easy as far as the resource loader goes, but it
does mean the server has to make this decision based on information in
the gadget's code or the gadget definition page. This is significantly
less flexible than allowing a gadget to just provide a JS function
that returns true or false, but the fact that the decision has to be
made client-side makes it a bit trickier. It's still very much doable,
although the way I proposed is a little bit hacky and we may want to
have the client-side loader support this better.

Or did you mean a hook into the client-side loader?

Roan Kattouw (Catrope)

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to