On Wed, Jun 8, 2011 at 16:16, Krinkle wrote:
> I think only a few things (if at all) should eventually stay in
> MediaWiki:Common.js. I'm having a hard time coming up with examples,
> but basically only stuff that is truly specific to that particular
> wiki and not related to end-users in any way.
>
> For example custom config variables (wgFooBar) or central enhancements
> such as
> * scripts to move custom icons to the top of the page next to the title
> * some kind of interaction on the Main Page that is dependant
>
On some Wikibooks projects (en, it, pt) for example, it was added a variable
wgBookName[1], which is used e.g. to import book specific gadgets[2]
(at least while MediaWiki is not able to provide per-book stylesheets[3]).
But then again, I can imagine the top-icon-script being a gadget that
> would be imported to our central wiki as a "global gadget" that local
> wikis can enable/disable and, in most cases, set to "default": "on".
> And something that does awesome things to the main page ? Probably
> something that is useful and could be made more generic for use in
> other wikis.
>
> So in more cases than one might think, gadgets are or will be better
> suited for almost anything.
>
There is also the script wich process the withJS and withCSS url parameters,
which are used in various wikiprojects but doesn't seems to be adequate for
global gadgets (what would be the point of letting the users to disable
this?)
> For example javascript libraries or jquery plugins should be stored as
> gadget modules that are indicated as "hidden" (or "private", the name
> hasn't been decided yet), which other gadgets can register as a
> dependancy.
ie. Gadget-foo (dependancies: somelib, jquery.foobar, gadget-loremipsum)
>
Should this be made locally by the local admins in
MediaWiki:SpecificPages.js, or
the users should request on Bugzilla the addition of new plugins to
MediaWiki
(such as jQuery.hotkeys[7])?
Question:
> Do you think MediaWiki:Common.js has future-proof usecases given the
> current plans ? If so, please share them in this thread.
>
Still talking about Wikibooks, there are scripts such as the one used to add
a
link to the sidebar providing access to a random bug (which is a workaround
to another open bug[5]). Such an script could be useful as a global gadget,
but only for wikis where there is a heavy use of subpages for (manual)
meta-organization[6] of the content of the books (mainly Wikibooks and
Wikisources).
Regards,
Helder
[1] https://secure.wikimedia.org/wikibooks/en/wiki/MediaWiki:Common.js
[2]
https://secure.wikimedia.org/wikibooks/en/wiki/MediaWiki:Common.js/Perbook.js
[3] https://bugzilla.wikimedia.org/show_bug.cgi?id=15075
[4]
https://secure.wikimedia.org/wikibooks/en/wiki/MediaWiki:Common.js/RandomBook.js
[5] https://bugzilla.wikimedia.org/show_bug.cgi?id=16655
[6] https://bugzilla.wikimedia.org/show_bug.cgi?id=15071
[7] https://bugzilla.wikimedia.org/show_bug.cgi?id=27493
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l