Community Central
Register
Community Central
(Adding Wikia Help link)
No edit summary
Tag: sourceedit
(18 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 
{{Available on request}}
 
{{Available on request}}
  +
{{tocright}}
'''Gadgets''' is an extension that allows users to pick JavaScript or CSS based "gadgets" that other wiki users provide.
+
'''Gadgets''' is an extension that allows users to pick JavaScript or CSS based "gadgets" that other community users provide. The scripts will be available for users to enable or disable in their [[Help:Preferences|preferences]] under a tab labeled "Gadgets".
   
They're designed using JavaScript and/or CSS snippets located on pages in the MediaWiki namespace. Each gadget is added by adding a new entry to [[MediaWiki:Gadgets-definition]], providing a name and description for the gadget, and a list of the JS and CSS snippets that it uses (see the Usage section below).
+
They're designed using JavaScript and/or CSS snippets located on pages in the MediaWiki [[Help:Namespace|namespace]]. Each gadget is added by adding a new entry to [[MediaWiki:Gadgets-definition]], providing a name and description for the gadget, and a list of the JS and CSS snippets that it uses (see the Usage section below).
   
Gadgets use the same principle as [[MediaWiki:Monaco.js]], [[MediaWiki:Common.css]], etc. because they allow scripting or styling over the entire site. Since Gadgets function in this manner (the list that enables them as well as the actual JS and CSS pages), it requires being a wiki admin to manage these, just like the sitewide JS or CSS.
+
Gadgets use the same principle as [{{fullurl:MediaWiki:Wikia.js}} MediaWiki:Wikia.js], [{{fullurl:MediaWiki:Common.css}} MediaWiki:Common.css], etc. because they allow scripting or styling over the entire site. Since Gadgets function in this manner (the list that enables them as well as the actual JS and CSS pages), it requires being a wiki admin to manage these, just like the sitewide JS or CSS.
   
 
== Usage ==
 
== Usage ==
First you need to add a script or style to a page in the MediaWiki namespace (e.g. [[MediaWiki:Gadget-navpop.css]] ). Then you add that page to [[MediaWiki:Gadgets-definition]] as shown here:
+
First you need to add a script or style to a page in the MediaWiki namespace (e.g. [{{fullurl:MediaWiki:Gadget-popups.css}} MediaWiki:Gadget-popups.css]). Then you add that page to [{{fullurl:MediaWiki:Gadgets-definition}} MediaWiki:Gadgets-definition] as shown here:
   
 
<pre>
 
<pre>
 
== Example-gadgets ==
 
== Example-gadgets ==
   
* Navigation_popups|popups.js|navpop.css
+
* Navigation_popups|popups.js|popups.css
 
* contribsrange|contribsrange.js
 
* contribsrange|contribsrange.js
 
</pre>
 
</pre>
[[Image:Gadgets-preferences.png|thumb|300px|Gadgets section of Preferences]]
+
[[File:Gadgets-preferences.png|thumb|300px|Gadgets section of Preferences]]
[[Image:Gadgets-special.png|thumb|300px|Gadgets special page]]
+
[[File:Gadgets-special.png|thumb|300px|Gadgets special page]]
The first field is the gadget's internal name, and may only contain alphanumberic (letters and numbers only) in order to function correctly. If the internal name is '''Navigation_popups''', the corresponding MediaWiki namespace page will be '''[[MediaWiki:Gadget-Navigation popups]]'''. This page allows you to define a description text which will be displayed on the '''Gadgets''' section of your [[Special:Preferences|preferences]].
+
The first field is the gadget's internal name, and may only contain letters and numbers in order to function correctly. If the internal name is '''Navigation_popups''', the corresponding MediaWiki namespace page will be '''[{{fullurl:MediaWiki:Gadget-Navigation popups}} MediaWiki:Gadget-Navigation popups]'''. This page allows you to define a description text which will be displayed on the '''Gadgets''' section of your [[Special:Preferences|preferences]].
   
The second and subsequent fields define the pages that make up the code. In the above example, '''popups.js''' and '''navpop.css''' would be '''[[MediaWiki:Gadget-popups.js]]''' and '''[[MediaWiki:Gadget-navpop.css]]''' respectively. Like other sitewide pages, Gadgets may only be written using JS and CSS pages.
+
The second and subsequent fields define the pages that make up the code. In the above example, '''popups.js''' and '''popups.css''' would be '''[{{fullurl:MediaWiki:Gadget-popups.js}} MediaWiki:Gadget-popups.js]''' and '''[{{fullurl:MediaWiki:Gadget-popups.css}} MediaWiki:Gadget-popups.css]''' respectively. Like other sitewide pages, Gadgets may only be written using JS and CSS pages.
   
These defined pages will allow the gadget to appear in the "Gadgets" section of everyone's [[Special:Preferences|preferences]], so users can choose which gadgets fit their wiki needs. An overview of added gadgets can be found on [[Special:Gadgets]], along with links to the respective pages that define them, which allows for better control over the wiki's gadgets.
+
These defined pages will allow the gadget to appear in the "Gadgets" section of everyone's [[Special:Preferences|preferences]], so users can choose which gadgets fit their wikia needs. An overview of added gadgets can be found on [{{fullurl:Special:Gadgets}} Special:Gadgets], along with links to the respective pages that define them, which allows for better control over the wikia's gadgets.
   
The [[Special:Gadgets]] page allows quick overview and easy management of all your gadgets interface with easy linking to every special page that controls all of your gadgets functionality and interface. The headings that appear in your [[Special:Preferences|preferences]] may also be redefined here.
+
The [{{fullurl:Special:Gadgets}} Special:Gadgets] page allows quick overview and easy management of all your gadgets interface with easy linking to every special page that controls all of your gadgets functionality and interface. The headings that appear in your [[Special:Preferences|preferences]] may also be redefined here.
   
Please note that all Gadget MediaWiki namespace pages must be prefixed with '''Gadget-''', the only exception is where you define them in [[MediaWiki:Gadgets-definition]] as displayed in the above example.
+
Please note that all Gadget MediaWiki namespace pages must be prefixed with '''Gadget-''', the only exception is where you define them in [{{fullurl:MediaWiki:Gadgets-definition}} MediaWiki:Gadgets-definition] as displayed in the above example.
 
== In action ==
 
You can see this extension in action on [[w:c:help:Help:Gadgets|Wikia Help]].
 
   
 
== See also ==
 
== See also ==
*[[mediawikiwiki:Extension:Gadgets|Extension:Gadgets]] on MediaWiki.org, upon which this page was based.
+
*[[mediawikiwiki:Extension:Gadgets|Extension:Gadgets]] - on MediaWiki.org, upon which this page was based.
  +
*[[Help:Extensions]] - A guide to all the extensions Wikia offers.
  +
  +
==Further help and feedback==
  +
{{Help and feedback section}}
   
  +
[[fr:Aide:Gadgets]]
  +
[[pl:Pomoc:Gadgets]]
  +
[[pt:Ajuda:Gadgets]]
  +
[[zh:help:插件]]
  +
[[ja:ヘルプ:ガジェット]]
 
[[Category:Help|{{PAGENAME}}]]
 
[[Category:Help|{{PAGENAME}}]]
[[Category:Expand|{{PAGENAME}}]]
 

Revision as of 18:22, 19 May 2016

This extension is not enabled by default but may be available upon request.

Gadgets is an extension that allows users to pick JavaScript or CSS based "gadgets" that other community users provide. The scripts will be available for users to enable or disable in their preferences under a tab labeled "Gadgets".

They're designed using JavaScript and/or CSS snippets located on pages in the MediaWiki namespace. Each gadget is added by adding a new entry to MediaWiki:Gadgets-definition, providing a name and description for the gadget, and a list of the JS and CSS snippets that it uses (see the Usage section below).

Gadgets use the same principle as MediaWiki:Wikia.js, MediaWiki:Common.css, etc. because they allow scripting or styling over the entire site. Since Gadgets function in this manner (the list that enables them as well as the actual JS and CSS pages), it requires being a wiki admin to manage these, just like the sitewide JS or CSS.

Usage

First you need to add a script or style to a page in the MediaWiki namespace (e.g. MediaWiki:Gadget-popups.css). Then you add that page to MediaWiki:Gadgets-definition as shown here:

== Example-gadgets ==

* Navigation_popups|popups.js|popups.css
* contribsrange|contribsrange.js
Gadgets-preferences

Gadgets section of Preferences

Gadgets-special

Gadgets special page

The first field is the gadget's internal name, and may only contain letters and numbers in order to function correctly. If the internal name is Navigation_popups, the corresponding MediaWiki namespace page will be MediaWiki:Gadget-Navigation popups. This page allows you to define a description text which will be displayed on the Gadgets section of your preferences.

The second and subsequent fields define the pages that make up the code. In the above example, popups.js and popups.css would be MediaWiki:Gadget-popups.js and MediaWiki:Gadget-popups.css respectively. Like other sitewide pages, Gadgets may only be written using JS and CSS pages.

These defined pages will allow the gadget to appear in the "Gadgets" section of everyone's preferences, so users can choose which gadgets fit their wikia needs. An overview of added gadgets can be found on Special:Gadgets, along with links to the respective pages that define them, which allows for better control over the wikia's gadgets.

The Special:Gadgets page allows quick overview and easy management of all your gadgets interface with easy linking to every special page that controls all of your gadgets functionality and interface. The headings that appear in your preferences may also be redefined here.

Please note that all Gadget MediaWiki namespace pages must be prefixed with Gadget-, the only exception is where you define them in MediaWiki:Gadgets-definition as displayed in the above example.

See also

Further help and feedback