User talk:UltrasonicNXT

From Brickipedia, the LEGO Wiki
Revision as of 18:07, 21 January 2014 by CJC (talk | contribs) (→‎MW import)

Re: StringFunctions

  • Haha whoops :D It didn't show up on Special:Version, so I just assumed that was the problem with the template. I guess I should have tested a more basic function before requesting it NovaHawk 18:04, 9 October 2013 (EDT)
    • (fixed the template- I forgot the default date format was arranged differently on here :P) NovaHawk 18:40, 9 October 2013 (EDT)
      • Also I don't suppose you found out what that problem with the news report namespace was did you (how it won't do anything with smw even though the namespace has been enabled)? NovaHawk 18:40, 9 October 2013 (EDT)

NXTbot

You should probably just make it a global bot. --ToaMeiko (talk) 16:54, 1 November 2013 (EDT)

CSS Rows

The Council of Elrond
79006 alt1 (1).png
Item №:

79006

Released:

June 2013

Theme:

The Lord of the Rings

#b87b1e / D89b3e

Hey NXT, I've run into a bit of a coding problem (surprise! :P). I won't bug you with the specifics since you're probably busy building/fixing some thing way too complex for me to understand, basically I'm trying to get alternating rows working for the new infobox working. I can't use tr:nth-child stuff on common.css, because it needs the background:{{Background}} stuff you made for the original infobox, which only works inline (and likewise for common.js). So I was just wondering if you knew whether there was a way to code a template to get the row number of a table in an infobox? I don't think there is, but I just thought I'd see anyway. Thanks :) NovaHawk 07:53, 5 November 2013 (UTC)

Hmm, this is a certainly tricky one, because of the fact that some rows will not be filled in for all articles. I'll have a think. UltrasonicNXT (talk)
I haven't looked at the code and wouldn't know if this would work, so I'm speaking hypothetically, but could you "count" the number of rows in use somehow, like if |theme= has content, that becomes 1, |year has nothing so is skipped, |minifigures=3, so that becomes 2, etc. Then you could assign all odds as one colour, all evens as another. This sounds like something that would work more with a programming language than web-code though. CJC95 (talk) 16:41, 6 November 2013 (UTC)
Yeah. The easy way is to do it in javascript, however, we shouldn't really... A markup version, as CJC describes, would be incredibly complex once you have 10 rows in a table, though it would be possible. I haven't had any eureka ideas... UltrasonicNXT (talk)
Oh, I never thought of it like the way CJC's describing, it'll be a lot of if statements, but I could work on that sometime. And yeah, I was trying to avoid JS, but I looked into it when I couldn't see any other way, but then I realised I had no idea how to put
tr:nth-child (even){
background:{{Background}};
}

tr:nth-child (odd){
background:{{AltColour|{{Background}}}};
}
into JS without again having problems with actually getting the background colour required. Anyway, I'll get started on that big long template as soon as I can, thanks CJC :) NovaHawk 22:14, 6 November 2013 (UTC)
I know! We can embed that CSS into the template page, exactly as you put it there! There's a few ways of embedding CSS, and if we haven't got any (though I think we have) there's loads of extensions we could install. (if you wanted to to it JS, you'd have to give each element in the infobox both colour variants in a -data attribute, then the JS would go down the cells, picking either the first or second colour to use. UltrasonicNXT (talk)
Ooh, that'd be great :) I was dreading coding that template, if this is possible, it'd look much better as well. The only extension I can see that mentions CSS in Special:Version is the Gadgets extension NovaHawk 22:44, 7 November 2013 (UTC)
I'm guessing NewPageCSS is the extension we need? NovaHawk 22:46, 7 November 2013 (UTC)
CSS looks a little better documented, but either would do. I'll install one later. UltrasonicNXT (talk)
That one looks good too- I only had a quick look at it before and only saw the top two examples. NovaHawk 21:59, 8 November 2013 (UTC)
Hmmm. Either way, I'd prefer not to allow anyone to add custom CSS whereever they like, but it's not as simple as just allowing it only in the template namespace, or only on specific pages, because then it won't transclude properly. I'm going to have to give it some more thought.
I was just thinking- couldn't we use the abuse filter to stop this? NovaHawk 01:05, 20 November 2013 (UTC)
AbuseFilter created. It seems to work fine, and restricts adding the text "{{#css:" to admins only, but I don't have much experience with AbuseFilters, I think I've only ever made one other... NovaHawk 01:46, 22 November 2013 (UTC)
Good thinking, I didn't think of that. Do you want to implement it into {{Infobox}} or shall I? UltrasonicNXT (talk)
As far as I can tell, {{Infobox/new}} should now be ready to go once the extension's installed NovaHawk 21:43, 22 November 2013 (UTC)

