User:YuviPanda/UploadWizard campaigns docs

Concept
The UploadWizard can be configured to behave in a number of ways using various settings. Often one wants the UW on a single wiki to behave differently for different tasks, in which case more than one set of configuration is needed. The UW allows defining such sets of configuration, also called campaigns, which can then be put into affect by specifying a single argument in the url via which the UW is accessed.

Using a campaign
When navigating to Special:UploadWizard, no campaign will be used, so you will get the default configuration. To get the configuration for a campaign, add ?campaign=name to the url, where "name" is the name of the campaign.

Campaign administration
Campaign configuration is stored as JSON in the Campaign namespace. You can create a new campaign by simply creating a new page in that namespace, and placing the appropriate fields in it.

enabled
This is a boolean variable that specifies if the campaign is enabled or not. This is a required field, and must always be present.

display
This field lets you control what banners to display in UploadWizard

It has the following properties:
 * - Specifies wikitext to be parsed and displayed above the UploadWizard interface.
 * - Specifies wikitext to be parsed and displayed when the user has finished uploading.

tutorial
This field lets you control the tutorial that is shown before the first step of Uploading.

It has the following properties:


 * - Boolean specifying if the tutorial should be skipped or not. Defaults to false.
 * - Name of the tutorial file on the local wiki or commons to be used. $1 in the name is replaced with the current language.
 * - Width of the tutorial, specified in pixels. Defaults to 720.

defaults
Lets you control the default information to be added for the media uploaded. Note that the user can modify them at will before uploading.

It has the following properties:
 * - List of categories
 * - Default description
 * - Default latitude
 * - Default longitude

autoAdd
Specifies wikitext and categories to be added automatically, without user intervention. The user cannot remove or modify these.

It has the following properties:
 * - List of categories to be added by default
 * - Wikitext to be added by default

fields
Specifies custom fields that can be used to request user input during the upload process, and then substituted into the description field of the template during upload. This is an array, and there can be as many fields as necessary.

Each field can have the following properties:
 * - Wikitext to be placed in the uploaded file's description.  is replaced by the value the user typed into the field
 * - Wikitext to be parsed and displayed as the label of the field to the user
 * - Maximum length allowed for this field. Defaults to 25. There is currently no way to specify 'no limits', so just set this to a large value if that is the case.
 * - The initial value to be pre-filled for the field.
 * - Boolean value indicating wether the user can go ahead without filling in this field. Defaults to false.

licensing
Specifies licensing selection options, both for own work and third party licenses.

It has the following properties:
 * - Specifies if the user should have a choice of selecting between ownwork and third party licenses, or not. The following values are recognized:
 * - Show only own work licenses
 * - Show only third party licenses
 * - Let the user choose between own work and third party licenses
 * - Specifies available licenses for own work uploads. Licenses are specified as a list, with a  list sub-property. The first item in the list is considered the default.
 * - Specifies available licenses for third party uploads. Specified in the same manner as for ownWork