Wikia

Wikia Developers Wiki

Bobogoobo

aka Template Repairman

203 Edits since joining this wiki
April 30, 2013

Welcome

Hi, welcome to Wikia Developers Wiki! Thanks for your edit to the CustomToolbarLinks page. If you need help, read through our help pages or contact a local admin. If there are no active admins here, stop by Community Central and check out our forums.

Looking for live help? Then join us for an upcoming webinar to chat with staff and other Wikia editors. You can also check our Staff blog to keep up-to-date with the latest news and events around Wikia. Lastly, check out the Wikia Video Library, where you can find premium licensed videos to add to the wiki.

All of these links are a great way to start exploring Wikia.

Happy editing, Grunny@Wikia (help forum | blog) 08:39, April 30, 2013 (UTC)

Suggestions

Hey, I'd strongly recommend wrapping your code in either an Immediately-Invoked-Function-Expression or an extension of the global Window object so as to not create global variables. Also, you might want to make some eye-candy changes as well with indentation and coding style. See https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript for more info.TK-999 (talk) 16:20, April 30, 2013 (UTC)

Thanks for the information, I think I've addressed most of it. ~Bobogoobo (talk) 22:53, April 30, 2013 (UTC)

Semi-colon and closure

The semi colon is there to as a failsafe, in case someone forgot to add one at the end of of a script that is being imported before yours. There's more informaton on it here. It looks a little odd, but when you don't know what other scripts are being imported you can never be too safe. I actually had it happen to me last week with the importArticles() statement on RuneScape Wiki and it broke the ~10 scripts after the script with the error.

As for the globals in the closure, it's better described by plugging it into something like jshint. Remove the globals from the closure and you'll notice it comes back with $ and mw being undefined. These aren't standard javascript objects and the symbols/letters can be used by other libraries (Mootools is an example). If another library was to be imported there could be issues with what $ now means. Does it mean jQuery or this other library? Adding jQuery into the parens at the end of the function makes sure it always means jQuery. cqm 08:10, 22 Jun 2013 (UTC)

I believe Pecoes uses semi-colons at the start of his scripts, if you want more examples of it (one is SexyUserPage/code.js). It's not in the coding conventions because scripts should never need to fix other scripts failures, but as most of the script here are designed to be imported it's not hard to imagine there might be other scripts also being imported.
The other libraries may not be included by standard (jQuery is ported with MediaWiki since 1.16 or something), but you can just import them if you find a need for them. For instance at RuneScape Wiki we import tundra. In this case there's no confusion, but it shows how other libraries can be imported if you find a need for them. cqm 08:35, 22 Jun 2013 (UTC)

HighlightUsers

Hellow Bobo! I wanted to tell you about your script created, I talking about of "HighlightUsers". Works great, of course. The problem is that the script is not right when you want to highlight links users to have the AjaxRC enabled. When the RC is not auto-reload, the script works fine, but when used AjaxRC, colors are normal links to wiki's default color. Is there any solution for this? Thank you! ɥsɐD ʎʇooɔS 23:30, November 22, 2013 (UTC)

Add the following code above the importation of AjaxRC:
window.ajaxCallAgain = window.ajaxCallAgain || [];
window.ajaxCallAgain.push(highlightUsers);
~Bobogoobo (talk) 05:38, November 23, 2013 (UTC)
Bobogoobo wrote:
apparently I was asked about this before, might as well add this here since I guess people don't check the AjaxRC documentation or know what to do
Bobogoobo, U see, what happens is that the code you showed me in the top ONLY works only with wikis in English, because I inserted my global.js correctly, but when inserting the AjaxRC longer work for me, so I guess the problem is that I use different wikis into English. That's what I believe, and if I'm wrong, you can correct me. FluttershyWinkEmote.pngScooty Dash (talk) 16:57, December 4, 2013 (UTC)
That was a bug that I had meant to fix. It should be working now, thanks for reminding me. ~Bobogoobo (talk) 02:04, December 5, 2013 (UTC)

just reminding, how is progress on matching color code to user rights with only the highest user right displaying?Nerfmaster8 (talk) 04:45, December 26, 2013 (UTC)

