Follow-up r76527: updated readme

This commit is contained in:
Max Semenik 2010-11-11 18:46:54 +00:00
parent 66a0821cb7
commit 43133f5655

30
README
View file

@ -15,6 +15,11 @@ and is released under the GNU General Public Licence (GPL).
The internationalization files may contain contributions by several people;
they should be mentioned in each file individually.
== Prerequisites ==
This version of Gadgets requires MediaWiki 1.17 or later. To get a version
compatible with earlier MediaWiki release, visit
http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Gadgets
== Installing ==
Copy the Gadgets directory into the extensions folder of your
MediaWiki installation. Then add the following lines to your
@ -35,6 +40,10 @@ Each line in MediaWiki:Gadgets-definition that start with one or more "*"
* mygadget|mygadget.js|mygadget.css
or
* mygadget[ResourceLoader]|mygadget.js|mygadget.css
That is, each line consists of fields separated by a "|" (pipe) character.
The first field ("mygadget" in the example) is the gadgets internal name,
and references a system message (MediaWiki:Gadget-mygadget in the example)
@ -44,6 +53,12 @@ contain only ASCII letter and numbers, hyphens ("-"), underscores ("_"),
colons (":"), and periods (".") (spaces are also allowed but converted to
underscores ("_"), like for page titles).
If the gadget name is followed by [ResourceLoader], its JavaScript will
be loaded concatenated, minified and gzipped by ResourceLoader, thus
improving load times. However, older gadgets may be incompatible with
ResourceLoader, so all JS is by default loaded the old way, using separate
<script> tags.
The remaining fields on the line refer to the JavaScript or CSS code that
makes up the gadget, contained in system messages
(MediaWiki:Gadget-mygadget.js and MediaWiki:Gadget-mygadget.css in the
@ -55,6 +70,15 @@ addition to their own specific code, e.g:
* frobinator|commonStuff.js|frob.js|frob.css|pretty.css
* l33t|commonStuff.js|tools.js|l33t.js
Gadget definitions can contain whitespace between its elements, e.g.
the following definitions are equivalent:
*mygadget[ResourceLoader]|mygadget.js|mygadget.css
and
* mygadget [ ResourceLoader ] | mygadget.js | mygadget.css
The list of gadgets in MediaWiki:Gadgets-definition can be broken into
sections using lines that start and end with two or more "=" (equals)
characters, enclosing the name of a system message that defines the
@ -68,9 +92,9 @@ MediaWiki:Gadget-section-editing-gadgets
== Caveats ==
* Requires MediaWiki 1.11alpha, revision 24477 or later.
* Gadgets do not apply to Special:Preferences, so users can always disable
any broken gadgets they may have enabled.
* Gadgets do not apply to Special:Preferences, Special:UserLogin and
Special:ResetPass so users can always disable any broken gadgets they
may have enabled, and malicious gadgets will be unable to steal passwords.
* Uses BeforePageDisplay hook, thus only works with MonoBook based skins;
specifically, does not work with CologneBlue.
* Gadget code is included after user code - that means that user JS has no