Template:Add file caption
Appearance
From mediawiki.org
This template is a template gadget. It requires the AddFileCaption gadget to work, which is loaded automatically when this template is used.
This template inserts a tool for adding structured file captions to files in Wikimedia Commons.
This tool only edits Wikimedia Commons, but can be used from any wiki. See the installation instructions to get it working in your wiki.
Usage
[edit ]{{Add file caption|History of Uruguay}}
Loading...
Installation
[edit ]To install this template in your wiki:
- Create a template with the following markup. You can choose the template name, parameter names and defaults to suit your wiki.
<includeonly><divclass="AddFileCaption"data-category="{{{category|{{{1|}}}}}}"data-group="{{{group|}}}">Loading...</div>[[Category:Gadget:AddFileCaption]]</includeonly>
- Create MediaWiki:Gadget-AddFileCaption.js with the following code:
/** * AddFileCaption is a tool for adding stuctured file captions to files in Wikimedia Commons * Documentation: https://www.mediawiki.org/wiki/AddFileCaption * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-AddFileCaption.js */ mw.loader.load('//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-AddFileCaption');
- Add the following gadget to MediaWiki:Gadgets-definition:
* AddFileCaption[ResourceLoader|hidden|default|categories=Gadget:AddFileCaption]|AddFileCaption.js
Done! Add your template to any page to verify that the installation was successful.
Localization
[edit ]To help localize the messages of the interface, edit Data:AddFileCaption.tab.
Template data
[edit ]This template inserts a tool for adding structured file captions to files in Wikimedia Commons.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Category | category 1 | Category page (with no prefix) on Wikimedia Commons where to get the files
| Page name | required |
Group | group | User group to which to limit the use of the tool
| String | optional |
See also
[edit ]- Commons:Data:Gadget-AddFileCaption.tab - Localized messages of the interface
- #AddFileCaption - All edits done with this tool
- es:Plantilla:Agregar leyendas a Commons - Spanish localization of this template
- User:Sophivorus - Main author of this tool
The above documentation is transcluded from Template:Add file caption/doc. (edit | history)
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.
Editors can experiment in this template’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.