Forum:Preload template when uploading file

Hello. I was wondering if it were possible to allow preloaded text to appear when uploading an image. I would like the following text to appear when clicking "upload file", and I edited some things in MediaWiki, cleared my cache multiple times, and it doesn't seem to be working. Is there anything that should be added to MediaWiki or anything else to make this happen?

Summary
-- Meghunter99 Talk to me! 19:40, 26 August 2009 (UTC)


 * On Special:Upload, there's a drop down box to choose a license. I dont know if the new version of the software added support for this but it wasn't possible last time i've asked about it. — TulipVorlax 23:12, 26 August 2009 (UTC)


 * I am very well aware of the drop down menu of licenses, but that isn't the problem. The Canadian Miliatary forces wiki has this upload page where the template automatically preloads. -- Meghunter99 Talk to me! 23:18, 26 August 2009 (UTC)


 * At the end of their MediaWiki:Common.js we can see :

// ******************************************************************************************************* // ******************************** BEGINNING: JavaScript for Special:Upload ************************* // ******** Code courtesy of "User:Pinky49", created and coded specifically for Duty & Valour ******** // ******************************************** Thanks, Pinky! ******************************************* // *******************************************************************************************************

function preloadUploadDesc { if (wgPageName.toLowerCase != 'special:upload') { return; }

document.getElementById('wpUploadDescription').appendChild(document.createTextNode("==Summary==\n"));

}

// ******************************************************************************************************* // *********************************** END: JavaScript for Special:Upload **************************** // *******************************************************************************************************
 * I think you should ask them before copying... — TulipVorlax 23:31, 26 August 2009 (UTC)


 * Alternatively, you can use the following version that use jQuery, the new JS framework of Wikia.

$(document).ready(function {

if (wgPageName != 'Special:Upload') { return; }

$('#wpUploadDescription').append(document.createTextNode("==Description==\n"));

});
 * — TulipVorlax 00:31, 27 August 2009 (UTC)


 * And if you want this to also work with IE(8), replace every "\n" with "\r\n" or else the text is on the same line. — TulipVorlax 00:54, 27 August 2009 (UTC)


 * I added the new script you suggested to MediaWiki, but it still doesn't seem to work. Instead of the above template comign formatted, all that appears is Template:Information at here. Has something gone wrong here? -- Meghunter99 Talk to me! 02:55, 27 August 2009 (UTC)
 * I dont see how can this be. It's working correctly on w:c:fr.guildwars:special:upload. — TulipVorlax 07:07, 27 August 2009 (UTC)

For anyone interested in placing relatively simple strings (templates without parameters, categories), you can actually use the same functionality as MediaWiki:Edittools on MediaWiki:Uploadtext. See w:c:Spore:Special:Upload for an example. 13:36, 27 August 2009 (UTC)


 * It's only there for people that have their language set to english : see it with language set to french. — TulipVorlax 17:06, 27 August 2009 (UTC)
 * User:Meghunter99, in order to find your problem, add  to the top of MediaWiki:Common.js, and add   to the bottom of MediaWiki:Common.js. --Michaeldsuarez (Talk) (Deeds) 21:54, 31 August 2009 (UTC)


 * OK, I tried this, but I reverted it, as something happened and all the javascript codes seem to not be working now. For instance, as soon as you load this page, the title of the article should automatically become italicized but its not. Furthermore, I've lost all of the added custom edit buttons. I've reverted and cleared my cookies and cache numerous times but nothing seems to be happening. It all started after this I need help! -- Meghunter99 Talk to me! 22:40, 31 August 2009 (UTC)
 * I fixed it be reverting. I'll figure out something. -- Meghunter99 Talk to me! 22:58, 31 August 2009 (UTC)