User:Lakituthequick/Draft

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search

Talk Page Proposal on Template:MK race courses

TPP fails with 4-10, no changes.

Option 1

Option 2

TPP on Aboutfile

TPP fails with 6-9, no changes. The icon is replaced with a cross icon

Lakituthequick/Draft close_icon.png
Info
Template

{{Aboutfile}} automatically in upload description

I found out how to automatically add {{Aboutfile}} in the description. The following things must be done:

Create a page MediaWiki:Upload.js with the following text:

//<source lang="javascript">
/***** loadAutoAboutfileTemplate ********
 * This automatically adds the Aboutfile template in the summary box on Special:Upload.
 * Adapted from nl.wikipedia.org/wiki/MediaWiki:Upload.js by Lakituthequick
 ****/

function loadAutoAboutfileTemplate()
{
 uploadDescription = document.getElementById('wpUploadDescription');
 var doubleBracket = '{' + '{';

 uploadDescription.value = doubleBracket + 'aboutfile|1=[Subject of the image]|2=[Where you found the image]|3=[Artist]|4=[Describe edits, if any]|5=[Other versions (use [[:File:File.ext]])}}';
}

addOnloadHook(loadAutoAboutfileTemplate);

//</source>

It would be nice to include the part with my name in it!
This adds the following text in the summary-box:

{{aboutfile|1=[Subject of the image]|2=[Where you found the image]|3=[Artist]|4=[Describe edits, if any]|5=[Other versions (use [[:File:File.ext]])]}}

If something has to change, contact me on the talk page.

Secondly, add the following to MediaWiki:Common.js:

/* Automatically add Aboutfile in file-description by running a script. Source: nl.wikipedia.org/wiki/MediaWiki:Common.js */
if (mw.config.get('wgCanonicalSpecialPageName') === 'Upload') {
	importScript('MediaWiki:Upload.js');
}

This will do the job, I tested it on my home-test-wiki. It works with every user-language. No extensions need to be installed. Tell me on the talk page if you have any questions.