විකිපීඩියා:Automated taxobox system/notes
Documentation for the automated taxobox system
Taxonomy templates
Taxobox templates
- Which should be used?
- Changing the taxa displayed
- Convert a taxobox to an automated taxobox
- Glossary of automated taxobox parameters
- Automatic taxobox – mainly for genera and higher taxa
- Speciesbox – for a species
- Subspeciesbox – for an animal subspecies
- Infraspeciesbox – for a plant subspecies or variety
- Hybridbox – for an animal hybrid within a genus
- Ichnobox – for a trace fossil
- Oobox – for a fossil egg
- Virusbox – for viruses and non-cellular life
Notes for "old hands"
[සංස්කරණය]Major changes to the automated taxobox system were made from the middle of 2016 onwards. There were two motivations:
- to remove expansion depth overflows, caused by the constant addition of clades to some taxonomic hierarchies, especially dinosaur taxa
- to clarify and simplify the system, both for maintaining editors and for editors creating and editing taxonomy templates.
Use of Lua
[සංස්කරණය]All traversals of the taxonomic hierarchy are now coded in Lua, in Module:Autotaxobox. This completely removes the need for clever tricks to get round the absence of iteration and recursion in the template language, as well as expansion depth issues caused by these tricks. Hierarchies with 100 levels can now be handled without problems (a figure that can probably be increased).
See Detailed map for a map of the code as it is now.
Taxonomy templates simplified
[සංස්කරණය]"Duplicate" templates – templates with essentially the same function but different names – were previously needed to avoid loops forbidden in the template language. These are no longer necessary. This allows a major simplification to taxonomy templates. Previously, a variant taxonomy template that obtained some of its information from another taxonomy template (the "same as" taxonomy template) had to contain a different internal template (such as Taxon variant
rather than Don't edit this line
).
(Had both the variant and "same as" taxonomy templates contained Don't edit this line {{{machine code|}}}
, then to obtain, for example, the value of parent
for a variant taxonomy template would have involved the variant taxonomy template calling Don't edit this line parent
, which then called Don't edit this line parent
again, this time from the "same as" taxonomy template. This would have created a loop, which is forbidden. By converting to Lua, the loop problem has been avoided.)
- All taxonomy templates should now begin
{{Don't edit this line {{{machine code|}}}
- Any taxonomy template can contain
|same_as=
; any information missing from that taxonomy template (i.e. blank) will be looked up in the "same as" taxonomy template. This only works once, i.e. the "same as" taxonomy template must not contain a|same_as=
.
- Hence /skip and /? templates are now coded using
Don't edit this line
andsame_as
.
- The
|{{{1}}}
bit in a taxonomy template has long been redundant to the use of themachine code
parameter, but until late 2016 was still used in a few places. These uses have all been removed, so this|{{{1}}}
is no longer needed, and a bot has removed all occurrences from taxonomy templates.