Template talk:Automatic taxobox/Archive 2

Section not included, but subsection is
{&#123;automatic taxobox }}See the taxobox to the right>>>>> Bob the Wikipedian (talk • contribs) 06:31, 5 October 2010 (UTC)
 * taxon = Papilionoidea
 * name = Papilionoidea
 * display_taxa=2


 * Should a section always display in its children's taxoboxes? (That's easily added at Template:Taxobox/taxonomy cell.)
 * Subsection is displayed in this example because the immediate parent is always shown.
 * Martin  (Smith609 – Talk)  12:55, 5 October 2010 (UTC)

I would include the SECTION as long as the SUBSECTION is needed, but eliminate both when the SUBSECTION is not neeeded. SECTION gives the SUBSECTION context. Bob the Wikipedian (talk • contribs) 20:54, 5 October 2010 (UTC)


 * This sounds like something that might have to be done manually (using 2), I'm afraid. Martin  (Smith609 – Talk)  21:54, 5 October 2010 (UTC)


 * I assume that gets added to Taxonomy/Cossina (section) and any other sections... Bob the Wikipedian (talk • contribs) 22:11, 5 October 2010 (UTC)
 * Sorry not to be clear; no, it'd have to be added to the taxoboxes themselves (I've edited your example here accordingly). Not sure whether there's a simple way to work around this, although there might be a low-performance way to work it out.  Martin  (Smith609 – Talk)  22:24, 5 October 2010 (UTC)


 * I see...and knowing that, I can infer that for all taxa that are immediate daughters of subsections, that code will force the grandparent taxon to display, if I understand correctly. Well, at least there's a workaround. :\ Bob the Wikipedian (talk • contribs) 22:27, 5 October 2010 (UTC)


 * Looks like Rhitko fixed it by using ZOOSECTIO instead of SECTIO. Works for me :) Bob the Wikipedian (talk • contribs) 22:34, 5 October 2010 (UTC)

resolved

Reptilia or Sauropsida?
I've been going through the most linked taxa on Species.WikiMedia.org and adding them into the "database" of tax templates. These will inevitably be the most used, so they might as well exist and be functional. Along the way, I've realized we've got a few near-synonyms here and there which are a bit hard to decide which one to use.

Eutheria vs. Placentalia was an easy decision based on the redirect from Placentalia to Eutheria, but Reptilia vs. Sauropsida isn't quite so easy. I've posted a discussion topic at Wikipedia talk:WikiProject Amphibians and Reptiles. Any comments, send 'em that direction. Bob the Wikipedian (talk • contribs) 07:21, 5 October 2010 (UTC) resolved

Incertae sedis
Looks like the 144th and 150th most used taxa on WikiSpecies (unassigned core eudicots and unassigned asterids) are coming up on my list of taxa to create templates for. In order to preserve the taxonomical structure, I'm planning on creating them as shown:

Template:Taxonomy/Unassigned asterids

Objections/issues with this convention? Bob the Wikipedian (talk • contribs) 00:15, 6 October 2010 (UTC)


 * Rather, I'll just link the daughter taxa to the known grandparent or great-grandparent taxa and leave out the incertae sedis. Bob the Wikipedian (talk • contribs) 01:29, 6 October 2010 (UTC)


 * I think that's ok. I'm not sure the orders you're talking about are actually considered to be incertae sedis. I've never seen that convention before. APG III itself just treats them as core eudicots that were not classified in either asterids or rosids. Is it more appropriate to think of them as basal core eudicots? I, for one, wouldn't want incertae sedis to show up on the Caryophyllales article, for example. Rkitko (talk) 01:40, 6 October 2010 (UTC)


 * Yes, that appears to be correct. Incertae sedis is used in zoological taxonomy quite often, where every taxon is expected (by the average person) to be assigned to a kingdom, phylum, class, order, family, genus, and species. When we're unsure the phylum, class, order, or family, we say the corresponding taxon is incertae sedis (uncertain) but typically assign a new daughter taxon (genus, sometimes family) beneath the incertae sedis taxon. Fundamentally, though, it's the same as what you've described in the botanical situation...just one fewer taxon in the taxonomy. Bob the Wikipedian (talk • contribs) 02:10, 6 October 2010 (UTC)


 * I have used Template:Taxonomy/incertae_sedis_(animalia) in this situation. Martin  (Smith609 – Talk)  21:32, 6 October 2010 (UTC)

Too many parent taxa gives the taxobox ugly colors

 * ANNNNNNNDDDDD we're now bug-free. Time to do some more testing, I suppose. When I come back later, I'll begin adding the most-used taxa starting at #201, Begoniaceae. Bob the Wikipedian (talk • contribs)

When displaying infrataxon, also display parent subtaxon if available
This taxobox ought to display the suborder Serpentes in order to give the infraorder context. The same goes for any and all infrataxa-- the parent subtaxon should always display as long as it does. Bob the Wikipedian (talk • contribs) 01:05, 10 October 2010 (UTC)
 * I've only implemented the "is my child an infrataxon" test in the grandparent of the taxon after whom the taxobox is named; the immediate parent displays automatically, and infrataxa won't display at higher ranks unless they are forced to using the always_display parameter (which would presumably also be switched on in their parent). Martin  (Smith609 – Talk)  03:21, 10 October 2010 (UTC)
 * Nice! Keep up the good work! Bob the Wikipedian (talk • contribs) 04:53, 10 October 2010 (UTC)

