Extension:Upload Fields
This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. |
Upload Fields Release status: unmaintained |
|
---|---|
Implementation | User interface, Media |
Description | allows the configuration of custom upload fields to be added to the Special:Upload page. |
Author(s) | Alexia E. Smith (Alexia E. Smith) |
Latest version | 0.0.3 (2018-11-08) |
MediaWiki | 1.30+ |
PHP | 7.0+ |
License | GNU General Public License 2.0 or later |
Download | GitLab: Note: |
Vagrant role | UploadFields |
The UploadFields Extension is a MediaWiki extension which allows the configuration of custom upload fields to be added to the Special:Upload page. Information from those custom fields is then added to the Template:FileInfo template on the file page.
- Project Homepage
- Documentation at Github
- Source Code
- Source code at Github
- Bugs
- issues at Github
- Licensing
- UploadFields is GPL-2.0+ Copyright 2017 Curse
Installation
edit- Download and place the file(s) in a directory called
UploadFields
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'UploadFields' );
- If necessary configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
editTo create a new upload field start by creating a new page in the MediaWiki namespace.
The format of the page name is: UploadField-field_type-Name
Valid types are:
- select - Select drop down. Supports option groups down to two depths.
- multiselect - Series of check boxes for multiple selection. Supports option groups down to two depths.
- text - Single line text input.
- textarea - Multiple line text input.
- category - Display a multiple select drop down of existing categories on the wiki.
If you wanted a drop down HTML select field named "Game" you would create the definition page: MediaWiki:UploadField-select-Game
Field Types
editselect and multiselect
editThese two types support two levels deep of listed options which is limited due to HTML specifications. Simply make a standard unordered list up to ** deep. Any blank lines and lines not starting with * with be ignored.
Each selection value should be in the format of: TemplateValue|Label Name
* Main Series ** Part1|This Amazing Game Part 1 ** Part2|This Amazing Game Part 2 * Combinations ** CE|Collector's Edition
Example: Selecting "This Amazing Game Part 1" from the "Game" field when uploading a new image would result in "Game=Part1" being added to the FileInfo template.
{{FileInfo |Game=Part1 }}
text and textarea
editThe text and textarea types add their respective single line or multiple line text fields to the upload form. The content of the MediaWiki:UploadField-text(area)-Name definition page will be filled in as a default value and can be left blank.
category
editThe category type produces a multiple select check box list of existing wiki categories to choose from. There is no filtering and any content added to the MediaWiki:UploadField-category-Name definition page will be ignored.