Wikia

Wikia Developers Wiki

Cqm

Admin
546 Edits since joining this wiki
April 13, 2012
Unless requested, any messages posted here will be replied to here in order to keep a centralised, easy to follow discussion.

Thanks

Thank you for the code formatting, and to answer the question... I have no idea how it worked but it just did. User:Shining-Armor

No problem. All I really did was run it through jshint and fixed the errors that came up there. cqm 14:21, 29 May 2013 (UTC)
Whenever I run code through Jslint it gives me errors that do not make sense. like saying $ in $.get is defined before use. User:Shining-Armor
It's because the jQuery object, $, isn't standard javascript. jQuery is a (popular, high use) library that is ported with MediaWiki. There's a checkbox below the code input area labelled something like "Assume jQuery" that'll fix that. You can just ignore those errors if you want through. It'll do the same for every use of the mw (mediaWiki) object too. cqm 17:14, 29 May 2013 (UTC)

(Reset indent) It's more convenient to add the options directly to your JS code as comments. This e.g. will tell jshint to treat jQuery, $ and mediaWiki as globals:

/*jshint jquery:true*/
/*global mediaWiki:true*/

Check the jshint documentation! There are a lot more options. This is the prologue that I copypaste into every new file:

/*jshint jquery:true, browser:true, devel:true, camelcase:true, curly:false, undef:true, bitwise:true, eqeqeq:true, forin:true, immed:true, latedef:true, newcap:true, noarg:true, unused:true, regexp:true, strict:true, trailing:false */
/*global mediaWiki:true*/

The mediaWiki makers recommend jshint too btw. Though their recommended procedure is a little too complicated for most needs. --  pecoes  16:45, May 30, 2013 (UTC) 

Closures

Can you please attempt to explain to me what this does -- why it's necessary to pass global variables into an IIFE? And what's the beginning semicolon for? That's not even in the recommendations and I don't think it looks good. ~Bobogoobo (talk) 05:52, June 22, 2013 (UTC)

I figured that was what the semicolon was for -- an idiocy shield. If something's broken it should be fixed anyway. I guess it's harmless and useful, but then why doesn't every script do it (that's the first time I've seen it) and why isn't it in the coding conventions? As for the closures, obviously $ and mw are undefined in jshint since it's not a page that the script is meant to run on, which always have those defined. The rest is unnecessary because what the heck else on a Wikia page would use those? If Wikia even wanted to use something that would override those, I'm sure they would prevent it, so that they didn't break every single thing that already uses it. But again, harmless and good practice I guess, so...anyway, thanks for the explanations. ~Bobogoobo (talk) 08:22, June 22, 2013 (UTC)

Welcome

Hi, welcome to Wikia Developers Wiki! Thanks for your edit to the User talk:Pecoes page.

Please leave a message on my talk page if I can help with anything! Grunny (talk) 09:44, July 22, 2013 (UTC)

Source Tag

The source tag is deprecated? Since when? Where does it say that? --  pecoes  09:01, July 26, 2013 (UTC) 

On the extension documentation itself: mw:Extension:SyntaxHighlight GeSHi. It's not obvious, Special:TagsReport still reports on source tags rather than syntaxhighlight and source tags still work (for backwards compatibility perhaps?). Nonetheless, the extension docs say to use syntaxhighlight as seen in the tags used section of the infobox. cqm 09:16, 26 Jul 2013 (UTC)
Ah. I see. You mean this:
"Before rev:50696, the extension used the tag <source>. This is still supported, but <syntaxhighlight> avoids conflicts if your source code itself contains <source> (for example XML)."
It doesn't say "deprecated" though. It only says that <syntaxhighlight> has less conflict potential. --  pecoes  09:31, July 26, 2013 (UTC) 
Considering the general lack of mention of them I'm inclined to remove them incase they become unsupported at some point in the future. cqm 09:42, 26 Jul 2013 (UTC)
I think you're overinterpreting the word "still" :) --  pecoes  09:49, July 26, 2013 (UTC) 

Creating a new discussion for ajaxRC

I'd submit your changes to AjaxRC at Portal:Code review so it can hopefully be pushed to AjaxRC/code.js by new week. --Kangaroopowah (Talk) 18:55, August 1, 2013 (UTC)

Cheers, will do. cqm 19:46, 1 Aug 2013 (UTC)

Code

Sorry to waist your time, but where did you learn code — OriginalAuthority at Wikia Developers Wiki File:Favicon.ico 17:21, August 10, 2013 (UTC)

