Toggle 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)
I also added a timezone field. Doesn't do any magic, but it can be useful. We might also want to list admins' timezones on BW:AN. Also, I want to emphasize that this change won't break any user pages; it's fully backwards compatible. --Catrope(Talk to me or e-mail me) 15:58, 25 April 2007 (CDT)
Looks good to me. Shane (T - C - E) 16:00, 25 April 2007 (CDT)

The new parameters (born_day, born_month, born_year, timezone and showEC) are now available. I've looked at a couple of user pages and they weren't broken, but if my new template breaks yours anyway, please report it here or on my talk page. --Catrope(Talk to me or e-mail me) 06:34, 28 April 2007 (CDT)

Once again, we have two new fields: sex and femalecat. The former is just another field in the table, while the latter adds you to Category:Female Wikipedians. Tell me what you think. --Catrope(Talk to me or e-mail me) 03:41, 1 May 2007 (CDT)
I dont like the specific female cat option. It should just be "ShowSexCat" or something which if theres a Y in there it addss you to the relevant category, either male or female, just like the country code does. --Mercifull (Talk/Contribs) 04:33, 1 May 2007 (CDT)
That would be better. I'll start coding it rightaway. --Catrope(Talk to me or e-mail me) 04:58, 1 May 2007 (CDT)
It's done. --Catrope(Talk to me or e-mail me) 05:15, 1 May 2007 (CDT)
The fields sex and nosexcat have been renamed to gender and nogendercat respectively, on Joe's request. sex and nosexcat still work, though. --Catrope(Talk to me or e-mail me) 03:49, 2 May 2007 (CDT)
I am going t remove sex and nosex at all. It's shouldn't be there. Shane (T - C - E) 06:29, 2 May 2007 (CDT)