Hi, welcome to Wikia Developers Wiki! Thanks for your edit to the File:AutoEditDropdown.png page.

Please leave a message on my talk page if I can help with anything! -- Grunny (Talk) 06:27, 30 April 2012


I added the ListFiles code to my wiki's MediaWiki:Common.js page. One of the features is supposed to give a list of raw text filenames, but everything still looks the same whenever I check the file special pages. I'm new to programming so I don't know what's the problem, therefore I was wondering if you could help. Thanks in advance! M.J. Daniels (talkcontribs) 05:35, July 13, 2014 (UTC)

Your UserTags config is wrong. Just remove it as its useless anyway.--~UltimateSupreme 08:30, July 13, 2014 (UTC)


Hi, I just saw that the runescape wiki. Used this code in the "MediaWiki:Common.js". I don't think they known that it's against the rules. I think they got it from my wiki since they add my name with the auther. Funny since that was only for 5 minutes or something in the common.js.

I was wondering if we would be able to get permission from wikia to use this code in the mediawiki common. We maybe could ask it to Grunny the staff member. To make the import code legal. I think your more an expert or those things, so I'm asking you. What do you think?--Jens Ingels (talk) 18:41, August 14, 2012 (UTC)

If you'd like to get permission to use the search script in MediaWiki:Common.js, the best way would be to send an email to staff at Special:Contact. Or you could keep using it until it becomes a problem. If staff want you to remove a script, they'll tell you. (Note: The Runescape wiki doesn't appear to be using the script you linked. If you check in w:c:runescape:MediaWiki:Common.js and search for "searchOpt" -- I don't see that script anywhere in there.) — Mathmagician (message wall) 10:01, August 17, 2012 (UTC)

Well they probaly removed it when I told it on the runescape chat. I though it was beter they removed it so fast as possible since a lot of users use the runescape mediawikia as an example. I send an request to the wikia for making those imports legal.--Jens Ingels (talk) 15:47, August 17, 2012 (UTC)

Yeah, they removed it after Dopp told them it wasn't allowed. As the person behind a similar looking search tool, some users came to me saying Runescape were using my code globally. I found out it wasn't, but the discussion appears to have alerted staff to the issue.    ǝsʞpɐןǝ  (talk page)  14:21, 19/08/2012
Ah I see, so that's what happened. Thanks for clarifying :) — Mathmagician (message wall) 21:34, August 19, 2012 (UTC)

Preferences module

I don't know if you're following Talk:UserBadges but I'd really like to hear what you think of the preferences module. -- pecoes 06:24, September 23, 2012 (UTC)

Documentation Templates

We need a few templates for documenting methods, properties, class and modules. It would be swell if we could agree on common requirements and design. I've started a page named DocTemplates. Take a quick look, please!

Alternatively I could also unearth my work on a custom JsDoc Toolkit skin. Here's a prototype.

Please comment on Talk:DocTemplates! -- pecoes 08:45, November 07, 2012 (UTC)


It's time to update the logo a little, I think. The Helvetica version works relatively well, but it's a bit bland.

Wikimarks-logo-new-black.png Wikimarks-logo-new-white.png

This is a typeface named "Bubblegum" :)

Do you like it? Or do you have an alternate suggestion? --  pecoes  10:38, November 27, 2012 (UTC) 

<table style="margin-left: 25px;"><tr style="color: black; font-size: 120%;">
<td style=" padding: 4px 8px;">{{Wikimarks}}</td><td style=" padding: 4px 8px;">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td></tr><tr style="color: white; font-size: 120%;">
<td style=" padding: 4px 8px;">{{Wikimarks}}</td><td style=" padding: 4px 8px;">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td><td style="padding: 4px 8px; ">{{Wikimarks}}</td></tr></table>

On second thought, I should probably do away with the image and use the typeface directly. --  pecoes  14:41, November 27, 2012 (UTC) 
If you ask me, I have to say Webdings. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 21:36 UTC, Tuesday, 27 November 2012
Not sure if you noticed but that displays as clear text in FF. Only Chrome shows the actual Webdings. That reminds me of something... --  pecoes  23:11, November 27, 2012 (UTC) 
Gah, Firefail. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 23:16 UTC, Tuesday, 27 November 2012


I see you've finally uploaded it. Nice :)

And it seems you also fixed the jQuery UI compatibility problems. --  pecoes  20:38, December 08, 2012 (UTC) 

Yeah, I've been tinkering around with this thing for a long time, so I finally decided to stop obsessing over little things and just post it so I can move on. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 21:29 UTC, Saturday, 8 December 2012
A wise choice :) --  pecoes  21:53, December 08, 2012 (UTC) 

Script Request

Hey, where can I request a script? I've seen people do it, but I can't seem to find the page :/ NickFusi0n Talk Contribs 23:57, December 29, 2012 (UTC)