When displaying the parvtaxon, display both parent infrataxon and grandparent subtaxon
I'm off to try to implement a line or two that will perform the following:


 * if (parent.name.substring(0,4).equals("parv"))
 * if (parent.parent.name.substring(0,5).equals("infra"))
 * parent.visible = true;
 * parent.parent.visible = true;
 * }
 * }
 * }
 * }
 * }

Hopefully that will not break anything... Bob the Wikipedian (talk • contribs) 17:26, 10 October 2010 (UTC)
 * I've got it working. I don't have time to test it extensively at the moment (on my way out the door) but it should be able to display the subtaxon, infrataxon, and parvtaxon if the parvtaxon is the parent. Plus that was a great experience, learning some new wikimarkup. When I get home later I'll enable the code in the template space. Bob the Wikipedian (talk • contribs) 21:16, 10 October 2010 (UTC)
 * I edited Template:Infrataxon before seeing this message (I noticed your edit to Template:Taxonomy/44); this makes Template:parvtaxon unnecessary, although it may be clearer to do it your way. I'll let you update Template:Taxobox/taxonomy as you see fit.  Glad you are able to make head and tail of the templates!  Martin  (Smith609 – Talk)  00:47, 11 October 2010 (UTC)
 * Because sometimes the infrataxon is omitted between the suborder and the parvorder, as in the case with the crows, I think the separate checks for infras and parvs will work better. This could be combined into a template that takes a substring parameter entered on the taxobox/taxonomy template at the beginning as a parameter and calculates how many letters to check, but no sense in writing more code when this works. Bob the Wikipedian (talk • contribs) 02:26, 11 October 2010 (UTC)


 * If the first four letters are "INFR", it's probably safe to bet that the next is "A", so I think that you can get away by just looking at the first four letters. I'm having problems testing things at the moment, so just a query:  will the subclass still be displayed on the page of an order if an infraclass exists, and a superorder exists?  In this case, only the superorder and class should display, and I'm worried that the presence of the infraclass might cause the great-grandparent to display too.  You may well have worked this out -- I'm having internet problems at the moment and none of the Template:TAxonomy/40 series are displaying ANY ranks at the moment.  Martin  (Smith609 – Talk)  02:52, 11 October 2010 (UTC)
 * I didn't have any luck with the numbers. Right, you could probably just pass a four-letter string no problem. See my bug report below-- that might answer one of your questions. Bob the Wikipedian (talk • contribs) 02:57, 11 October 2010 (UTC)
 * The numbers weren't working because they didn't start with a letter. I'm moving these test templates to Template:Taxonomy/Test-49 etc.  You can help create them if you like, by copying Template:Taxonomy/sandbox to the new pages (with the !s removed!). Martin  (Smith609 – Talk)  04:07, 11 October 2010 (UTC)

Parent of second-least major taxon is showing
It would seem this is happening now in a lot of taxoboxes.Bob the Wikipedian (talk • contribs) 02:53, 11 October 2010 (UTC)
 * {#if:expr|true|false} returns the "true" part of the template if "expr" evaluates to any string whatsoever. It doesn't support logic statements (or, and, etc).  So by including the word "or", expr evalutated to "or", which was not a null string -- so the if template was returning "true" where it should have returned "false".  I've amended the code to fix this.  (Remember that this is a live template; if you suspect that an edit is introducing a bug it's worth reverting it until you can resolve it.) Martin  (Smith609 – Talk)  03:34, 11 October 2010 (UTC)


 * Aha, I wondered if the "or" was not working properly. Glad you caught that. Bob the Wikipedian (talk • contribs) 04:03, 11 October 2010 (UTC)

When displaying subsection, section should be displayed
Wow, I must have really broken it this time. I am pretty exhausted right now from partying and coding is the last thing I want to think about, so I'm just filing another bug report. Bob the Wikipedian (talk • contribs) 03:41, 11 October 2010 (UTC)
 * Since the section is actually represented by "zoosectio" and "zoosubsectio", that might be the problem...are we parsing somewhere for "sub" at the beginning of a taxon? Bob the Wikipedian (talk • contribs) 04:05, 11 October 2010 (UTC)
 * 04:31, 11 October 2010 (UTC)

Low-level unranked taxa's first rankable ancestor should be displayed
In this instance, the superorder Acariformes needs to be displayed. Bob the Wikipedian (talk • contribs) 03:55, 11 October 2010 (UTC)


 * I've added "unranked" to the list of sub-taxa that trigger Infrataxon to return "true". This means that your parvtaxon check will kick in.  This technique is good as far as the grandparent; extending it further is risky, as it's easy to manually over-ride the default display to a higher number, but not to limit it.  I'm worried about where there is a clade that provides the necessary context, but hasn't been assigned a taxonomic rank:  a feasible scenario would be an unranked_regnum named "panarthropoda" for some fossil in the arthropod stem.  We don't want to display every sub-taxon up to "life" in this instance.  So is the best solution to display up to three unranked_ ranks automatically, then let the editor over-ride the default behaviour if more are required? Martin  (Smith609 – Talk)  04:47, 11 October 2010 (UTC)
 * Go for it. ;) Bob the Wikipedian (talk • contribs) 04:54, 11 October 2010 (UTC)