I started out with a bit of codeacademy to teach me the basics. I got to the point where I wasn't learning anything particularly useful to me, so started reading through the various scripts on my home wiki. From there I picked a project and learned what I had to make it all work, largely through googling my problem which usually led me to stackoverflow (a truly fantastic resource). I think my earliest fully fledged script was w:c:rs:User:Cqm/adminreport.js. It sstarted out as querying the mediawiki api for the number of wanted files/page/templates/categories, broken and double redirects and unused files. From there I added a way to detect if there were pages in certain categories (page for deletion for example) and then when certain pages were last edited.
Just pick something you want to do, then figure out how to do it. It doesn't need to be an elegant script, as long as it works it serves as a learning exercise. I used HeaderLinks/code.js as an exercise in native js, as I'd largely been using jQuery up until then. If I got stuck I'd just google my problem until I found an answer.
PS. The favicon image in your sig doesn't work. cqm 18:08, 10 Aug 2013 (UTC)
Thanks, I'm actually using codecademy, I've been doing it for a while, I've run into the same problem as you, nothing useful. The sig problem is due to there being no favicon for this wiki, there using an alternative file. — OriginalAuthority at Wikia Developers Wiki File:Favicon.ico 18:22, August 10, 2013 (UTC)

Chat help

Yes well can you come to my wiki Chat i have few quesionsJarjarkine (talk) 00:20, November 22, 2013 (UTC)

Wait you cant edit the wiki cuz youy are not admin..Jarjarkine (talk) 00:23, November 22, 2013 (UTC)

The next iteration for ajaxrc

Hey cam. So this is what I was thinking we could do for the next version of ajaxrc. First, expose the script under either the dev.ajaxrc global or just the global AjaxRC. Secondly, make a way to change ajaxrc configuration through object notation, not individual global variables, while maintaining backwards compatibility with the old version. Finally, I want to see what I can do about submitting a pulls request so we don't need to have a recentchangeslocal variable in the script. Does that sound good to you? I'll probably have the first two done by the end of the first week in January. Best, --Kangaroopowah (Talk) 16:29, December 26, 2013 (UTC)

The global thing seems like the next step in the development of the script. I'd stick with keeping it under the dev global for consistency's sake, perhaps combine it with a version/timestamp to make sure we're using the version imported from dev (if for some reason we can't find the import). As for the config, what about using dev.ajaxrc for the config then extending it using $.extend in the main script.
For the pull request, it could take an extraordinarily long time. github:Wikia/app/pull/1470 has been open 4 months with negligible progress. That's assuming we can even convince wikia to class it as something that requires a fix. I assume you know it needs to enter wikia's bug tracker before a pull request can be opened, let me know if you want any help writing a s:c to argue your case. cqm 00:04, 27 Dec 2013 (UTC)
Two things. Firstly, don't worry about the pull request. Secondly, the way you exposed ajaxrc in cqm/ajaxrc.js is the more verbose (and honestly, a bit more complicated) of the way to do it. The way im planning to do it is to create an nd variable in the closure header as dev.ajaxrc and then initialize it at the bottom of the script with all the methods there in object literal form. --Kangaroopowah (Talk) 03:33, December 28, 2013 (UTC)
Ok so I finished my version of the new config and global object. They're over at /beta.js. The disadvantage to the way I handled the globalness is that it doesn't have "write" capabilities, that is to say modifiying the object's functions from console won't actually change the way the script performs. If we were to change it we would use the way you started coding it in your userspace. You should not however that this is an important design descicion for the script that should be thought about fairly carefully. Lastly about the config, our implementations user-side wise are the same but yours way buggy if dev.ajaxrc existed but only had some config options but not all so I fixed that. Best, Kangaroopowah (Talk) 03:25, December 29, 2013 (UTC)

Thanks

Thanks :-) Ismael Perez (talkcontribsblog) 18:28, February 16, 2014 (UTC)

Code Editor Permission

I have several scripts on this wiki, and would like to have them protected. However I would also like to still be able to work on them. Do you know how I can get "Code Editor" permissions?

Code Lyoko Wiki: User: Deadcoder 15:19, March 22, 2014 (UTC)

You'll need to request the right on Grunny's talk page. If he think you're competent enough to warrant being enough in the group, he'll grant your request. As a warning, he might take a while to respond to the message so don't expect a reply immediately. cqm 16:39, 22 Mar 2014 (UTC)
Thank you.
Code Lyoko Wiki: User: Deadcoder 20:07, March 22, 2014 (UTC)

ChatTags

Man, why the images of the chat tags are not working? I just tried to fix ...

--Affquesaco (talk) 15:19, March 23, 2014 (UTC)

It was intentionally removed because it was a security risk, not because it was broken. Re-enabling it on a wiki puts every user in chat at risk of malicious scripts. Please leave it removed until that risk has been patched. cqm 15:22, 23 Mar 2014 (UTC)

LESS

Your LESS project is very interesting. I cannot wait to see how it works out. Lil' Miss Rarity ]Open Source[ (talk) 13:20, March 26, 2014 (UTC)

