Template talk:Familytree

From Wikipedia, the free encyclopedia

Contents

[edit] Frames

Outstanding! Would there be an easy way to turn off the frames around boxes? They don't really add much information. I guess I can hack the template myself to make my own frame-free family tree template, but it would be cleaner to provide it as an option. Arbor 12:53, 10 January 2006 (UTC)

I suppose I could add an optional boxstyle parameter with a default of "border: 2px solid black; padding: 0.2em;". Would that be OK? Or maybe just specify the border width in pixels? —Ilmari Karonen (talk) 13:37, 10 January 2006 (UTC)
Done. You can set boxstyle to fully control the box appearance, or just set border to specify the border width in pixels. If both are given, boxstyle overrides border. —Ilmari Karonen (talk) 13:47, 10 January 2006 (UTC)
I changed it so that boxstyle is appended to the style declaration instead of replacing it. That means you have to specify both border and padding in boxstyle if you want to override the corresponding defaults. —Ilmari Karonen (talk) 16:07, 10 January 2006 (UTC)

[edit] Rendering bug

Firefox 1.5 seems to have problems rendering the latest version of this template. The bug manifests as box borders extending where they shouldn't. I'm looking for a better workaround, but if nothing else helps, going back to border-collapse: separate; should eliminate the issue at the cost of some general ugliness. —Ilmari Karonen (talk) 12:17, 23 January 2006 (UTC)

I've reverted to border-collapse: separate;, see below. —Ilmari Karonen (talk) 10:08, 27 February 2006 (UTC)

[edit] Felicitations

Is there a Mediawiki version of the International Obfuscated C Coding Competition? I would nominate this template...:) Stevage 01:13, 28 January 2006 (UTC)

[edit] WikiTree

see [1]--Shizhao 02:27, 13 February 2006 (UTC)

See also Rodovid, which has more features and is more active. Wikiacc (?) 00:21, 16 March 2006 (UTC)

[edit] Missing tile?

Is it me or is a tile missing and one duplicated? There are two tiles drawing a line from left to right and from up to the middle, but not one drawing a line from up to the middle to the right. --Conti| 19:17, 26 February 2006 (UTC)

There shouldn't be any duplicate tiles. I think what you're seeing may be caused by the border-collapse bug mentioned above. I've removed the offending declaration from {{familytree/start}}, do the tiles look like they should now? —Ilmari Karonen (talk) 10:08, 27 February 2006 (UTC)
Yes, it looks correct now. Thanks! --Conti| 15:50, 27 February 2006 (UTC)

[edit] Autocompleting Tags

I have a slight query about Familytree installation. This wikicode runs on my own wiki running 1.6.6:

{{familytree/start}}
{{familytree/end}}

and it produces the following HTML output:

<table cellspacing="0" cellpadding="0" border="0" style=""></table>
<p>&lt;/table&gt;
</p>

It appears that the wiki is automatically closing the table tag in the first template and then is confused by the second template. I looked at $wgRawHtml and $wgUseTidy in DefaultSettings.php but they do not seem to have any effect. I would welcome suggestions on this. --TimSC 16:47, 1 June 2006 (UTC)