I'm sorry for the delay! I have a lot of projects and things have been very busy. I tried coding a fix for this; does it work correctly now? (Keep in mind that higher user rights should be specified later in the setup code.) Let me know if there are any remaining issues and I'll try to fix them as soon as possible. Thanks, ~Bobogoobo (talk) 08:25, December 26, 2013 (UTC)

TopEditors Namespaces

Hi Bobogoobo! I have a question about the TopEditors extension. For the namespaces section, I looked on this page to find the namespace numbers I could use. But I could not find the number for the Thread namespace and that is something I am looking for. Do you know where I can find the namespace number for namespaces unlisted like Thread? Thanks! :)

{{SUBST:TheMattChatter}} 00:37, February 3, 2014 (UTC)

The easiest way is to go a page in that namespace, open the source code, and search for "wgNamespaceNumber". It's the number next to that. ~Bobogoobo (talk) 01:43, February 3, 2014 (UTC)
There's also runescape:MediaWiki:Namespace numbers. Everything from 112 to 121 are custom, non-standard namespaces that are only found on RuneScape Wiki. All others should be standard across Wikia. The only one I know of that it's missing is Board (2000) which is probably because we never installed the wikiaforum extension. cqm 02:31, 3 Feb 2014 (UTC)
Thank you so much! But I'm having a hard time finding the namespace for user blog and user blog comments.
{{SUBST:TheMattChatter}} 19:15, February 9, 2014 (UTC)
Try 500 and 501. ~Bobogoobo (talk) 00:36, February 10, 2014 (UTC)

TopEditors Usernames

Hello there,

For users who have ranks (and have different colored usernames), if they have a space in their name it will not show their username as the color it should be. For example, I'm an admin on the Club Penguin Wiki, and instead of my name showing as green, it shows up as if I have no rank. If you could fix this, that would be really great. Thank you :) —Preceding unsigned comment added by Kallie Jo (talkcontribs) 22:25, 9 February 2014‎ (UTC)

Could you link me to an example of what you're talking about? ~Bobogoobo (talk) 00:36, February 10, 2014 (UTC)
Try adding an underscore (_) instead of a space. Lil' Miss Rarity ]Open Source[ (talk) 12:44, February 10, 2014 (UTC)
What Lil' Miss Rarity said. Also, for an example of what I'm talking about click here. My username doesn't appear as green, but I'm an admin on that wiki and all admins' names should appear as green (everywhere else on that wiki my name is green :P). Sorry for not being clear enough, sometimes I'm really bad at explaining things.
Kallie Jo (talk) 21:41, February 10, 2014 (UTC)
Oh sorry, forgot to mention this: it also happens with UserRightsRecord, example here.
Kallie Jo (talk) 22:10, February 10, 2014 (UTC)

Both should be working now. Let me know if there are any more problems. Thanks for bringing this to my attention! ~Bobogoobo (talk) 23:51, February 10, 2014 (UTC)

Thank you, works perfectly now. :)
Kallie Jo (talk) 01:12, February 11, 2014 (UTC)

Drill-down

Continued from Talk:TopEditors

In some of these cases, I want to see a listing of the results that counted towards the totaled value. Having a link or a method to create that sub-list based on the initial list would be very helpful.

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:36, April 16, 2014 (UTC)

Yeah, that sounds useful. Can you link me to somewhere you're using this script so I can look at how best to add it? For now, I printed the API query used to the browser console - place the URL fragment given after ".com" in the URL of any page on the wiki to see the raw query data. I think I can link to the actual RecentChanges page for the query though, so it'll be a lot prettier. ~Bobogoobo (talk) 04:23, April 18, 2014 (UTC)

Sure! Here's the sandbox page I'm using to test it out on marvel.wikia.com: User:Peteparker/Top Editors.

I attempted to run the raw query using the last url fragment in the console, but didn't get exactly what I was looking for. I was hoping to see a list of the pages that made up each user's edit count, but instead saw a list of users. I used this url.

Thanks again!

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:39, May 27, 2014 (UTC)

Ah yeah, forgot I limited the output. Would something like this be readable enough or would you want it parsed into something prettier? ~Bobogoobo (talk) 01:11, May 28, 2014 (UTC)

Around Wikia's network

Random Wiki