I'm not sure that there is a specific place to request a script here on this wiki, this is a pretty low traffic wiki. Most script requests I've seen people just tend to directly ask someone on their talk page if they can write it for them. If you want, you can describe to me what kind of script you're looking for. I may be able to help you with it. If not, then at least I can direct you to someone who can. Also sometimes there are script requests in the Community Central forums ("Getting Technical" board), so you could try there instead if you want. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 05:53 UTC, Sunday, 30 December 2012
Ah, okay. And as for my request. It's an "Announcer" type of script for Chat. Basically, like Monchoman's Chat Hacks, MultiPM, etc. There's a button that allows a Chatmod/Admin to enter in a message and send it to all users. But it would look like the "InsertNameHere has left the chat". I mean the text in the middle with the ~ around it. Like I said, it would be like an announcing script. When a chatmod/admin enters the message, it appears to all users in the same fashion as "user has left the chat" or "user has been banned by user". It would be "highlighted". Sorry if I didn't explain everything clearly, English is not my native language. I made a screen edit to show what I mean: http://i.imgur.com/4mnVC.png NickFusi0n Talk Contribs 08:57, December 30, 2012 (UTC)
If math is ok with me doing it, I can do that for you. --Kangaroopowah (Talk) 18:16, December 30, 2012 (UTC)
Okay, thanks :) NickFusi0n Talk Contribs 18:42, December 30, 2012 (UTC)
Okay, that works out great. Thanks :) 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 20:41 UTC, Sunday, 30 December 2012
Nice! I will be away from home for a few days.. Please inform me on my talk page if the script is done and I'll check it out ASAP. Thanks! NickFusi0n Talk Contribs 17:07, December 31, 2012 (UTC)
As a status update, I'm done coding, and am just testing right now. Only admins, not chatmods can announce btw. Is that fine? --Kangaroopowah (Talk) 22:58, December 31, 2012 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── I found out how to include chat mods, but it's a command- /announce instead of a button. Is that fine?

Completely done. Consider it a New Year's present ;). I'm posting on your talk too btw. --Kangaroopowah (Talk) 07:41, January 1, 2013 (UTC)
Yeah, I saw! Thanks :D NickFusi0n Talk Contribs 10:01, January 1, 2013 (UTC)

How's railgun

Been busy with other stuff? So have I :p. it was a good script with lots of potential though- I'd love to work with you to get it up and running again. However, IMHO, you should change railgun to be a plugin API for scripts on wikia and have core plugins that do what it does now- basically take the API to the next level. --Kangaroopowah (Talk) 01:33, February 23, 2013 (UTC)

Hey, yes I have been busy with other stuff. I'm actually not really sure what state Railgun is in right now, so I will have to find it (I can't even remember where I moved the project folder -- I think it's on my other computer XD) and figure out where things were at.
But yeah, if you're interested on working with it that would be cool. Let me get back to you once I find the project folder and have a chance to dig through the source code again, because I know for a fact that any version(s) of it currently on Wikia are way out of date / the implementation is flawed. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:30 UTC, Saturday, 23 February 2013

Wanted Pages

Hey Mathmagician, do you know of any way to exclude pages checked for by #ifexist functions on Special:WantedPages, and if not, do you know of something that can render Special:WantedPages like ListFiles does for those pages? Thanks! Revitalizer (talk) 22:43, February 26, 2013 (UTC)

