Familypedia
Familypedia

Questions[]

Anyone interested? Anyone definitely not interested? -- Robin Patterson (Talk) 23:24, October 23, 2016 (UTC)

Ideas[]

Coding of the display may want something like parts of this (copied from showfacts person) (line breaks for easier reading - they may mess up coding!:

<includeonly><!-- {{#if: {{REVISIONID}}| -->
{{showfacts tabs|globals={{{globals|}}} }}
{{Portable infobox person 
<!-- display using this template -->
|title=
<center>'''{{#if:{{{short_name|}}} |{{{short_name|}}} 
|''<Short name>''}}'''
{{#if:{{{notes|}}}{{{sources|}}}
| [[#notes_link|<sup>‡</sup>]]}}</center>
|image={{#if:{{{image|}}}|{{#set:image=File:{{{image|}}}}}
[[File:{{{image}}}|200x250px]] }}
|image_caption={{#if:{{{image_caption|}}}
|<center><small>{{{image_caption}}}</small></center>}}

|birth={{#iferror:{{Showfacts person/row|birth
|{{{birth_year|}}}
|{{set date|birth|{{{birth_year|}}}|{{{birth_month|}}}
|{{{ birth_day|}}}|{{{ birth_hour|}}}
|{{{ birth_minute|}}}|{{{ birth_if-bce|}}}
|nobogus=y}}
| {{location set and format|birth
|{{{birth_address|}}}|{{{birth_locality|}}}
|{{{birth_county|}}}
|{{{birth_nation-subdiv1|}}}|{{{birth_nation|}}}
|{{{birth_places-other|}}}}} }}
{{#if:{{{birth_notes|}}}{{{birth_sources|}}}
| [[#notes_link|<sup>Ω</sup>]]}}
<!-- following should not execute if an error is thrown -->
{{#declare:  birth_date-approx=birth_date-approx

.....(then lots of stuff about various elements of 
what the infobox eventually shows).....then the 
wedding stuff, 
some of which may be adaptable for residence:

0}}
|post button
|query string=Showfacts_person[given_name]=
{{#explode:{{#explode:{{{joined_with}}}|+|0}}| |0}}
&Showfacts_person[surname]=
{{#explode:{{#explode:{{#explode:{{{joined_with}}}
|+|0}}|(|0}}| |-1}}
&Showfacts_person[joined_with]={{PAGENAME}}
&Showfacts_person[sex]={{#ifeq:{{{sex|}}}|F|M|F}}
{{#if:{{{wedding1_coord|}}}
|&Showfacts_person[wedding1_coord]={{{wedding1_coord|}}}}}
{{#if:{{{ifmarried-g1|}}}
|&Showfacts_person[ifmarried-g1]={{{ifmarried-g1|}}}}}
{{#if:{{{wedding1_locality|}}}
|&Showfacts_person[wedding1_locality]={{{wedding1_locality|}}}}}
{{#if:{{{wedding1_places-other|}}}
|&Showfacts_person[wedding1_places-other]=
{{{wedding1_places-other|}}}}}
{{#if:{{{wedding1_address|}}}
|&Showfacts_person[wedding1_address]={{{wedding1_address|}}}}}
{{#if:{{{wedding1_county|}}}
|&Showfacts_person[wedding1_county]={{{wedding1_county|}}}}}
{{#if:{{{wedding1_nation-subdiv1|}}}
|&Showfacts_person[wedding1_nation-subdiv1]=
{{{wedding1_nation-subdiv1|}}}}}
{{#if:{{{wedding1_nation|}}}
|&Showfacts_person[wedding1_nation]={{{wedding1_nation|}}}}}
{{#if:{{{wedding1_year|}}}
|&Showfacts_person[wedding1_year]={{{wedding1_year|}}}}}
{{#if:{{{wedding1_month|}}}
|&Showfacts_person[wedding1_month]={{{wedding1_month|}}}}}
{{#if:{{{wedding1_day|}}}
|&Showfacts_person[wedding1_day]={{{wedding1_day|}}}}} }} }}
<!--not totally exhaustive on autoload missing: 
pictures, documents, involved people other files, tags --> }}
|wedding1={{#if:{{#explode:{{{joined_with|}}}|+|0}}
|{{Showfacts person/row|Wedding:|{{{wedding1_year|}}}
|{{set date|wedding1|{{{wedding1_year|}}}
|{{{wedding1_month|}}}|{{{wedding1_day|}}}
|{{{ wedding1_hour|}}}|{{{ wedding1_minute|}}}
|{{{wedding1_if-bce|}}}|nobogus=y}}
| {{location set and format|wedding1
|{{{wedding1_address|}}}
|{{{wedding1_locality|}}}|{{{wedding1_county|}}}
|{{{wedding1_nation-subdiv1|}}}
|{{{wedding1_nation|}}}|{{{wedding1_places-other|}}}}} }}
<!--now do footnote -->
{{#if:{{{wedding1_notes|}}}{{{wedding1_sources|}}}
{{{wedding1_sources_primary|}}}
{{{wedding1_sources_secondary|}}}
| [[#notes_link|<sup>₪</sup>]]}}
<!-- Now do set properties for wedding1 set -->
{{#declare:    wedding1_date-approx=wedding1_date-approx
|   wedding1_date-calendar=wedding1_date-calendar
|   wedding1_street=wedding1_street
|   wedding1_locality=wedding1_locality
|   wedding1_county=wedding1_county
|   wedding1_nation-subdiv1=wedding1_nation-subdiv1
|   wedding1_nation=wedding1_nation
|   wedding1_coord=wedding1_coord
|   wedding1_notes=wedding1_notes
|   wedding1_sources=wedding1_sources
|   wedding1_sources_primary=wedding1_sources_primary
|   wedding1_sources_secondary=wedding1_sources_secondary
|wedding1_year      =wedding1_year
|wedding1_month      =wedding1_month
|wedding1_day         =wedding1_day
|wedding1_if-bce           =wedding1_if-bce
|   ifmarried-g1=ifmarried-g1
}}{{#arraymap:{{{wedding1_places-other|}}}|+|฿
|{{#set:wedding1_places-other=฿}}|}}
{{#arraymap:{{{wedding1_tags|}}}|+|฿
|{{#set:wedding1_tags=฿}}|}}
{{#arraymap:{{{wedding1_pictures|}}}|+|฿
|{{#set:wedding1_pictures=File:฿}}|}}
{{#arraymap:{{{wedding1_documents|}}}|+|฿
|{{#set:wedding1_documents=File:฿}}|}}
{{#arraymap:{{{wedding1_other_files|}}}|+|฿
|{{#set:wedding1_other_files=File:฿}}|}}
{{#arraymap:{{{wedding1_involved_people|}}}|+|฿
|{{#set:wedding1_involved_people=฿}}|}}
{{#arraymap:{{{wedding1_address|}}}|+|฿|
{{#set:wedding1_address=฿}}|}} }} 
<!--close if joined-with 0 -->
|joined with-g2={{#if:{{#explode:{{{joined_with|}}}
|+|1}}
|{{#set:joined_with-g2={{#explode:{{{joined_with}}}
|+|1}} }}
{{#ifexist:{{#explode:{{{joined_with}}}|+|1}}
|[[{{#explode:{{{joined_with}}}|+|1}}]]
|{{#formlink:form=person
|target={{urlencode:{{#explode:{{{joined_with}}}
|+|1}}|WIKI}}
|link text={{#explode:{{{joined_with}}}|+|1}}
|post button|query string=
Showfacts_person[given_name]=
{{#explode:{{#explode:{{{joined_with}}}|+|1}}| |0}}
&Showfacts_person[surname]=
{{#explode:{{#explode:{{#explode:{{{joined_with}}}
|+|1}}|(|0}}| |-1}}
&Showfacts_person[joined_with]={{PAGENAME}}
&Showfacts_person[sex]=
{{#ifeq:{{{sex|}}}|F|M|F}}
{{#if:{{{wedding2_coord|}}}|&Showfacts_person[wedding1_coord]=
{{{wedding2_coord|}}}}}

and so on into stuff about wedding2 

with the occasional reference to wedding1 
(as in that last line)...

...(and lots more until...
contributors-display_string=[[User:{{#explode:฿|<display>|0}}
|{{#explode:฿|<display>|0}}]] }} }}|}}
{{#arraymap:{{{uploaded_documents|}}}|+|฿
|{{#set:uploaded_documents=File:฿}}|}}
{{#arraymap:{{{other_files|}}}|+|฿
|{{#set:other_files=File:฿}}|}}
{{#arraymap:{{{pictures|}}}|+|฿
|{{#set:pictures=File::฿}}}}
{{#set:joined_with={{{joined_with|}}}}} }}
{{#if:{{{page_language|}}}||
{{#set:page_language={{#replace:{{#explode:{{PAGENAME}}
|(.|1}}|)|}} }}}}
{{#if:{{#pos:{{{globals|}}}|₧₯col::}}
|{{#set:col=
{{#explode:{{#explode:{{{globals|}}}|₧₯col::|1}}|₯₧|0}} }}}}
{{#if:{{#pos:{{{globals|}}}|age at death::}}
|{{#set:age at death={{#explode:{{#explode:{{{globals|}}}
|age at death::|1}}|₯₧|0}} }}}}
{{#if:{{#pos:{{{globals|}}}|Order of Charlemagne::}}
|{{#set:Descendant of Charlemagne, 
generation={{#explode:{{#explode:{{{globals|}}}
|Order of Charlemagne::|1}}|₯₧|0}} }}}}

<!-- Now do auto categorization -->
{{#if:{{{globals|}}}||[[Category:Globals missing- person]]}}
{{#if:{{NAMESPACE}}||[[Category:Facts articles- person
|{{{surname|}}}, {{{given_name|}}} {{{middle_name|}}}
{{{middle_names|}}}]]{{surname|{{{surname|}}}}}
{{DEFAULTSORT:{{{surname|}}}, 
{{{given_name|}}} {{{middle_name|}}}
{{{middle_names|}}} }} }}
<!-- this is where the preview mockup is coded -->
{{#ifeq:{{{ifmarried-g1|}}}| Yes |
[[Category:Person articles requiring maintenance|ifmarried-g1]]}}
{{#if:{{{birth_year| }}}|[[Category:Born in {{{birth_year}}}]]}}
{{#if:{{{death_year| }}}|[[Category:Died in {{{death_year}}}]]}}
</includeonly>
 

Something to ponder. -- Robin Patterson (Talk) 01:04, April 27, 2018 (UTC)

Model in Help:SMW[]

Help:Semantic MediaWiki/demo query-template may help too, along with its "aux" model http://familypedia.wikia.com/wiki/Help:Semantic_MediaWiki/demo_query-template/aux?action=edit . -- Robin Patterson (Talk) 05:31, April 27, 2018 (UTC)

Yes; see the new corresponding pages Template:Showfacts residences-trial and Familypedia:Residence-template/aux

Setting date and place[]

Date[]

{{set date}}:

{{set date/step1|event={{{1|}}}|<span 
{{#if:{{{nobogus|}}}|{{#if:{{{2|}}}||style="display:none"}}}}>
{{#ifeq:{{{2| }}}| 
|{{#set:{{{1|foo}}}_date=9999 }}[[9999]] | 
{{#set:{{{1|foo}}}_date={{Strpad|{{{2|}}}|4|0}}
{{#if:{{{3|}}}|-{{{3|2}}}
{{#if:{{{4|}}}|-{{{4|28}}}
{{#if:{{{5|}}}| {{{5|23}}}:{{{6|00}}} }} }} }} 
{{#ifeq:{{{7|}}}|true|BC}} }}{{d|{{{2|}}}
{{#if:{{{3|}}}|-{{{3|2}}}
{{#if:{{{4|}}}|-{{{4|28}}}
{{#if:{{{5|}}}| {{{5|23}}}:{{{6|00}}} }} }} }}|link=on}} 
{{#ifeq:{{{7|}}}|true|{{string|fm-bce}}}} }}</span>}}

And {{set date/step1}}:

{{#switch:{{{event|}}}|birth|death={{#set:{{{event|}}} blurb={{{1|}}} }}|}}
{{#switch:{{{event|}}}|birth|death={{#set:{{{event|}}} date string={{{1|}}} }}|}}{{{1|}}}

Location or place {{location set and format|birth"

<includeonly>
{{#ifeq:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}| ||
{{Location set and format/step1|event={{{1|}}}| {{no trailingcomma|
{{#if:{{{2|}}}| {{#arraymap:{{{2|}}}|+|฿|฿|, }},}} 
{{#if:{{{3| }}}{{{4| }}}{{{5| }}}{{{6| }}}{{{7| }}}|}} 
{{#if:{{{3|}}}|{{Location set and format/set|{{{1|}}}|locality|{{{3|}}}}},| }} 
{{#if:{{{4|}}}|{{Location set and format/set|{{{1|}}}|county|{{{4|}}}}},|}} 
{{#if:{{{5|}}}|{{Location set and format/set|{{{1|}}}|nation-subdiv1|{{{5|}}}}},| }} 
{{#if:{{{6|}}}|{{Location set and format/set|{{{1|}}}|nation|{{{6|}}}}},| }}}} 
{{#if:{{{7|}}}|({{{7}}})| }} }}}}
</includeonl

Now do we do the setting in {{showfacts person}} or in {{showfacts residences}}? -- Robin Patterson (Talk) 01:28, April 29, 2018 (UTC)

Thurstan (has now said on his talk page that he) prefers the latter. OK.

Properties that can be set in fields[]

Most or all can presumably be adapted from existing properties such as "birth" and "wedding1".

The date properties have simple-looking templates; for wedding1_year it is

{{configure property event|year }}

. Most of those for residence (up to residence15) have now been created.

The place ones are more complex - perhaps unnecessarily?

{{Configure property event location|event name=wedding1
|geographic unit=nation|property group=wedding}}

Is the greater complexity needed because both "place" and "location" properties arise from them? -- Robin Patterson (Talk) 00:45, May 4, 2018 (UTC)