User talk:UltrasonicNXT

From Brickipedia, the LEGO Wiki

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)

NUMBEROFCOMMENTSPAGE

  • 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)