Forum:Customizing the contents shown through "Add an image"

Hey there, is it possible to customize the contents shown through "Add an image", when clicking on it with a left click? Or is it possible to have the same results that with a right click, thus directly going to the proper Special:Upload page?... It seems they did it on Wookieepedia, so I guess it's possible. If anyone can help, I'd be glad. Thanks. Klow 15:31, March 27, 2011 (UTC)


 * Wookieepedia probably got that through Special:Contact. You could ask staff, but they'll make you cite a community discussion.


 * Taken from Wookiepedia's MediaWiki:Wikia.js page:

 $(document).ready(function {	// Restores normal upload form since the popup one ignores source and license policy. Adapted from http://es.pokemon.wikia.com/wiki/MediaWiki:Wikia.js.	$('a.wikia-button.upphotos').unbind('click',UploadPhotos.showDialog); });
 * Add it to your .js page and it should disable the pop-up. Not sure if that's not a violation of the ToU though. Sovq 16:09, March 27, 2011 (UTC)


 * Documented on here --Ciencia Al Poder (talk) -WikiDex 16:10, March 27, 2011 (UTC)
 * @Ciencia Al Poder - Check your link, it doesn't go anywhere.
 * Fixed, sorry --Ciencia Al Poder (talk) -WikiDex 17:51, March 27, 2011 (UTC)
 * Thanks, I got my answers from a Wookieepedia admin. ;) Klow 14:57, March 28, 2011 (UTC)


 * What's now needed is for the user to be redirected to Special:Upload if they click a placeholder image box.



-- LordTBT Talk! 22:58, April 1, 2011 (UTC)


 * Assuming it isn't a ToU violation to do so, add this to your JS:

 function PlaceholderLink { $('.wikiaPlaceholder a').attr('href', '/wiki/Special:Upload').onclick(''); }

addOnloadHook(PlaceholderLink);
 * That should redirect placeholder buttons to Special:Upload.


 * It's been determined that this code causes the editing toolbar to disappear... -- LordTBT Talk! 19:03, April 16, 2011 (UTC)
 * I seriously doubt that. How can you be sure?
 * Maybe, since you are passing an empty string as the onclick parameter, but it should be a function. It may cause a JS error. On another note, use $ instead of addOnloadHook where possible, since the later could break the load of other scripts if one causes an error. --Ciencia Al Poder (talk) -WikiDex 20:24, April 16, 2011 (UTC)
 * The editing toolbar went missing on my wiki, and I removed this code from the JS and it re-appeared. Pretty simple. -- LordTBT Talk! 07:04, April 17, 2011 (UTC)
 * Try  instead of the empty string, then.
 * You're doing it wrong. Please, at least test the code before posting it here:

 function PlaceholderLink { $('.wikiaPlaceholder a').attr('href', '/wiki/Special:Upload').unbind('click'); } $(PlaceholderLink);
 * But, since the redirect to Special:Upload won't update the page where the placeholder exists, I'd rather prefer to hide by CSS the upload form in the placeholder popup, so people still can add an existing image using the search. --Ciencia Al Poder (talk) -WikiDex 09:08, April 17, 2011 (UTC)

(unindent) Has anyone asked Wikia via Special:Contact why they won't just add the license menu to the "Add a photo" UI like they should, so they won't be continuing to encourage people to violate the various licenses they pretend to abide by? I've tagged this post staff needed to see if Wikia staff will respond to this question. -- Fandyllic (talk &middot; contr) 16 Apr 2011 3:23 PM Pacific


 * Yes. Apparently the purpose of that dialog is to be "less complicated". -- LordTBT Talk! 07:04, April 17, 2011 (UTC)

UNtagging. The license menu was added the popup (though it may still have a bug depending on when you read this). It should be noted that the snippets of code listed above do change functionality for the whole wiki, and thus do break the TOU. If they are found by Wikia staff, or otherwise reported, they will be removed. --Uberfuzzy 09:18, June 15, 2011 (UTC)