I don't know yet what causes this, but I can reproduce it on the latest development version without tidy. Adding $wgUseTidy = true; to LocalSetting.php makes it work. —Ilmari Karonen (talk) 17:24, 1 June 2006 (UTC)
More information: the problem is in Sanitizer::removeHTMLtags(), which is called by Parser::braceSubstitution() during template inclusion. With tidy enabled, the function only does some rudimentary preprocessing, but if $wgUseTidy is false, it tries to close any unclosed HTML tags by itself. I don't see any way to work around that, except maybe to rewrite the template to use wikitable syntax. —Ilmari Karonen (talk) 17:39, 1 June 2006 (UTC)
Actually, it seems I may end up having to do that anyway, if the plans to forbid unclosed HTML tags in templates even with tidy become reality. I already do have a mostly working wikitable version, but currently the emphasis is strongly on the word "mostly". :( —Ilmari Karonen (talk) 20:37, 9 June 2006 (UTC)

Hi, I'm running into this same problem on a different wiki. Did you ever learn any more about it? Does the problem go away in recent versions of MediaWiki? Did you stop working on the wikitable version because you didn't have time to finish it or because it is not clear how to do it in wikitable syntax? Thanks... --GregU 06:54, 16 February 2007 (UTC)

[edit] Future: MediaWiki extension?

Given the popularity of this template, the obvious next step would be to turn it into a MediaWiki parser hook extension. I've started this section to outline my plans for such an extension and to solicit comments on it.

[edit] Benefits

  • Performance: The current template-based system, while optimized, nonetheless strains the servers needlessly. The more popular this template gets, the more significant the performance issue becomes.
  • Portability: Family trees implemented using a MediaWiki extension would work on all Wikimedia projects, without requiring the copying of templates to each project.
  • Flexibility: The current implementation has a number of limitations, such as the 99-column limit and the requirement to define each box on the line it appears on. A MediaWiki extension would not have these problems.
  • Nicer syntax: I'm pretty proud of the way this template uses the template parameter syntax for both layout and content definitions, but let's face it, it's a hack. And the vertical bars all over the markup, while fairly easy to ignore after a while, are nonetheless ugly. With an extension, though, the syntax can be anything we want.

[edit] Goals

  • The stated purpose of this template is "rendering simple family trees based on an ASCII art-like syntax". This should remain the case. While additional features are nice, they should not overwhelm the original goal. In particular, the temptation to add every new feature during the transition from templates to extension syntax should be resisted: it is better to first make a simple extension that works and then consider additional features.
  • It should be possible to convert existing family trees automatically to the new syntax, with few or no changes in appearance.
  • The layout of the tree and the content of the boxes should be kept separate, even more so than with the current syntax if possible.
  • The syntax should remain intuitive and directly editable.
  • The appearance of the boxes should be customizable, both globally and individually.
  • The new syntax should be usable with right-to-left text (such as Hebrew). This may mean dispensing with alphabetic tiles. Fortunately, using an extension also frees more punctuation characters for use in tiles.

[edit] Issues

  • When editing, MediaWiki provides links to all the templates used on the page. No such feature currently exists for parser hook extensions. This may be a problem, since it means that an editor encountering the extension for the first time may have no convenient link to its documentation.
  • In the current syntax, each tile has a separate character. While simple and convenient, this does have the disadvantage that suitable characters are becoming scarce, particularly if new line types were to be added. Also, not all the characters are immediately obvious. With a parser hook extension, the mapping of characters to tiles could in principle be made context-sensitive, for example by insisting on lines being continuous. This would, however, be a rather major departure from the current syntax.

[edit] Syntax sketch

Here's how the example family tree above might be written using a parser hook extension:

<familytree>

         [ GRM ]y[ GRP ]
                )-------.
     [ MOM ]y[ DAD ] [DAISY]
    ,-------+-------.
 [ JOE ] [ ME  ] [ SIS ]
 
GRM   = Grandma
GRP   = Grandpa
MOM   = Mom
DAD   = Dad
DAISY = [[Aunt Daisy]]
JOE   = My brother Joe
ME    = Myself
SIS   = My little sister

</familytree>

Comments? —Ilmari Karonen (talk) 19:39, 1 June 2006 (UTC)

That would be beautiful. I am stunned by the intricacy an beauty of this template as it is, but that would be much better. AnAccount2 08:20, 8 July 2006 (UTC)

[edit] Family tree running sideways

Interesting gadget. I've found that it can also be used to build a table running sideways; see Template talk:Blackfamilytree#Dimensions. However, there's no tile for 'married with children' in that orientation. —wwoods 00:33, 26 June 2006 (UTC)

Now there is: "}". —Ilmari Karonen (talk) 12:41, 26 June 2006 (UTC)
Quick work! But it needs a dashed vertical and a solid horizontal bar. Looking at the code, I'm not sure where to switch them, so I won't mess with it.
—wwoods 17:35, 26 June 2006 (UTC)
Oops, fixed. —Ilmari Karonen (talk) 19:41, 26 June 2006 (UTC)

Thanks for the inspiration; I made a horizontal tree as well: Template:Y-DNA_R. — Reinyday, 21:10, 9 July 2006 (UTC)

[edit] Ahnentafel to family tree

Per request, I wrote some templates to convert Ahnentafels into horizontal trees. The templates are {{Ahnentafel2}}, {{Ahnentafel3}}, {{Ahnentafel4}}, {{Ahnentafel5}} and {{Ahnentafel6}}, and there's also a perl script for making more. You can see a usage example at {{Olga tree}}.

