Template talk:Familytree
From Wikipedia, the free encyclopedia
[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)
[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></table> </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 byParser::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)
[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)
-
-
- 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)
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. Canæn 08:20, 31 October 2006 (UTC)