Jump to content
MediaWiki

Template:Add alternative text

From mediawiki.org
Template documentation
This template is a template gadget. It requires the AddAlternativeText gadget to work, which is loaded automatically when this template is used.

This template inserts a tool for adding alternative text to images.

This tool was originally meant for Wikipedia, but can be used in any wiki. See the installation instructions to get it working in your wiki.

Usage

[edit ]

By category

[edit ]
{{Add alternative text|Category:Extensions supporting Composer}}
Loading...

By template

[edit ]
{{Add alternative text|Template:Extension}}
Loading...

By watchlist

[edit ]
{{Add alternative text|Global templates}}
Loading...

Installation

[edit ]

To install this template in your wiki:

  1. Create a template with the following markup. You can choose the template name, parameter names and defaults to suit your wiki.
    <includeonly><divclass="AddAlternativeText"data-seed="{{{seed|{{{1|}}}}}}"data-group="{{{group|}}}">Loading...</div>[[Category:Gadget:AddAlternativeText]]</includeonly>
    
  2. Create MediaWiki:Gadget-AddAlternativeText.js with the following code:
    /**
     * AddAlternativeText is a tool for adding alternative text to files
     * Documentation: https://www.mediawiki.org/wiki/AddAlternativeText
     * Source code: https://www.mediawiki.org/wiki/MediaWiki:Gadget-Global-AddAlternativeText.js
     */
    mw.loader.load('//www.mediawiki.org/w/load.php?modules=ext.gadget.Global-AddAlternativeText');
    
  3. Add the following gadget to MediaWiki:Gadgets-definition:
    * AddAlternativeText[ResourceLoader|hidden|default|categories=Gadget:AddAlternativeText]|AddAlternativeText.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 Commons:Data:Gadget-AddAlternativeText.tab.

Template data

[edit ]

This template inserts a tool for adding alternative text to images.

Template parameters[Edit template data ]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Seedseed 1

Seed page from where to get the files

Example
MediaWiki
Page namerequired
Groupgroup

User group to which to limit the use of the tool

Example
autoconfirmed
Stringoptional

See also

[edit ]
The above documentation is transcluded from Template:Add alternative text/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.

AltStyle によって変換されたページ (->オリジナル) /