The current implementation is actually rather inefficient, since there's no real need to use the generic familytree template for such a simple task. I'll probably fix the ahnentafel templates to generate the HTML table directly, which will allow it to be optimized significantly. On the other hand, that does mean the templates can then no longer be substed for editing. —Ilmari Karonen (talk) 22:36, 3 July 2006 (UTC)

[edit] Difficult to use?

I didn't find the template that hard to use. I created a bunch of trees - they can be found at: User:Nephron/Notes. Nephron T|C 21:52, 8 July 2006 (UTC)

[edit] Are two line boxes possible

I am thinking for trees where you wish to include the person name then under it the date of birth and death. Though for general purpose use I an imagine a lot of stuff that might go on the second line. WOuld this increas teh compliexity prohibitivly? Dalf | Talk 06:27, 30 July 2006 (UTC)

Nevermind Figured this out by tinking around seems to work fine if you insert line breaks. Dalf | Talk 09:57, 30 July 2006 (UTC)

[edit] Divorce?

I just created Template:Walton family tree, it has a few problems:

  • Missing maiden names for two individuals in the tree.
  • Bud Walton and his wife divorced at some point, I have seen divorce represent in family trees before (I think with cross hatches in the line) Is there anyway we can add that? Perhaps with # as the symbol? Dalf | Talk 00:47, 31 July 2006 (UTC)
  • When I make family trees, I use an equal sign ( = ) for marriage (instead of the dotted line in this template) and a not equal sign ( ≠ ) for divorce. Please note that # is already taken as a symbol in this template. — Reinyday, 06:08, 16 August 2006 (UTC)

[edit] Request

Hello,

Can someone familiar with the syntax, please replace the {{Genealogy}} in Maumoon Abdul Gayoom and Mohamed Amin Didi with this template?. Thanks. --Oblivious 05:01, 31 July 2006 (UTC)

I will give it a go. Dalf | Talk 05:19, 31 July 2006 (UTC)
Done but you may want to look at the second one it has his materna grandparents as both having the sane name which I doubt. Dalf | Talk 05:37, 31 July 2006 (UTC)
Thanks. Its an obvious mistake by the editor who origially included the family tree. I've adjusted that now. Once again, thanks :) --Oblivious 05:41, 31 July 2006 (UTC)

[edit] Really big family trees

Does Wikipedia have a limit on the number of templates that can be included in a page? Furthermore, is it a bad idea to use this template for large family trees? I found this template when I was looking at Harold Godwinson and I thought it would be a good idea to recreate the family tree using it. If you look at User:Timc/Sandbox, you will see that I get an error when I have more than 32 templates included. -- timc talk 21:12, 14 August 2006 (UTC)

Actually, it seems that it doesn't like more than 26 of this template included. For some reason, I thought it was 32, which was a convenient number to point a finger at. On the other hand, 26 seems like a strange number. -- timc talk 02:40, 15 August 2006 (UTC)

[edit] Changes?

Have there been changes in how the familytree structure is interpreted?

It seems that something has changed. The article arterial tree has a bunch of ""s that weren't there before and somehow came from changes elsewhere. Nephron T|C01:51, 15 August 2006 (UTC)

This seems related to my comment above on really big family trees. If you count, you'll see that there are 44 transclusions, and 18 "{{familytree}}"s at the top, which means that 26 of them are displayed correctly. I am guessing that something has changed in the software, because this template hasn't changed recently. -- timc talk 02:43, 15 August 2006 (UTC)
I have found the cause of this issue. See New template limits, Special:ExpandTemplates. -- timc talk 02:52, 15 August 2006 (UTC)

[edit] Wow

Wow, wikitext is so flexible and cool and easy to program in. Let's rewrite MediaWiki in it! -- Tim Starling 03:55, 15 August 2006 (UTC)

Funny! -- timc talk 03:59, 15 August 2006 (UTC)

I reduced the maximum parameter count for this template from 99 to 40, that seems to increase the maximum number of inclusions to about 42. -- Tim Starling 04:17, 15 August 2006 (UTC)


[edit] It doesn't work

User:Striver/Sahaba's ancestors cant take it anymore, and there is a LOT left :( --Striver 15:28, 17 August 2006 (UTC)

[edit] Distinguishing marriage vs. descent

Currently, dashed lines are being used to indicate both marriages and lines of omitted or uncertain generations of descent? Would it be practical to add double-line tiles to indicate marriages? Or alternately, to add dotted-line tiles for the other?
—wwoods 22:27, 25 September 2006 (UTC)

[edit] Colouring individual boxes?

