Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template talk:User Data

Discussion page of Template:User Data

How do you...

How do you get the certain sections to disappear if there's nothing defined for the parameter? -Moe 17:27, 17 November 2006 (CST)

You don't have to define the parameter -- or even add the parameter to the template -- in order for it not to appear. -- Joe Beaudoin So say we all - Donate 18:10, 17 November 2006 (CST)
You mean how we do it technically? Every row in the table has something like:
class="hiddenStructure{{{marital status|}}}"
If you have martial status=married, that expands to:
class="hiddenStructuremarried"
Which is of course a bogus class. But if you leave married undefined, it expands to:
class="hiddenStructure"
Which makes it disappear. --Catrope(Talk to me or e-mail me) 07:08, 25 April 2007 (CDT)

New fields proposal

I've implemented some new fields for this template in my testing area:

  • born_date, born_month and born_year were ripped from {{Cast Data}}. If one or more of these fields is filled in, a Date of birth field will appear in the table. If all three are filled in, the user's age will be calculated, which overrides the user-specified value for age, which is only used if one of the three born_* fields is missing. (Note to Shane: I also fixed a minor comma issue: born_day=25; born_month=11; born_year=; renders "November 25," in {{Cast Data}}, but the comma obviously shouldn't be there. Maybe you can implement my fix in {{Cast Data}}.)
  • showEC: if set, the user's edit count will be displayed and linked to the relevant Special:Editcount breakdown. Idea by Mercifull. Note that my testing area doesn't display this correctly, since it's on a subpage. My main user page does get it right, though.

So tell me what you think. --Catrope(Talk to me or e-mail me) 07:08, 25 April 2007 (CDT)

I like them :) --Mercifull (Talk/Contribs) 12:00, 25 April 2007 (CDT)