You can take a look at it here if you'd like :)
The main problem is that the js version of less isn't designed to be used the way I need, so I'm working with next to no docs and from a few notes on stackoverflow. Added to all the other projects I'm doing, it's slowly coming along ;) cqm 02:10, 28 Mar 2014 (UTC)

Usertags

Hi do you know where's the code WIKIA use for adding masthead for: Wikia staff, Wikia star, VSTF or ect ? The script they uses i wuold like to see it Please.Emperor Jarjarkine (talk) 14:50, April 5, 2014 (UTC)

Wikia add the tags server side, the code for doing that is spread across at least two files: controller, template. The tags themselves are set elsewhere, likely using a database query, but I couldn't see anything from a quick search. cqm 15:07, 5 Apr 2014 (UTC)

Request

Congratulations on becoming an administrator here. You'll be a great asset to us all.

I was wondering if you could perform the things I requested on Grunny's talk page awhile back. That is if it isn't too much trouble. Lil' Miss Rarity ]Open Source[ (talk) 12:43, April 22, 2014 (UTC)

Both done :) cqm 13:18, 22 Apr 2014 (UTC)
Thank you! Lil' Miss Rarity ]Open Source[ (talk) 13:23, April 22, 2014 (UTC)

ChatTags

Is there any reason that ChatTags/code.js shows up in raw format? I have tried other browsers and I have looked at other code pages and this is the only one that shows up like this. I cannot even edit it. Any help would be appreciated. Lil' Miss Rarity ]Open Source[ (talk) 15:42, April 26, 2014 (UTC)

I've double checked the protection settings, it's fine. I haven't tried editing it, purely because I'm on my phone and don't want to screw anything up accidentally. Is it giving any errors when editing, e.g. permissions? Any errors in your console? I don't quite understand what "raw" means - as if it's not been parsed by geshi? Have you checked in both skins or from multiple devices?
I'll pull out my test account later, if you can give me some pictures of what you're seeing that would be great :) it could be a varnish cache based error, which might be fixed through a null edit. Other than that I don't know what it might be without a more detailed description of the bug and some first hand investigation. cqm 18:57, 26 Apr 2014 (UTC)
It shows up as if I appended ?action=raw to the URL. I cannot edit it, I cannot move it, no history, no anything. It's acting like it's serving a normal JavaScript page. Lil' Miss Rarity ]Open Source[ (talk) 19:00, April 26, 2014 (UTC)
Ok, I'll take a proper look when I get back tonight to see if I can reproduce what you're seeing.
On a side note, please get rid of the font tags in your sig, they were deprecated years ago :P cqm 19:07, 26 Apr 2014 (UTC)
It appears fine to me--~UltimateSupreme 19:21, April 26, 2014 (UTC)

