Board Thread:Support Requests - Getting Technical/@comment-1455034-20130113015020/@comment-4674838-20130113235712

Code to copy/paste into your http://nitrome.wikia.com/wiki/MediaWiki:Wikia.js

// User images notification // http://community.wikia.com/wiki/Thread:476904 if (mediaWiki.config.get("wgAction") === "view" && (!window.localStorage || !window.localStorage.getItem('#NitromeUserImagesNotification'))) { (function ($, mw, window) {		var wgServer = mw.config.get("wgServer"),			wgUserName = mw.config.get("wgUserName");		if (typeof wgUserName !== "string") {			$(createNotification);		} else {			var url = wgServer + "/api.php?action=query&format=json&list=usercontribs&uclimit=10&ucuser=" + window.encodeURIComponent(wgUserName);

$.get(url, function (data) {				try {					if (data.query.usercontribs.length < 10) {						$(createNotification);					}				} catch (e) {}			}); }		function createNotification { // HTML for the notification (no wiki markup allowed here, e.g. link here is not HTML) var notificationHTML = ' Please remember to upload fanart (fan-made Nitrome images) on the Nitrome Fan Fiction Wiki, and personal images (images unrelated to Nitrome) on an external imagehosting site. To embed fanart and personal images, please visit this page '; // add notication into the page $('#NitromeUserImagesNotification').remove; $('body').append(notificationHTML); // close the notification when clicking the x			$('#NitromeUserImagesNotification .close-notification').click(function {				$('#NitromeUserImagesNotification').remove;				if (window.localStorage) {					window.localStorage.setItem('#NitromeUserImagesNotification', 'dismissed');				}			}); }	}(jQuery, mediaWiki, window)); }


 * The code for the notification itself is the line that says var notificationHTML =. You can edit it from there if you need to change the notification. Note that it was necessary to change the links from wiki markup to HTML.
 * The notification will appear for all anons (logged out users) because it is either not possible (or prohibitively difficult) to detect how many edits an anon has.
 * The notification will appear for logged-in users with < 10 edits
 * After you've placed the code in your MediaWiki:Wikia.js, the notification will appear on all pages across your wiki (unless the user has already dismissed it by clicking the "x")

Let me know if you want me to change the conditions, or if you see any bugs with the notification.