Is there anyway to add style parameters to individual boxes? What I want to do is illustrate the direct line of descent by having the box background of direct ancestors from a given individual be green, or blue, or whatever. Currently, the only way see is to use the boxstyle for the whole row, which doesn't really work for this purpose. Image:Icons-flag-scotland.png Canæn Image:Icons-flag-scotland.png 08:20, 31 October 2006 (UTC)

[edit] Won't Work

When I put this in it won't work:

Adam
Eve
son
Cain
Abel
Seth
daughter
Enos
Enoch
Cainan
Irad
Mahalaleel
Mahujael
Jared
Methusael
Enoch
Adah
Lamech
Zillah
Methuselah
Jabal
Jubal
Tubal Cain
Naamah
Lamech
Noah
Japheth
Shem
Ham


I've fixed the chart by closing two open lines; the one with Noah, and the final line including Ham. Also, the line above Noah only had one bracket to close. You've got to close every line with Two "}" brakcets. Image:Icons-flag-scotland.png Canæn Image:Icons-flag-scotland.png 06:39, 8 January 2007 (UTC)

Thanks!

[edit] It Worked this time!

?
Terah
?
Nahor
Haran
Sarai
Abraham
Hagar
Milcah
Lot
Isaac
Ishmael
Bethual
Mahalath
Laban
Rebekah
Rachel
Leah
Jacob
Esau

[edit] Help editing?

Can someone who's more familiar with family trees have a look at User:Mrdini/test and see if this familytree template could help in cleaning up the two family trees from Dream_of_the_Red_Chamber? TIA! Mrdini 11:44, 1 February 2007 (UTC)

[edit] Another 'help editing' request! Too big?

I was wondering if someone experienced with family trees might take a look at my sandbox page - User:Merteuil/Sandbox: Lymond - Family Tree. I think that the underlying script is correct but for some reason, parts of the family tree do not appear (even though programmed to do so) on the far right of the page - there are gaps in the lines connecting the boxes (which do not exist in the underlying script) and also missing boxes. I wondered if this results from the family tree being too large? Any help and/or advice would be much appreciated! Thank you! Merteuil 05:53, 19 February 2007 (UTC)

[edit] Marriages

I am working on making the Julio-Claudian family tree into this template at Julio-Claudian family tree/Update. However, the tree is somewhat confusing because some members marry multiple wives and others adopt heirs. I have used a dashed line to indicate the heirs and I have continued to use a dashed line for marriages. In order to fit some marriages in I have had to use vertical dashed lines and in order to attach some members to their heirs I have had to use horizontal dashes. Therefore both associations use dashes in every direction. I would like to make a double line for marriages but I am unsure of what symbols I should use to recresent the other lines. Any suggestions would be helpful.

Secondly I would like to be able to include the number in which members married their successive wives but I can't think of how to do it efficiently. —David618 t 22:52, 20 February 2007 (UTC)

[edit] T H I S I S W A A A A Y T O O B I G

The templates render IMHO too wide, screwing up e.g. Elizabeth of Aragon. Please try to make it smaller. -- Matthead discuß! O 00:11, 27 February 2007 (UTC)

Family trees are big by their nature. They grow exponentially or geometrically (depending). That said someone can format them in diffrent ways to make them smaler, but using smaller fonts is not especaily useful as some people cant read them that well. Dalf | Talk 00:56, 27 February 2007 (UTC)
You can use something like {{familytree/start | style=font-size: 50%;}} to make the font smaller. For simple ancestor trees like the one on Elizabeth of Aragon, however, a horizontal tree may be more compact, and can be easily created from an Ahnentafel using the {{ahnentafel2}}, {{ahnentafel3}}, {{ahnentafel4}}, {{ahnentafel5}} and {{ahnentafel6}} templates, like this:
Peter II of Aragon
James I of Aragon
Marie of Montpellier
Peter III of Aragon
Andrew II of Hungary
Violant of Hungary
Yolande de Courtenay
Elizabeth of Aragon
Frederick II, Holy Roman Emperor
Manfred of Sicily
Bianca, Countess of Lancia
Constantia of Hohenstaufen
Amadeus IV of Savoy
Beatrice of Savoy
Anne of Burgundy
Ilmari Karonen (talk) 19:01, 27 February 2007 (UTC)
Pretty easy to do horizontally with this template too like in Walton family. Dalf | Talk 21:01, 27 February 2007 (UTC)