User:Espyo/PikipediaUpload

PikipediaUpload is a script I wrote for the wiki that replaces the Special:Upload page's form with a different one. The old form asked the user for a description and a license, which put too much responsibility on the user's side, particularly in terms of knowing what categories to put the image under, and what license the image really belongs to. The new fields ask a lot of questions to the user, but they're simple to follow, and help make sure that the image is categorized and labeled the best way possible.

The new form
Simply put, the new form works like this:

It begins by hiding the old license box, since that won't be used any more. Then, it replaces the instructions at the top with custom (and simpler) ones. The extra fields work as follows, and most of the options can be picked from a list:


 * The main field, "Type of file", asks the user for what type of content this is (screenshot, texture, concept art, etc.).
 * Depending on the image type, it may ask the user for the game that this belongs to. It can also handle non-Pikmin games.
 * Depending on the game and image type, it may ask the user for the game mode and/or area, if any.
 * Depending on the game and image type, it may ask the user to specify what the main subject is (a Pikmin, a leader, an obstacle, etc.), if any. It can also ask for specifics (e.g. if it's a Pikmin, what type?).
 * Depending on the image type, it may ask if there are any extra properties to the image, like if it shows prerelease content, or a glitch.
 * Depending on the image type, it may need to ask the user where they got the image from (or if the user made the image themselves), and ask for a license. It's also possible to pick an option for when the user doesn't know the license.

As the options get answered, the script writes down the final wikitext result in a textbox. For this, it uses the template, filling in the parameters as the user answers. This textbox is what MediaWiki itself will read to place on the file's page. The script also hides this textbox from the user by default, but a button at the bottom of the form allows the user to show it and manually tweak it, if needed.

To note is that if the user runs into an upload warning after clicking "Upload file", the script's extra fields portion will not run (otherwise it would destroy all of the user's choices, since it has no way of memorizing from the old page), but will still hide the license. Also to note is that if the script is running, a small box will appear on the top-right corner stating that fact. This is a good way to know if the script is up and running or not.

Creation
This script was created during early 2016 with the goal of making the upload process less painful. Mostly in 2014 and 2015, wiki staff tried to push forward a policy where uploaded images should be categorized under a myriad of categories. But this proved too hard to simply follow. In addition, the staff noticed that some users who uploaded images (mostly screenshots) did not pick a license, presumably due to the scary nature of the question. In an effort to fix both problems, and to improve the upload process in general, I wrote this script to change up the fields in the upload form for something more friendly and helpful to the wiki.

Changelog
If there was an update recently and you cannot see the changes on your end, try refreshing the page while bypassing the cache (usually you do this by pressing Ctrl+F5).
 * 1
 * Initial version.
 * 7
 * If the user was sent to the upload warning after clicking "Upload file", the script would run and would wipe out all of the final processed info. This was fixed.
 * Added a file type for Pikipedia images.
 * 18
 * Made it so the script does not run if the current upload is on top of an existing file (i.e. when the user clicks on "Upload a new version of this file").
 * 1
 * Added Pikmin for Nintendo 3DS support.
 * Added a notification on the upload page to tell the user that the script is running.
 * 13
 * Added support.
 * 16
 * Added flexible support for the user to choose where the unreleased game's footage has come from.
 * 21
 * Added Merchandise as an option for the type of image.
 * 31
 * Updated it on the account of Hey! Pikmin release.
 * 20
 * Added cutscene images as a misc. category.
 * 5
 * Hopefully forced the "final result" table row to be the last one, instead of it choosing randomly between being the last one or the second one.
 * 14
 * Disambiguated the Challenge Mode image categorization between the two games.
 * 12
 * Added support for.
 * 27
 * Corrected instances of "for 3DS" to "for Nintendo 3DS", when referring to the fourth Super Smash Bros. game.
 * 5
 * Added support for.
 * 30
 * Removed the Pikmin 3 Deluxe prerelease options.
 * 18
 * Added Side Stories as a game mode.
 * 22
 * Added more licenses.
 * 27
 * Added support for.
 * 15
 * Added a promotional material type.
 * 21
 * Fixed Pikmin Challenge Mode image categorization.
 * 8
 * Added support for promotional images to specify a game.
 * 15
 * Added a "version" field.
 * 13
 * Added and its reveal trailer.
 * 8
 * Added Pikmin 4's February 2023 trailer as a source option.
 * 4
 * Added support for the new format of artwork categorization.
 * 6
 * Added Pikmin 4's first June 2023 trailer as a source option.
 * 21
 * Added support for and, and added Pikmin 4's second June 2023 trailer as a source option.

Future
Nothing planned.

Known issues

 * If the user picks a main subject, but leaves the subject full name textbox blank, the image will get categorized under "Category: images".