Template talk:Showfacts biography

This is great. Note the utility of |default- it can be used to avoid needless if else logic. If the query returns nothing, you can insert text like "at an unknown date" or alternatively fire another query. EG if date is empty, then return " ".

Auto narratives like this are especially useful because the massive scale of details that are stored in the SMW fields cannot be practically displayed in the person infobox, and are unsuitable for tabular output. For example death causes, and other properties that I haven't added like physical description and medical history to general info. We might like to provide some way to clearly allow contributors a forms way of correcting/adding details to these narratives. Perhaps decoration like a border or subtle background color with a small text link for editing details like we have with showinfo person/ showfacts person? - ~  Ph l o x  18:34, 15 June 2009 (UTC)


 * I added death causes - great idea! I noticed one problem: even though the defaults show on the template page, they do no show on the Person page. Also, birth subdivision1 is shown but death subdivision1 is not. Bill Hunsicker 20:08, 15 June 2009 (UTC)
 * Right. There are some non intuitive things about SMW, so I made up some wrapper templates that simplify some of these issues.  Let me know what you think.  The changes are reflected in the template code I just entered.  This is your baby, and feel free to change it to whatever you want.   I omitted some of the stuff like second marriage you had- but the template edit was just to give an example of usage of these wrapper templates.  SMW and the info boxes are great but they tend to depersonalize our ancestors which for many contributors is diametrically opposed to their goals.  A lot of templates generated from gedcoms are going to be sparse on text, so I think this is a great way to personalize the SMW information.


 * You mentioned other programs or sites that generate these stories. Can you give me pointers to the best ones?- ~  Ph l o x   19:54, 16 June 2009 (UTC)


 * Actually, Robin Patterson created the /doc for the Biography Template (which mentions the programs that create little stories - which I assume are family tree type programs). I copied that /doc and modified it for this template. I prefer your solution that eliminates the commas without the bulky unknown this, unknown that. For the most part people who visit the site will know state names and counties have "county" after the name. Bill Hunsicker 21:41, 16 June 2009 (UTC)

Dates
- ~  Ph l o x  04:57, 25 June 2009 (UTC)
 * Approx dates
 * If death date or birth date is unknown, we need to say so and not calc age. eg: Caroline Maggie Belcher (1870-?)
 * As I've said elsewhere in the last 22 hours (on a less relevant page), if death date or birth date is unknown, but was stated to be "bef" something or "aft" something, we should not get this template to state (as it currently does) that the birth or death was in that year — we could let that part of the code default to the "unknown date" statement, which is clearly accurate, or we could say "in or before" or "in or after" to cover the cases where the "bef" or "aft" could be referring to the same year because a month was specified. I'm inclined to go the same way with "c" (which probably ties in with what Phlox had in mind for the first item on this list) - say "about" instead of "in". — Robin Patterson (Talk) 12:22, 21 July 2009 (UTC) --- revised 01:41, April 18, 2010 (UTC)

Places

 * Stop it truncating county names. When I say my ancestor was born in Lanarkshire, I don't want to be told "William Forlong of Wellshott was born 22 January 1762 in Wellshott, Lanark, Scotland". Lanark is a small town in the middle of Lanarkshire, a long way from Wellshott. — Robin Patterson (Talk) 13:07, March 8, 2010 (UTC)

Detailed examination
This template is one of the most obvious things about a Familypedia article and therefore deserves to be as flawless and friendly as possible.

