Last modified: 2014-10-04 19:28:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29766, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27766 - Add configuration option to enable loading modules based on url parameter
Add configuration option to enable loading modules based on url parameter
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.18.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 69550
  Show dependency treegraph
 
Reported: 2011-02-27 19:47 UTC by Krinkle
Modified: 2014-10-04 19:28 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-02-27 19:47:26 UTC
Inspired by the "withJS-url parameter"-script floating around various wikis (which calls importScript() if the passed pagename is in the MediaWiki:-namespace), I think such functionality would qualify as core functionality.

For backwards compatiblity and to avoid any security issues on wikis which use the MediaWiki:-namespace on a less-than-sysop security level, this should be disabled by default, and enableable with a wiki global (eg. $wgAllowWithModuleLoading=true;)

However given how the resourceloader currently works and how it will/may work in the future [1].
I think it's best not to implemenent the script as it is now on those wikis, instead I've made this bug depend on bug 27535 ( registering wikistyles and wikiscripts as part of a module ), and propose to make the parameter someting like withModule.

Example:
* http://wi.ki/w/index.php?title=Foobar&withModule=ext.gadget.Foobar

That way it can be used to load CSS as well, since CSS can be (part of) a module.

This also stops the need to create mini-scriptpages in the MediaWiki:-namespace that would call importScript() and importStylesheet() several times (once for every css/js part of the module) in order to make it work with the withJS-hack.
Comment 1 Bugmeister Bot 2011-08-19 19:12:57 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 2 Helder 2012-02-26 18:37:23 UTC
(In reply to comment #0)
> However given how the resourceloader currently works and how it will/may work
> in the future [1].

Do you still remember what [1] was supposed to mean?

What are the new plans for this, considering that bug 27535 was closed (and bug 25845 and bug 27281 are open)?
Comment 3 Krinkle 2014-08-28 22:28:25 UTC
withModule has been implemented in a snippet and used by a few wikis:

https://www.mediawiki.org/wiki/Snippets/Load_JS_and_CSS_by_URL

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links