Re: Import

  • Well, I've heard of better success stories :D No worries with not having the most recent version- the only really significant thing in the last 6 days I can remember is that Meiko made a template for the news reports which I added a bit of stuff to, but I can pretty easily rebuild that now I know how it's done (if Meiko doesn't beat me to rebuilding it first). So do you know if it's even possible to do an import, or are we going to have to do it all manually or something? NovaHawk 11:56, 17 November 2013 (UTC)
    • It's possible. I just don't think it's a good idea to use Wikia's database dumps because every time I've used one, it had the same problem as we faced. I honestly think it'd be better done like images were done, where a bot would add a category to every page, Special:Export it, and then import it with importDump.php. Special:Export has never had any problems for me, so I think it would be a safer bet. Also, Wikia's database dumps have a bunch of namespaces that don't even exist here, such as User_blog_comment for every comment on a blog, and Thread for every forum thread that's been created. --ToaMeiko (talk) 01:17, 20 November 2013 (UTC)
      • Well either way, importDump.php will not work, as I have said before, mwdumper is the only way to import a large wiki. UltrasonicNXT (talk)

NUMBEROFCOMMENTS

  • Hi NXT, I was just changing {{comments}} over from NUMBEROFCOMMENTS to NUMBEROFCOMMENTSPAGE when I noticed this page says there are 3 comments when there were 4 (now 5). I was just wondering if you would mind checking the template to see if I did it wrong? (or maybe it's just a caching thing and hasn't updated :S) Thanks! NovaHawk 05:39, 30 December 2013 (UTC)
    • Hmm, that's odd. I've changed {{NUMBEROFCOMMENTSPAGE:{{FULLPAGENAME}}}} to {{NUMBEROFCOMMENTSPAGE}}}, as the latter should get the number of comments for the current page automatically, to see if that would make a difference, but it doesn't look like it. Ah, of course, I remember, it's the cache. I set the NUMBEROFCOMMENTSPAGE cache to last for 24 hours, so evidently it hasn't cleared yet. ?action=purge doesn't seem to clear it either. Do you think the cache should be reduced? UltrasonicNXT (talk)
      • Your usage was fine :) (I only made that change because it makes the code look prettier ;) ) UltrasonicNXT (talk)
      • Ah, that would explain it :) Yeah, personally I'd say 24 hrs is a bit high- most of the time for news articles at least, most of the comments we got on articles were within 24 hrs of the article being published, so the number may be a little misleading... I'd be thinking in the range of about an hour (or less), but I don't know how that'd affect performance/loading times NovaHawk 00:36, 31 December 2013 (UTC)

MediaWikiChat

Hey, do you know when MediaWikiChat will be added to translatewiki.net, or has it already been added and I've missed it? --ToaMeiko (talk) 21:50, 9 January 2014 (UTC)

Well I, probably like you, am bored of waiting, so I'm going to approve the 'Preparation of adding to TWN' patch on gerrit, and hopefully this will encourage Siebrand/whoever to add it. UltrasonicNXT (talk)
That's been merged, if nothing happens in a few days I will bug someone about it :) UltrasonicNXT (talk)

Another thing, I saw people complaining about how the chat is in a wiki page and whatnot and how it loses space. Possible suggestion: Remove the left and right sidebar on Refreshed for Special:Chat so the chat page is the full width of the window. That way they still have user navigation and whatnot. Such a thing could either be a CSS gadget in user preferences or something done in MediaWiki:Refreshed.css/MediaWiki:Global.css. --ToaMeiko (talk) 20:20, 13 January 2014 (UTC)