(Reset Indent) This is what I see whenever I try to load the page. Also Cqm, I know they are. I've been meaning to switch them for quite some time now. Lil' Miss Rarity ]Open Source[ (talk) 19:35, April 26, 2014 (UTC)

I do remember something like that happening to me too. Did you try manually appending ?action=edit?--~UltimateSupreme 10:42, April 27, 2014 (UTC)

Re:

I see, okay I'll add it to the JS page on my test wiki. Also, I know how to set it up :P.

Lil' Miss Rarity ]Open Source[ (talk) 12:45, April 28, 2014 (UTC)

Masthea

Yo Cqm ! I just talked to Jr because i have problems with the masthead of my wiki. He tried to fix it but it didn'T work. So i was wondering, as you're a Dev, do you think you can do something ?=http://fr.shingekinokyojin.wikia.com/wiki/MediaWiki:Common.js/masthead.js?action=edit{{SUBST:User:Emperor Jarjarkine/Sig3}} 21:47, April 28, 2014 (UTC)

It's probably throwing errors because of all the empty strings for the Patrouilleurs users. I've made a fresh version here which fixes the script for Special:Contributions/USERNAME with some style changes to make it a bit simpler, as well as fixing the bug. Hopefully it's fairly self explanatory to edit, but let me know if you have any questions. cqm 22:15, 28 Apr 2014 (UTC)

Reorganize List of JavaScript Enhancements

Some of the tabs in the List of JavaScript Enhancements have grown so large that they are hard to look through. Would it be okay if I reorganized the lists so things were easier to find? Code Lyoko Wiki: User: Deadcoder 16:48, May 4, 2014 (UTC)

How exactly would you reorganize them? --Kangaroopowah (Talk) 18:32, May 4, 2014 (UTC)
I think they'd benefit from some automatic updating via dpl or some sort of category intersection extension, but that would require reworking the relevant infoboxes first.
Is there anything in particular you wanted to do? All I can really see is some alphabetisation changes you've made so far. cqm 23:35, 5 May 2014 (UTC)
So far, I have done the alphabetization. I would like a stronger reorganization. What I would probably do is break it into 4 sections on the page:
  • Wiki-wide only, which would be stuff that should only be installed wiki-wide
  • co-installable, which can be installed either way
  • User only, which can only be installed at the user level.
  • None-installable, which would be the dead, beta, or un-maintained scripts.
I would probably add more categories. For example, I would add a dedicated tab to chat extensions, since there are so many of those. I might add one explicitly for file management, since those seem to be numerous as well
Code Lyoko Wiki: User: Deadcoder 04:00, May 7, 2014 (UTC)
I'm not a fan of the 4 sections, purely because you'll have duplicated subcategories under each section making it harder to find things. It might be an idea to add a little icon for scripts that can be installed site-wide. None-installable seems a bit subjective too. For example, ReferencePopups still works afaik, but it's been unmaintained for a long time. I don't know anyone who's willing to mess with Lunarity's codebase either. Similarly ShowHide still works last I heard, but it's been deprecated in favour of mw-collapsible. That's not to say it doesn't work or isn't still perfectly usable - not even enwiki uses mw-collapsible everywhere.
Ideally I'd like to see some work on the infobox and then see the lists updated by dpl. Whilst some users know about the list, other don't and not everyone lists their scripts there. Some of the categories/params we could add the the infobox are:
  • unmaintained
  • beta
  • type - this could be chat, ui customisation, etc. Essentially what we have as the tabs now.
We could add a category to scripts that can be enabled site-wide, user or both, although I can't see how it would fit on the list. Perhaps it should enable a transclusion of {{personal}} instead? Anyway, do you have any thoughts on said infobox changes?
The extra categories, i.e. chat, file management, look good :) cqm 12:58, 7 May 2014 (UTC)
In that case, I will add the additional categories, but I won't divide them into sections. An alternate solution is to have them in categories, and within each category, break them up along those lines. But I won't implement that right now.
Code Lyoko Wiki: User: Deadcoder 15:04, May 7, 2014 (UTC)
I just updated it with those two additional categories. I think it's been a change for the better, but I still think that more improvements are needed.
Code Lyoko Wiki: User: Deadcoder 15:23, May 7, 2014 (UTC)
What do you think of the changes, so far?Code Lyoko Wiki: User: Deadcoder 21:52, May 20, 2014 (UTC)
In truth I'm not a fan of straight lists. Then again, I'm even less of a fan of tabbers. I think both are uninspiring and univiting in terms of UI and don't lend themselves to anything that I would want to interact with.
However, my opinions about the format aside, I do think the extra categories you've added are a definite improvement and something I'd like to implement as actual categories. DPl is enabled now and a bug that was apparently causing some nasty side-effects has been temporarily fixed, so I'm going to have a play around with creating a UI that generates dpl queries on the fly, maybe making use of some parsoid too - I've been wanting to try it out for a while. cqm 23:24, 20 May 2014 (UTC)
Personally, I'm not a fan of the tabbing either. The only reason I've kept them so far is that the alternatives were even worse.
I too think DPL would be good for this page; but we will have to do a major overhaul on the categories on this wiki in order for that to be done effectively. If you think my chosen categories would be a good basis for that, let me know, and I will implement them as actual categories. Code Lyoko Wiki: User: Deadcoder 15:18, May 26, 2014 (UTC)

Wikia Nav Problem/Fault

Everytime i add a page link title onto the wikia navigation, it doesn't show up and I need a solution to why the page link title doesn't show up. —Preceding unsigned comment added by LiamJaco1998lfc (talkcontribs) 20:55, May 14, 2014

Hi, I'm a little confused what you're asking for help with. Do you meant the wiki navigation that's edited through MediaWiki:Wiki-navigation? If that's the case, you can't edit it without being an admin on the wiki you're editing it on.

Deletion

UserTags/module.prefLanguages.js has a link in the infobox; you probably deleted it by mistake.--~UltimateSupreme 11:17, May 21, 2014 (UTC)

My apologies for that. Not quite sure how I managed to delete that, I must have not noticed being redirected to it somehow. Sorry if I broke something. cqm 19:48, 21 May 2014 (UTC)
Yeah, redirects do make it confusing
Its probably just something for a project that never finished... so nothing broke.~UltimateSupreme 08:57, May 22, 2014 (UTC)

Sorry Cqm- was looking at the timer talk page but missed your direct note.  I'm new to wikia.

I can run two different countdown timers on a page.  But, they aren't completely independent as they appear to share the same data-end variable.  If I set this flag on the first timer, the second will also end when the first does.  Both timers end up showing the post-countdown text, but the second timer also shows the countdown date instead of continuing to count down.  Example below of the first timer ending causing both timers to end.

Any ideas on how to run two independent countdown timers that can have their data-end trigger independently?



Is there anyway possible to make a drop down table??  I want to make a table filled where i can drop down and select to show only one specific row

Around Wikia's network

Random Wiki