Gilgamesh: Enough expository banter!
This talk page is used for discussing improvements to the page "Navbox". It is not the place for general discussion or sharing stories about the topic of this article.

We need to repurpose:

  local alphatester --test for if the "alpha" flag is used in contents boxes
    alphatester = string.find(f["flags"], "alpha") 
    and (mw.html.create("tr"):addClass("va-navbox-space-v") .. mw.html.create("td"):attr("colspan", f["meta colcount"]) .. mw.html.create("tr") .. mw.html.create("td"):addClass("va-navbox-brickcont"))
    or (f["displaycount"] and f["displaycount"]>0) and mw.html.create("div"):addClass("va-navbox-space-v")

Since alpha and omega are not needed, only alpha and it only appears in A. I'm mostly moving it here so it doesn't give us errors now until we repurpose.--FFVI Kefka Palazzo Sprite iOS.png Technobliterator TC 11:45, September 30, 2014 (UTC)

So {{tl|LR}} returned this error message:

Error de Lua en Module:Navbox en la línea 273: attempt to index field 'content' (a boolean value).
(tail call): ?
mw.lua:425: ?
[C]: in function "getAllExpandedArguments"
mw.lua:267: in function "getAllExpandedArguments"
[C]: in function "pairs"
Module:FFWiki:118: in function "emptystring"
Module:Navbox:13: in function "parse"
Module:Navbox:9: in function "chunk"
mw.lua:425: in function "chunk"

With some experimentation I figured out it was because contentE1 was blank and added a nbsp to keep that from happening. A similar thing was happening with {{Talk}} before I realized it (had to do with CSM sending out welcome messages accompanied with blank talk bubbles, because that makes a lot of sense). Basically, when using emptystring() always account for nil values! Otherwise you get script errors from trying to concat booleans or nils left and right. C A T U S E 04:02, October 21, 2014 (UTC)

Thing is, that should never happen. A group needs content otherwise there's no point in it existing. I'm more tempted to make the group appear dependent on the content value existing then I am to 'or ""' the content field. JBed (talk) 16:24, October 21, 2014 (UTC)
Original navbox's group was dependent on the existence of content, so yes.--Magicite-ffvi-ios.png Technobliterator TC 16:31, October 21, 2014 (UTC)

Been working on making a subgroup part, it's not proving easy, but anyway. Just a few notes (and anyone can help):

  • Subgroup and group class, ie same css classes that block and group currently use when used as they are.
  • Work out how to actually add it properly, somewhere below j=j+1 for the .parse? For .render it's easy.
  • How do I make it so subgroup isn't reliant on subgroup existing for the first block letter (A)?
  • What does blocks:push do?

That's all I got for the notes. I otherwise know what I'm doing, I think.--Magicite-ffvi-ios.png Technobliterator TC 23:19, November 4, 2014 (UTC)

I feel like the only thing I can answer here is the fourth question. "blocks" is initialised as an Array object. Forum:Lua modules master thread#Array:push. JBed (talk) 20:58, November 9, 2014 (UTC)
Ok, not sure now if I should just make what is currently "blockA" into "groupA1" whenever "subgroupA1a" is entered, and what is now "groupA1" into "subgroupA1a" when entered, I think that's the best way. Should I do that, then multiple if conditions and some stuff inside would be better than just writing out the same stuff twice or something? Also, still not sure if this will depend on "groupA1a" existing instead of "groupC3a" existing...--Magicite-ffvi-ios.png Technobliterator TC 00:08, November 12, 2014 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.