Yeah, I talked with Drew earlier today about this. I did contemplate doing exactly what you describe. However, I am not too keen to implement something like this, as it would not be compatible with other skins, and I want to keep chat fully skin compatible, which it is at the moment. I think I may work on a fullscreen version, similar to wikia.s though. (As a note, I would much prefer to keep it as you describe and I was thinking, but I have not found a reliable, skin-compatible way to do this.) UltrasonicNXT (talk)
We'd be able to have it in local CSS, I'd think. I could play around with it. --ToaMeiko (talk) 22:20, 13 January 2014 (UTC)
Ah, I see what you've done at dev, that's nice. We could do with removing the footer though. UltrasonicNXT (talk)
I think that should stay-- the copyright still applies, as do the policies in the footer... --ToaMeiko (talk) 19:49, 14 January 2014 (UTC)
Yeah but it adds a pointless scrollbar, and is really not needed. Removing it would do no harm. If you really think it's needed, add a 'show footer' button or something, but it would really improve the UX to remove it... UltrasonicNXT (talk)

Yeah, would be good. Completely forgot about the bots. :P Vasko (talk) 19:34, 18 January 2014 (UTC)

Re:SMW

  • Hmm, yeah I've noticed some weird behaviour with SMW a couple of hours ago. For example (I don't know if your bot will get to it before you can see it) 10215 Obi-Wan's Jedi Starfighter has {{Rating|2}}, which assigns [[ArticleRating::2]], but it's coming out as a link to 2 (Disambiguation) (because 2 redirects there). Also, there's one Date working, Property:NewsDate, which was also made a long time ago. But all the other properties aren't even showing up as a Page datatype (the default one). (But that's good to know about String now being an alias of Text, it wasn't like that before, I'll have to remember to use Text in future)
    • So, according to SMW Testing, stuff is behaving as it should- [[ArticleRating::2]] results in "2" (no link, so it's not defaulting to Page). But when you go to Special:Browse/SMW_Testing, it still shows a link to 2 (Disambiguation) instead of just a plain text 2... basically, to summarise, I have no clue as to what's going on :P I'll have a look around, see if there are any bugs happening in relation to the more recent SMW updates. NovaHawk 11:17, 19 January 2014 (UTC)
      • (copy-pasted from a while ago, the site was down so this may not be relevant anymore) 1.22 may fix it, from what I can tell, there was a related commit in 1.22.1 which may have fixed this bug or one similar to it-
http://permalink.gmane.org/gmane.comp.web.wiki.semediawiki.user/14519
http://permalink.gmane.org/gmane.comp.web.wiki.semediawiki.user/14613
https://bugzilla.wikimedia.org/show_bug.cgi?id=53034
https://bugzilla.wikimedia.org/show_bug.cgi?id=60213
        • That seems to have done it- I just manually refreshed Property:ArticleRating, and it now shows up in text datatype :) NovaHawk 22:45, 19 January 2014 (UTC)

Yeah, sorry about that. Didn't see that the little box was checked. Vasko (talk) 15:30, 19 January 2014 (UTC)

MW import

  • Hi NXT, I was just wondering if it would be possible for you to import the MediaWiki namespace? I just noticed that it hasn't been imported. If it takes too long to set up a script, don't worry, I'm happy to just import it manually, it doesn't have too many pages NovaHawk 10:26, 21 January 2014 (UTC)
    • You should manually do it. With the amount of custom CSS and JavaScript that's Wikia-specific, importing the interface namespace would surely break things. --ToaMeiko (talk) 16:30, 21 January 2014 (UTC)

You know where that template we/you once worked on that had tabs for year pages is? (as in, what its called?) CJC95 (talk) 12:26, 21 January 2014 (UTC)

Yeah. I'll search Brickia for it sometime. CJC95 (talk) 17:57, 21 January 2014 (UTC)
  • Using year set, is there any reason that the name is repeated, i.e.:

{{YearSet|G|21050 Architecture Studio|Architecture Studio}} As far as I can tell, it still works fine with just the second field, yet the examples use the third. CJC95 (talk) 18:07, 21 January 2014 (UTC)