Some of us can't do all the coding necessary but can offer ideas and can partly understand what's there. So here it is broken into bits (generally starting a new line where a template starts or ends) for discussion of each. Inside "pre" tags so that it remains as non-functioning code. Explanation and discussion in new lines starting with stars and with explanations/translations in parentheses. omments best prefaced with "Comment:". {{#if: {{REVISIONID}}
 * (If this appears on a saved page, show all the following stuff down to the end of this inclusive template)


 * {{showfact|short name|if blank={{BASEPAGENAME}}}}
 * (If program can find a "short name" (which it should do, because that's one of the three required fields),
 * show it here; else show the base page name)

was born

{{#if: {{showfact|birth date-approx}}| {{#switch: {{showfact|birth date-approx}} |bef=before&#32;|aft=after&#32;|c=circa&#32;}} }} {{showfact|birth date|if blank= {{showfact|birth year|intro=in the year|if blank=on an unknown date}} }}
 * (Birth year, with or without detailed dates):

{{no trailingcomma| {{showfact|birth street|if blank=|intro=at}} ***(If there is a birth street, show it prefaced with "at"; if there is not, show nothing) {{#if: {{showfact|birth locality}}{{showfact|birth county}}{{showfact|birth nation-subdiv1}}{{showfact|birth country}} |in}} ***(If there is one or are more than one of the village/county etc names, preface it or each (or the group? - see death and wedding coding) with "in"  ***and show them in order, with their "short names" if any) ***Comment: short names can be quite misleading, as noted in the "Lanark" comment above {{showfact|birth locality|outro=,|shortname}} {{showfact|birth county|outro=,|shortname}} {{showfact|birth nation-subdiv1|shortname|outro=,}} {{showfact|birth country}} }}
 * birth places:

{{#if: {{showfact|father}}| to {{showfact|father}} {{#if: {{showfact|mother}}| and {{showfact|mother}} }}| {{#if: {{showfact|mother}}| to {{showfact|mother}} }} }}
 * (Parents)
 * First if there is a father (listed first if mother too))
 * (Mother if no father stated)

{{#ifeq: {{getfact|death date}}| | {{#ifeq: {{getfact|birth year}}| || {{#ifexpr: {{getfact age}}>100| and died at an unspecified date| and is now {{showfact age}} years of age }} }}
 * (Death - age at death or current age if living)

|and died ***(death year, with or without detailed dates, with logic as for birth): {{#if: {{showfact|death date-approx}}| {{#switch: {{showfact|death date-approx}} |bef=before&#32;|aft=after&#32;|c=circa&#32; }} }}

{{showfact|death date|if blank= {{showfact|death year|intro=in the year|if blank=on an unknown date}} }}

{{showfact|death street|intro=at}} {{showfact|death locality|intro=in|outro=,|shortname}} {{showfact|death county|intro=in|outro=,|shortname}} {{showfact|death nation-subdiv1|intro=in|outro=,}} {{showfact|death country|intro=in}}
 * (Death places, with logic not quite the same as for birth):

at the age of {{showfact age}} years of {{showfact|death causes|if blank=unspecified causes}}}}.
 * (Death age and causes)

{{#if: {{showfact|ifmarried-g1}}| {{showfact|given name}} married {{showfact|joined with-g1|shortname}} ***{Spouse short name - here no alternative if no short name; but it's compulsory)
 * (Marriages):
 * (First or only):

***Dates and places, with logic not quite the same as for birth and death {{#if: {{showfact|wedding1 date|if blank= {{showfact|wedding1 year|intro=in the year}} }}|   {{showfact|wedding1 date|intro= {{#if: {{showfact|wedding1 date-approx}}| {{#switch: {{showfact|wedding1 date-approx}}|bef=before&#32;|aft=after&#32;|c=circa&#32; }}     }}    |if blank={{showfact|wedding1 year|intro= in the year}} }} }} {{no trailingcomma|

{{showfact|wedding1 street-address|if blank=|intro= at}} {{#if: {{showfact|wedding1 locality}}{{showfact|wedding1 county}}{{showfact|wedding1 nation-subdiv1}}{{showfact|wedding1 country}} |in}} {{showfact|wedding1 locality|outro=,|shortname}} {{showfact|wedding1 county|outro=,|shortname}} {{showfact|wedding1 nation-subdiv1|outro=,|shortname}} {{showfact|wedding1 country}} }}. }}
 * Comment: There must be some way of including subsequent marriages!? Robin saw one in April 2010; it was in a new paragraph.
 * (That was the end of the main inclusive "if" template;
 * if, on the other hand, the showfacts template is NOT on a saved page but only on a preview, just show the following)

including parents, vital statistics and spouse(s).}}
 * The "showfacts biography" template displays an automatically generated narrative of the details of the person on file


 * (Then we have a template that displays the documentation page, with non-displayed categories.)