I'm sorry, I don't understand what you mean exactly (for both questions). Can you explain a bit more what you're trying to do? 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:59 UTC, Thursday, 28 February 2013
No, no, I'm sorry. I'll try to explain it better. When the #ifexist parser function checks to see if a page exists and it doesn't, that page is added to Special:Wantedpages. Unfortunately it does so even when it's a filepage being checking for. Checking for images (filepages) is basically all I use #ifexist for, so being able to exclude those pages in Special:Wantedpages would be helpful. I also wanted to know if there's a way to create a simple text list of pages in Special:Wantedpages like what ListFiles does for various pages that list files (though this isn't TOO important since the (x links) can be stripped pretty after just highlighting and copy/pasting the list). -Revitalizer (talk) 04:34, March 1, 2013 (UTC)
"When the #ifexist parser function checks to see if a page exists and it doesn't, that page is added to Special:Wantedpages"
I was not aware of that. I can't say I know of any way to prevent that from happening, but that does sound weird to me. Have you considered filing this as a Special:Contact/bug report to Wikia to see what they think about it? I thought the point of Special:WantedPages was only to list redlinks such as Thispagedoesntexist. But adding "Thispagedoesntexist" to Special:WantedPages when you use {{#ifexist: Thispagedoesntexist}} sounds like undesirable behavior to me.
For your second question of having a simple text list of pages in Special:WantedPages, here's a small snippet of JavaScript you can add to your w:Special:MyPage/global.js:
// create raw textarea list of pages on Special:WantedPages
if (mw.config.get('wgCanonicalSpecialPageName') === 'Wantedpages') {
	$(function ($) {
		var str = "";
		$('ol.special li a:first-child').each(function () {
			str += this.textContent + "\n";
		var $textarea = $('<textarea id="wantedpages-textarea">');
		$textarea.css({ width: '95%', height: '150px' });
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:55 UTC, Saturday, 2 March 2013
I took your advice and contacted Wikia about it. If you're interested, you can see this in play here; all those filepages (which take up almost 30% of the first 500 entries) are courtesy of #ifexist.
Thanks a ton for the coding by the way! It makes managing this problem a lot easier. -Revitalizer (talk) 00:00, March 3, 2013 (UTC)
I brought this issue up with an admin of a wiki I edit. She was able to solve the issue using the Exists template (http://meta.wikimedia.org/wiki/Template:Exists). I asked her to post her solution at the mediawiki question for the issue: http://www.mediawiki.org/wiki/Extension_talk:ParserFunctions Felderburg (talk) 15:28, April 4, 2013 (UTC)

Transcluding the amount of wanted (files/pages/categories)

I'm trying to find a way to see the amount of wanted files without actually being on the page itself and I remembered you made something that could be used by AWB's HTML scraper for something similar. So far, I've got:

Wanted Files (<span id="w-files">0</span>)

On the page I'm trying to get the value, to with the code being:

$.get('/wiki/Special:WantedFiles', function () {
	$('.w-files').replaceWith($('.special > li').length);

$('.special > li').length returns the number of wanted files when you're on Special:WantedFiles, but doesn't seem to work here. I know using > as part of a selector in jQuery is bad practice but I couldn't find a better method from various google searches. I should add:

if ($('.special').length) {
//code goes here

but at the moment it's not really working. Any ideas? cqm 00:55, 8 Mar 2013 (UTC)

The jQuery.get() function (as well as some others like jQuery.getJSON(), jQuery.post(), jQuery.ajax()) can be given a callback function (which you've done), but the callback function is meant to have a data parameter (which yours is missing) where the data will be sent to. So you would want to try something like this:
$.get('/wiki/Special:WantedFiles', function (data) {
If you run that code, it will print data to your console. You'll notice that it's a string which contains the raw HTML of the Special:WantedFiles page. There's your second problem: you're trying to say "grab the contents of .special li in the current document's HTML using jQuery". But you can't do that because the HTML isn't in the current document -- it's stored as a string in the data parameter. Instead, you would need to parse that string using string functions to grab the HTML and count the number of <li> elements.
However, it turns out that rather than HTML scraping, you can get these results directly from the API (click this link, then do a CTRL+F search for "Wantedfiles", the relevant API call is listed in the first and only result). This turns out to be much easier:
$.getJSON('/api.php?action=query&list=querypage&qppage=Wantedfiles&format=json', function (data) {
	// wanted files are stored in data.query.querypage.results
    // and the number of wanted files is the length of that array
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:31 UTC, Saturday, 9 March 2013
Thanks! I set my dreams a little higher than just Wanted Files, ending up with w:c:camtest:MediaWiki:Maintenance.js. It doesn't work at the moment because it turns out you can't assign the data to a variable then pass it outside of the function without a little extra work, but it's close ;)
Maybe I'll turn it into some sort dropdown toolbar added into the skin(s) somewhere. cqm 09:45, 10 Mar 2013 (UTC)
I think the main problem that you ran into is essentially demonstrated by this:
var stuff = "blah";

$.getJSON('/api.php?action=query&list=querypage&qppage=Wantedfiles&format=json', function (data) {
	stuff = data;

    // stuff === data
    console.log("Inside the callback, stuff =", stuff);

// stuff === "blah" because the AJAX request is asynchronous
// and hasn't been completed yet at the time the parser reaches this line

console.log("After the AJAX call but OUTSIDE the callback, stuff =", stuff);
It looks like you managed to solve this "problem" by setting async: false. You can do that, but -- as much as it satisfies your sensibilities -- there is one severe drawback to setting async: false: An AJAX call takes a short period of time to complete (usually somewhere between 0.5 and 1 second).
Let's say you need to make 10 AJAX calls. If you do them asynchronously, the browser can do them in parallel essentially at the same time, so the total run time of your script is 1 second.
If you do those 10 AJAX calls synchronously, each call has to wait for the previous one to complete. So the total run time of your script is 10 * 1 = 10 seconds.
As long as the calls are independent of each other, you always want to do them asynchronously as that will be faster. In this case, I would recommend creating the HTML first and then populating it on the AJAX pass afterwards, e.g.:
// create HTML first
$('#mw-content-text').append('<div id="some-id"></div>');

// then do AJAX stuff and populate your HTML with the numbers
$.getJSON('/api.php?action=query&list=querypage&qppage=Wantedfiles&format=json', function (data) {

20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 18:11 UTC, Sunday, 10 March 2013
And here's the finished project :) (the script's here). I decided adding the table with javascript was largely unnecessary when I could have it already on the page. I had a little trouble getting the for loop to work, but nonetheless thanks for all your help :) cqm 11:31, 12 Mar 2013 (UTC)
Very nice, glad you were able to get it to work :) 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 02:40 UTC, Wednesday, 13 March 2013

Suggestion for js code

Hello mathmagician. I edit on a wiki with badges, and I thought it would be neat to have a countdown displayed somewhere that said when the next thousandth edit was coming, in order to increase likelihood of getting a lucky edit badge. I don't have any idea how hard this might be to implement, though. Could you message me back?— NTPYTO (talk) 20:51, March 18, 2013 (UTC)

(Happened to still be watching this) Well, I assume page revisions relate to number of edits, the lastest revision on dev wiki is 11149 which is a unique value across the wiki. If you altered the url of that link to diff=1 you will probably find the first edit on the wiki. As far as retrieving that value, it's a little harder.
The only way I can think of doing it is to query the API for the most recent edit, retrieving the revision id from that. It's certainly possible, Special:RecentChanges retrieves the most recent edits along with the revision ids for showing page diffs, it's just a matter of finding the correct query. I believe it requires a date parameter, so it'll probably be a static number only updated on page refresh, unless you want to add some ajax to refresh it every minute or so, but that could cause some issues with other scripts loading. cqm 23:20, 18 Mar 2013 (UTC)
@Cam: Unfortunately the revision id won't work. For example, I just saw that someone on my wiki got the "Lucky 116,000th" edit badge with this edit (the numbers don't match).
My guess is that the achievements feature uses its own internal counter for tracking # of edits for that badge — and that data is encapsulated in the PHP layer server-side, meaning that I don't think there's a way to access it from a user standpoint.
You're welcome to dig around in Wikia's source code to see if you can find anything related to Achievements that might be helpful. https://github.com/Wikia/app/tree/dev/skins/oasis, I noticed a few things in these directories: js, modules and modules > templates. Unfortunately, I'm not really good with PHP, and I didn't see anything that looked usable for scripting.
@NTYPO: This is a neat idea, but I think it's just not possible (or at least, I can't see any way to do it). Sorry. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 02:28 UTC, Tuesday, 19 March 2013

My problem with MarkForDeletion

I have a problem Math. Namely, MarkForDeletion/code.js. My problem isn't with the code, but rather with the fact that you've technically sealed it off from editing by others. As of now, I will respect that and will continue to, but I'm really unesasy about it. If you want to that with a script, put it on your private wiki. Why do you think Scope is on my test wiki. I don't want people messing with it. It's (Scope) a good program, but it's really really delicate at the moment and it's really easy to break it. I go through 5 stages of testing before it's released to stable and make sure I know whatever bugs are in it so that I can assess whether it's worth the tradeoff of releasing it and fixing later than to fixing right then and wasting a week or two. My point is, if you want to do that with MarkForDeletion, then you should put it on your test wiki. With the exception of a few highly used scripts (namely AjaxRC and ShowHide) the purpose of dev is to have a place to host scripts that are editable by all. If someone makes a change you don't like, as script creator, by all means revert it. But don't tell people not to edit it. Not at dev. Thanks, --Kangaroopowah (Talk) 03:45, March 19, 2013 (UTC)

I will go ahead and remove the 'please don't edit' notice from the script. The intention was to deter people from making changes in the early stages while I was still considering changing things, I just kind of forgot about that after the fact. Feel free to edit it now if you like. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:00 UTC, Tuesday, 19 March 2013
Thanks. --Kangaroopowah (Talk) 04:43, March 19, 2013 (UTC)

A question

Hello Mathmagician, I have a litle question: Whay is the difference between an import like this:


and like this:

    type: 'script',
    articles: [

--José Dedede (talk) 22:37, April 8, 2013 (UTC)

importScriptPage is a relatively simple function that's been around for quite some time. importArticles is a new addition and makes use of the ResourceLoader. The ResourceLoader can compact files, cache them and import multiple files in a single download. If you only import a single script, it doesn't really matter which function you choose, but if you import more than one, then importArticles is clearly superior. --  pecoes  00:07, April 09, 2013 (UTC) 
I have been looking for an answer to a similar problem: what's the difference between importScript (or importArticles) and importScriptURI (or it's replacement)? importScript has yet to have an official mediawiki replacement due to not finding anything suitable, so there is clearly a difference, but I can't find anything noting the difference. cqm 00:32, 10 Apr 2013 (UTC)
Hm. There should be a help page where all of these function are documented, shouldn't there?
Okay. Here's a mini-documentation:
  • importScript and importStylesheet load a file from the same wiki
  • importScriptPage and importStylesheetPage load a file from the same or another wikia wiki (second parameter)
  • importScriptURI and importStylesheetURI load a file from a full URL
All of these functions are actually rather primitive. They add a <script> tag for scripts and a <link> tag for stylesheets to the document and let the browser handle the rest. That's also why loading multiple scripts and stylesheets this way is highly inefficient. There's simply too much traffic and too little to do for the browser. Instead of spending all of the time between the first request and DOMContentLoaded building the page, the browser spends most of the time waiting for data. Browsers are incapable of building pages before all scripts and stylesheets have downloaded. That's an inherent limitation of HTML.
I've already linked to the ResourceLoader docs above, so I'm not going to duplicate those here, but suffice to say, the RL does an awful lot more. It accepts more than one script/stylesheet at once, fetches the files on the server side, compacts them (i.e. removes whitespace and comments), merges them into a single file, caches that file for several minutes for speedy retrieval upon re-request and then delivers it to the browser. (Acually it does even more than that. It inflects stylesheets e.g. to accomodate wikis that use a right-to-left language, etc.)
That's the reason why importArticles is faster if multiple files come into play. But do keep in mind that this only works with files that do reside on Wikia's server(s). You cannot import files from another mediaWiki project such as mediawiki.org or any other web site for that matter with importArticles.
I'm not entirely certain what this addSource method is used for, but you most definitely cannot use it to import files from arbitrary sources. The file needs to be stored at Wikia. --  pecoes  01:26, April 10, 2013 (UTC) 

NoImageLightbox Has Stopped Working


The NoImageLightbox script seems to have stopped working over the past few days. The Lightbox is appearing in the most recent versions of both Firefox and Chrome, so I am fairly confident the problem is not on my end. I left a notification on the relevant talk page, though as the script's developer, I felt I should alert you directly.

--Whistle9 (Talk) 19:31, April 20, 2013 (UTC)

Thanks for giving me a notification here, that definitely helps me to find the report faster. I've pushed a fix and replied over on the talk page, so please follow up there if there are further issues in the near future and I'll be sure to check back. Thanks! 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 23:49 UTC, Saturday, 20 April 2013


Hey Mathmagician, could you update the ImportArticles template so it also would be usefull for css articles? Currently I only displays info for scripts. --Jens Ingels (talk) 23:09, May 4, 2013 (UTC)

Hey, that template is only meant to be used for scripts. The idea is that it's supposed to encourage people to group their imports together. If you want to have one for CSS, I would suggest making a different template so that the content can be kept separate. The template was never intended to say *everything* about importArticles — it's just meant to cover one small but important topic.
On a separate note, I think most people use importArticles to import scripts. While it can also import stylesheets, I think that usage is a lot more rare. In my opinion, using JavaScript to load CSS for site-wide styling is generally a bad idea and should be avoided (for CSS used only in personal user scripts, it's OK). Generally it's best to put all of the CSS in MediaWiki:Wikia.css directly, or else import it with a CSS @import statement.
For example, the following CSS @import statement would batch import MediaWiki:Common.css, MediaWiki:Style1.css, and MediaWiki:Style2.css. (This is documented at w:Help:Including additional CSS and JS#Advanced Usage.)
@import url("/load.php?mode=articles&articles=MediaWiki:Common.css|MediaWiki:Style1.css|MediaWiki:Style2.css&only=styles");
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:14 UTC, Sunday, 5 May 2013

Thx for the info, I agrea you make the templates split but I think an clear template for the @import should be something on the todo list. I find the current docs and info that is given about the @import to obscure and I'm sure an lot of newbies will scratch their head if they want to use this function.--Jens Ingels (talk) 20:18, May 5, 2013 (UTC)

New Template Idea

Hey Mathmagician, I have an idea for an new template for the installation section: {{Script Install}}. Maybe to improve it an (?) hovercontent buttom can be add like is done on the legouniverse wikia templates. What do you think? --Jens Ingels (talk) 18:31, May 6, 2013 (UTC)

I made an example here: ActiveTabs. This idea would be that every color or action has his own color:

  • Green = JavaScript
  • Blue = CSS
  • Red = HTML
  • etc...

I think it also would be usefull to request an css modication to the mediawiki common.css. --Jens Ingels (talk) 22:04, May 6, 2013 (UTC)

Is this meant as a design suggestion for the entire wiki? --  pecoes  03:33, May 07, 2013 (UTC) 

Interesting. I do like the idea of sprucing up the design around here a little bit. But per Pecoes, this sounds like a design change that would affect the entire wiki. Sounds like we should collect some more opinions.
Can you give me a link to the hovercontent button like for templates on legouniverse that you mentioned?
Also, I think we should ask Grunny for a Code-editor CSS page that we can use for site-wide styling — similar to DemoScripts.js — that we can use for both 1) page-specific demos for pages in Category:CSS and 2) site-wide styling, e.g. templates like the one you're proposing, or the Template:ImportArticles that I crafted recently. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:16 UTC, Tuesday, 7 May 2013

I just think an clear design could help an lot of players to navigate and install the content they need. Not everyone knowns js, css and html. Especially young and new users that start their first wikia. An colored design could help them easy navigate between the 3 languages.

I agrea this should be discusses by the entire wikia. I already made some examples on these 3 pages:

I can't find it anymore on their wikia. Maybe it was another one. I don't remember. But what the buttom did was just hovertext like HoverContent#note2. Inside this popup their was extra info located about the template. We would use this buttom to add extra information about the headers. Example:

  • Header: Installation
  • Popupcontent: "If you are an administrator of a wiki who would like to apply this script to your entire wiki, you should import {{PAGENAME}}/code.js. You can copy/paste the following into your wiki's MediaWiki:Common.js to install the script for all users on your wiki"

Some other wikias also use this to explane what an template does, view the template docs or mention this section is an template with or without an extra buttom. I could make an example if you want since I don't remember what wikias are using this system.

Ask Grunny is an good idea. Maybe we can setup an css source so he only have to copy/pass the action. But you could also ask grunny for the admin rights so changes can be implemented more regularly.

Currently since we don't have the css option yet I made the following templates:

  • Template:Color: So we can easy change and adjust the color bound for every language.
  • Template:H2: Header2 style (I'm still thinking about an nice H3 and H4 style)
  • Template:SourceModus: I nowtest that an lot off user have trouble to get to this modus and how to work with it. Since the sourcemodus mostly get active after implemented html I think it would be an usefull template when it's finished.
  • Template:Script Install
  • Template:CSS Install
  • Template:Import or Template:@Import: For css import.

--Jens Ingels (talk) 09:31, May 7, 2013 (UTC)

If this is indeed meant to be used wiki-wide then I'll give my opinion right away: Sprucing up the design is fine with me in general, but this design is too bulky and too intrusive for my taste. I'm also not a fan of color codes. There is no such thing as a meaningful color scheme that would help people find what they want any quicker. It's been tried a gazillion times before on a gazillion web sites and I'm not aware of a single one where it's actually helpful. Probably because such color codes are so arbitrary that people don't bother to commit them to memory. Or can you tell me why metal screws and surgery are yellow while wood screws and internal medicine are green? --  pecoes  09:56, May 07, 2013 (UTC) 

It maybe could work in this case since every code js is basicly detected as green, html as red and css as blue in most syntax markings. I find it usefull. Even it's only to spice up the design for every source tag. Even if the player don't understand the color differents if would fit with the design. I don't think the color would be that large of an issus since the sections are split so the only mix you could get is green and blue. And those codes kinda work together. The type of blue and red can also be adjust to ballance the colors out.

For the headers edits. What about converting them into tabs? Tabber, Headertabs or an other tab codes like ActiveTabs could spice up that navigation. Headertabs would be the best option in this case but only if the wikia staff can remove or adjust the current css they have add in this extension.

One other things. The lego wikia is moving their content and that's why I couldn't find it. I found one still active on the fanon version of the wikia. This wiki only has an limited version of the code and it probaly need to be improved. I already made an page for it: Iconi. It's one line of code but I'm sure it's will become large if all config options are add. Here's the limited version of the icon in action w:c:lustories:Power_II:_Dawn_of_Eternity. Template: w:c:lustories:Template:Info and js location: w:c:lustories:MediaWiki:Wikia.js.

--Jens Ingels (talk) 19:53, May 7, 2013 (UTC)

Template Idea.png

Here's an image example about the tabs idea. I used the ActiveTabs page for this example.

--Jens Ingels (talk) 12:41, May 8, 2013 (UTC)

It definitely looks like you've put a lot of work and thought into this. I do like you how added some color with rounded borders around the default code block though. With some tweaking, I think it would look much nicer than the ugly default code block:

/* default code block... kinda ugly, should be restyled somehow */

background similar to the one Dev Wiki used to have

Otherwise, I have to agree with Pecoes, I'm not a huge fan of the color coding. Especially for Template:H2, I really don't like that look. I think the normal headers are fine.

While Template:SourceModus seems to have good intent, but I think it's a bit out of place. Remember, The Wikia Developer's wiki has a generally smart audience. It's a safe assumption that most people who would be visiting this wiki to look for coding know what source mode is and the basics of how to use it.

To summarize, I don't really like this kind of styling or template organization. What I would prefer to do is just minor, small changes. For example:

  • Restyle the default <syntaxhighlight> code block
  • Add a background to the wiki (As a suggestion: the one pictured above)
  • Have a CSS page to use for demos, similar to how we have DemoScripts.js.

20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:16 UTC, Thursday, 9 May 2013

Problems with AjaxRC

There's been a couple problems with AjaxRC and I'd appreciate it if you could step into the conversation. Thanks, --Kangaroopowah (Talk) 19:15, May 11, 2013 (UTC)


Hey Mathmagician. I ran on your code that you wrote, MarkForDeletion. I have edited it to enter different templates and different edit summaries on another wiki. The thing is, the template goes on a talk page. With your coding, it goes on the top of the page.

Where I'm going is, what would need changing to be able to place the template at the end of the talk page?

Thanks a lot Mathmagician! — Jr Mime (talk) 23:53, May 26, 2013 (UTC)

After all, I found out what it was. I had to change prehendtext to appendtext. Thanks for the script! :). — Jr Mime (talk) 00:22, May 27, 2013 (UTC)

ajax rc code review (again)

New Code Review. Can you check it out? Portal:Code_Review:AjaxRC_2. Thanks, --Kangaroopowah (Talk) 02:40, June 1, 2013 (UTC)

Placement of configuration options


The information in Template:ConfigOptions seems to be outdated(?), because

importScriptPage('AjaxRC/code.js', 'dev');
ajaxRefresh = 10000;


Arkondi (talk) 08:05, June 30, 2013 (UTC)

Sometimes, with some scripts, you can set the configurations afterwards and it will still work. Examples:
  • If the script reads the configuration option "as needed" as opposed to "only when the script first loads". (Note: many scripts read configuration options only when the script first loads and save them inside a closure that you can't access – if you try to set them /after/ the script has already loaded, it fails)
  • Because import statements like "importScriptPage" are asynchronous, in the example you posted above, it is possible (but not guaranteed) that the ajaxRefresh = 10000; statement will be executed before the script is actually imported.
In practice, while you may be able to set configurations afterwards, it is almost always safer to set them first. The wording of that template could possibly be modified to better reflect this. Preferring to not delve into technical details that most people wouldn't care about, it's easier to say "as a best practice, just do the config options first, it's safer" as opposed to a long explanation like this one. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 15:13 UTC, Sunday, 30 June 2013
Thanks for clarification. Arkondi (talk) 15:15, June 30, 2013 (UTC)


Hey, Thanks for handling the ajaxrc problem wwhen I as out on vacation. I appreciate it.

--Kangaroopowah (Talk) 16:22, July 13, 2013 (UTC)

Java Games

Hi, do you know if it's possible for wikia users, to play JavaScript games? Original Authority (talk) 10:46, July 20, 2013 (UTC)

Yeah, it would be possible. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 19:55 UTC, Saturday, 20 July 2013
By copying the code to notebook and opening it in a browser...Original Authority (talk) 20:51, July 20, 2013 (UTC)
No, I don't think it would be quite that easy. I'm sure it would be a lot more work than just copying code. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 21:02 UTC, Saturday, 20 July 2013
Oh, may I ask why I'm here, were did you learn to code JavaScript? Original Authority (talk) 18:38, July 21, 2013 (UTC)
I taught myself in my free time, mostly by trial and error and asking other people questions. But in my case, I already had something of a head-start with my background in object-oriented programming in other languages. My learning experience was more a matter of putting some funky new pieces together into a mostly already-completed puzzle, as opposed to learning all programming from scratch. It took several months for me to get to a point where I was comfortable writing JavaScript. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:56 UTC, Monday, 22 July 2013


I copied the code onto the places where it should be, but the script doesn't work. Any ideas why?

Guppie the Third wallcontribs 06:49, August 10, 2013 (UTC)

I have a couple ideas, but I couldn't say for sure without being able to see how you're using it. If you can give me a link to the page on your wiki where you're using it, I can find out what's wrong. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 15:32 UTC, Saturday, 10 August 2013
Here. I tested it here (last section; in case you wanted to see). Thanks Guppie the Third wallcontribs 06:27, August 11, 2013 (UTC)
Okay, you installed and are using it correctly. The problem is that the CSS isn't loading because of an unrelated problem on your wiki. There are syntax errors in your w:c:pvzcc:MediaWiki:Common.css that are breaking the parser and causing the rest of your Wikia.css to not load. Here is the list of syntax errors that you need to resolve. If that doesn't make sense to you, here's what I would suggest:
  • In your Common.css, near the bottom, delete the 3 lines that start with "filter: progid:DXImageTransform.Microsoft.gradient". I believe those are the source of the problem. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 19:15 UTC, Sunday, 11 August 2013

Also, I just noticed in your Wikia.css, you didn't copy the code properly. This is a very common mistake that a lot of people make:
In the block of code below, delete the /* at the top (first line) and the */ at the bottom (last line).
/********** START Timed Slider Styles **********/
/**** http://dev.wikia.com/wiki/TimedSlider ****/
/* hide all slides */
.ts-container .ts-slide {
	display: none;
/* show slide that has class="ts-active" */
.ts-container .ts-active {
	display: block;
/* support inline slides as well */
.ts-container.ts-container-inline .ts-active {
    display: inline;
/********** END Timed Slider Styles **********/
Afterwards, it should look like this:
/********** START Timed Slider Styles **********/
/**** http://dev.wikia.com/wiki/TimedSlider ****/
/* hide all slides */
.ts-container .ts-slide {
	display: none;
/* show slide that has class="ts-active" */
.ts-container .ts-active {
	display: block;
/* support inline slides as well */
.ts-container.ts-container-inline .ts-active {
    display: inline;
/********** END Timed Slider Styles **********/
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 19:22 UTC, Sunday, 11 August 2013
Thank you very much, I just deleted the whole code on the Common.css, it was just a test button. EDIT: It works! :DD Guppie the Third wallcontribs 13:37, August 16, 2013 (UTC)


Hi, I frequently use PortableCSSPad, but there isn't JavaScript support, do you have plans to integrate JavaScript and jQuery. — FarewellEleven at Wikia Developers Wiki Wiki.png 15:39, September 10, 2013 (UTC)

No, I don't have any existing plans to integrate JavaScript or jQuery related features into PortableCSSPad. The pad is intended to be a testing tool for making stylesheets or other CSS tweaks, where visual feedback from the web browser is helpful to see how CSS code affects the design of a webpage.
CSS live testing standpoint: most web browsers provide ways to live test CSS code in the developer tools of the browser itself – but these features are often widely variable between browsers, and some are lacking in terms of testing functionality or ease of use. That was the reason I created PortableCSSPad in the first place, because I wanted an easy-to-use tool with better CSS testing functionality that was consistent across web browsers.
JavaScript live testing standpoint: most web browsers have an simple console which allows you to run JavaScript code on a given web page. For testing purposes, this is quick, easy, and straightforward. I do not think there is a "console functionality" I could possibly add to PortableCSSPad that would be a huge improvement on the JavaScript console that is already built into modern web browsers. When you also take into consideration tools like http://jshint.com/ (quality control), http://jsfiddle.net/ (isolated, easy-to-use JS testing environment), and whatever other text editors or IDE's you like to use during development – I'm personally a fan on Notepad++ and Eclipse – I just don't see where the potential benefit or purpose would lie in integrating some sort of JS/jQuery functionality into PortableCSSPad. What would you use it for when better tools already exist?
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 02:37 UTC, Thursday, 12 September 2013
Ah, I understand all though, this feature would allow tablet users to have a JavaScript tester, seeing as there isn't browser console. — FarewellEleven at Wikia Developers Wiki Wiki.png 17:55, September 12, 2013 (UTC)
I managed to install firebug in my tablet. ~ UltimateSupreme 18:32, September 12, 2013 (UTC)
There are plenty of other options, likely to be far more robust than anything any of us could come up with for testing code on such devices. I've seen the number of complaints when it comes to editing from a tablet/smartphone - it's going to be ridiculously hard to code on them. cqm 00:09, 13 Sep 2013 (UTC)
Ah I see. Unfortunately, I am not a tablet user so I wouldn't be able to help you there. Like Cam, I would point you in the direction of other tools or apps that work better for your specific device. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 02:52 UTC, Friday, 13 September 2013

NoImageLightbox Right Rail Images


In the Photos section of the right rail, the NoImageLightbox script no longer seems to be working; the lightbox loads when an image is selected. I would assume this is a result of the right rail now being lazy loaded with the most recent technical update. I left a notification on the talk page, though as the script's developer, I felt I should alert you directly.

--Whistle9 (Talk) 02:21, October 13, 2013 (UTC)

What a noob. Math, what were you thinking :P. --Kangaroopowah (Talk) 04:50, October 13, 2013 (UTC)
He was thinking Wikia wouldn't break tons of scripts for a minor reason, I assume. ~Bobogoobo (talk) 05:30, October 13, 2013 (UTC)
I was joking, and I assure you that Math knew that I was joking. --Kangaroopowah (Talk) 05:42, October 13, 2013 (UTC)
Rappy posted a handy event to hook scripts onto that rely on the sidebar here, if you wanted ideas. cqm 08:50, 13 Oct 2013 (UTC)
Hey, sorry for delayed response, I am not as active on Wikia anymore due to being busy with work and such. I have added a hotfix (lightly tested) that should allow the script to work with images in the lazy-loaded right rail. Please let me know if it doesn't work or if it breaks anything, otherwise I will assume all is well again :) 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:40 UTC, Wednesday, 23 October 2013


Is not working for file names with quotation marks (maybe other things) - example. Maybe using the URL-encoded form isn't the best way to do it? ~Bobogoobo (talk) 13:37, November 15, 2013 (UTC)

Thanks. If you don't mind, you could provide a little more information? I looked into it a little, and here's my initial thoughts:
  1. Does affect galleries (images included via the <gallery> tag), per your example.
  2. I think this does not affect regular images ( [[File: ... ]] ).
  3. I think this does not affect videos.
Can you confirm #2 and #3? Thanks, 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:58 UTC, Saturday, 16 November 2013
That seems accurate. ~Bobogoobo (talk) 06:37, November 16, 2013 (UTC)

Please see Talk:NoImageLightbox#Picture links issue for another bug that popped up after those changes Wikia made recently that broke a lot of stuff. Thanks, ~Bobogoobo (talk) 04:46, August 20, 2014 (UTC)

Fixed (in case Math gets to this and wonders what happened). cqm 09:01, 20 Aug 2014 (UTC)



Hello, is there a way to center the Timeslider on a desired page?

Revelery 05:33, January 26, 2020 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.