More actions
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)
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)