You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template talk:Gamebox

From MafiaWiki
Jump to navigation Jump to search

So Gamebox2 is for games in the archive? Clever... course, we can make that a variable in gamebox if you like. :D -- Mr. Flay 13:38, 17 August 2007 (MDT)

of course you can... :P -- i don't understand what the {{{name}}} function does in the [[Category]] tags... LyingBrian 13:58, 17 August 2007 (MDT)
Unlike with wikilinks (where it changes what's displayed), piping a category changes the sort order. So putting Mafia 3 into [[Category:Large Games]] would sort it under M, while putting it in [[Category:Large Games|03]] will sort it under 0. Make sense now? I'm just repurposing the name variable that already exists, we probably ought to rename it if we want to use it this way... -- Mr. Flay 14:04, 17 August 2007 (MDT)
ok, i think i get it now... using Newbie 438 as an example, if i put |name=Newbie 438|, it will file it under 'N', but if i use |name=438|, then it will file it under '4', right?.. if that's the case, yes we ought to rename it, but i also see a potential problem... in New York & Little Italy you're going to have coinciding numbers... in New York, this is already present, 'Mafia 35' & 'Open 35', and in Little Italy they just need a few more Open Games to catch the lowest Mini Game... you probably have a work around for this, though :D -- LyingBrian 14:44, 17 August 2007 (MDT)
Actually, I don't. We could avoid sorting the "played by forum" categories, of course, which would eliminate that confusion in favor of a wholly different one (everything will be in M or O). Hmmm... I don't think it's too big a problem if Open 37 and Mini 37 are sorted together under '3', personally, as it'll make all the categories easy to sift through.. But yes, you're right in how it works. :) -- Mr. Flay 14:50, 17 August 2007 (MDT)
nevermind, i'm an idiot... it will just sort them under the number 0, but as Mafia 35 & Open 35... if you're looking for Open 35 you just have to remember it's going to be among the Mafia Games, and not separated... unless we can do subcategories?.. it was brought up earlier, but what about when we reach Newbie 1000 or Mini 1000?... do we want to nip this in the bud, and just number everthing w/ 4 numerals? or should we hope WikiMedia will come up w/ a fix by then?.. ;) LyingBrian 14:59, 17 August 2007 (MDT)
I'm going to hope that either MediaWiki will be smarter by then, or one of us will have a bot to go through the hundreds of entries... ;) -- Mr. Flay 15:11, 17 August 2007 (MDT)

DEFAULTSORT

i found this line above the category boxes and wondered what it was for... it seems to have messed up the sorting fix we had implemented...
-- LyingBrian 09:47, 18 August 2007 (MDT)

I just checked your "sorting fix" and it seems severely problematic. Several things are sorted under "0" that should not be and some things are sorted under "{". This is clearly wrong. I added the DEFAULTSORT, and maybe if we work together, I can help you get this working. SigmaEpsilon 11:58, 18 August 2007 (MDT)

Exlpain what sorting you want

If you guys explain axactly how you want this stuff to be sorted, I can help better. So far it seems like this is what you want:

0
  • Mini 1
  • Mini 2

...

  • Open 1
  • Open 2

...

...

3
  • Mini 31
  • Mini 32

...

  • Open 35
  • Open 36

Is this correct? SigmaEpsilon 12:02, 18 August 2007 (MDT)

Yeah, although some types go to three digits already (nothing's over 400s though I don't think). -- Mr. Flay 14:48, 18 August 2007 (MDT)
Ok... so you want a straight numerical sort (9 before 50 before 136), rather than a text sort (reverse order of previous example). Let me try yo find out if there is nice way to code that... SigmaEpsilon (talk) 14:05, 19 August 2007 (MDT)

{{modtext}}

in order to get the comma to display, you have to remove the 'equal sign' from the <modtext> field... see Mini 445 for example... i tried to fix the syntax, but wasn't able to figure it out, so i rolled it back to SE's last update... i'm not sure if it has to do with the 'if' w/in an 'if' function, or the italics for the text, or a combination, but if you include the 'equal sign' w/o some text, you get a single quotation mark, aka apostrophe between the names, instead of a comma... changing the text in the template doesn't change anything (ie making the comma an ampersand), it still returns an apostrophe.. the easiest thing to do would be to not include the 'equal sign' from the syntax example on the main page, but i'm just wondering if there's a simple fix for this i'm not aware of?.. again, see Mini 445 for an example of the apostrophe when the 'equal sign' is included...
-- LyingBrian 03:59, 22 August 2007 (MDT)

I fixed it. We needed yet another #if statement. using the {{{parameter|}}} notation only works when the parameter is not used at all. If it is in the template and simply left blank, it can cause problems. SigmaEpsilon (talk) 09:38, 22 August 2007 (MDT)
16:52, 22 August 2007 (MDT)
yeah, it's still causing problems... see Game Record (boilerplate)... now if the <mod2> & <modtext> fields are left blank it automatically enters the <else> parameter from the 2nd #if statement... of course, the easy thing to do would be leave that parameter blank, but then if someone entered <modtext> w/o entering <mod2> it would still be blank... (which is why someone is the default parameter in the first place, i think)... at some point the person filling out the gamebox has to be smarter than the gamebox, methinks...
-- LyingBrian

OK... so "someone" should appear if MODTEXT is not empty and MOD2 is empty, right? SigmaEpsilon (talk) 17:05, 22 August 2007 (MDT) Let me list the possibilities and desired outcomes:

If MOD is blank, display "Unknown Mod" and nothing else.

If MOD is non-blank, display MOD and then:

If MODTEXT and MOD2 are both blank, display nothing.
If MODTEXT and MOD2 are both non-blank, display them both
If MODTEXT is blank and MOD2 is non-blank, display a comma and MOD2
If MODTEXT is non-blank and MOD2 is blank, display MODTEXT and "someone"

Is this right? SigmaEpsilon (talk) 17:11, 22 August 2007 (MDT)

17:24, 22 August 2007 (MDT)
If MODTEXT is non-blank and MOD2 is blank, display MODTEXT and "someone"
yeah, that sounds right, but i don't really think it's necessary to display anything if MODTEXT is non-blank, and MOD2 is blank, as it would be more obvious it needed to be filled in, but maybe as a fallback in case whoever forgets to fill it in... if we are going to have a default variable in this case, i think it could be worded a little better... maybe Incomplete? i think it should be bolded rather than italicized to separate it from the MODTEXT
-- LyingBrian
I fixed this yesterday. Forgot to mention it here. SigmaEpsilon (talk) 12:07, 23 August 2007 (MDT)

Categories

11:57, 23 August 2007 (MDT)

the categories aren't giving the default values if the fields are left blank, probably b/c of the #if functions... see Newbie 452 for an example... (Categories are at the bottom of the page)... not sure how to fix this, but i don't know that it's necessary to...
-- LyingBrian

Fixed. Categories are only displayed after they have been defined. SigmaEpsilon (talk) 12:07, 23 August 2007 (MDT)
12:37, 23 August 2007 (MDT)
now they're not defined at all... see Newbie 452 again...
-- LyingBrian
Sorry. I messed up the syntax on the IF statements. Also, I'd recommend leaving OUTCOME blank until the game is over. Otherwise, you end up linking to Category:Games with none outcome or some variation thereof. SigmaEpsilon (talk) 12:53, 23 August 2007 (MDT)

Notes

the syntax for notes is messed up, and i don't know how to fix it... :(
-- LyingBrian 13:13, 1 September 2007 (MDT)

Fixed. SigmaEpsilon (talk) 14:38, 1 September 2007 (MDT)

New Category - Moderator

I'd love to have the Template add 'Category:Games moderated by <mod>' yawetag 08:31, 11 March 2010 (EST)