Editing
Module:Autotaxobox/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{High-risk}} {{Module rating|protected}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> [[Module:Autotaxobox]] {{Toolbar|style=font-size:90% |separator=dot | 1 = [[:Module talk:Autotaxobox|talk]] | 2 = {{edit|1=Module:Autotaxobox|2=edit}} | 3 = {{history|Module:Autotaxobox|hist}} | 4 = [{{fullurl:Special:WhatLinksHere/:Module:Autotaxobox|limit=999}} links] | 5 = [[Module:Autotaxobox/doc|doc]] | 6 = [[Special:PrefixIndex/Module:Autotaxobox|subpages]] | 7 = [[Module:Autotaxobox/sandbox|sandbox]] | 8 = [[Module talk:Autotaxobox/testcases|testcases]] }} The purpose of this module is to provide support for the [[WP:Automated taxobox system|automated taxobox system]] (including templates such as {{tl|Speciesbox}} and {{tl|Automatic taxobox}}), avoiding Mediawiki template expansion depth errors in the traversal of the taxonomic hierarchies encoded in taxonomy templates. Currently, processing is arbitrarily limited to hierarchies containing at most {{#invoke:Autotaxobox|getMaxSearchLevels}} levels. See the [[WP:Automated taxobox system/map|automated taxobox system map]] for information on how the module's functions are used in the system. == taxoboxColour == Given a taxon name, this function returns the correct colour of an automated taxobox for that taxon. It does so by searching up the taxonomic hierarchy for a 'real' taxon (i.e. not ''incertae sedis'') that sets the taxobox colour, and then returning that colour. If no 'real' taxon is found, then if an ''incertae sedis'' taxon was found, the ''incertae sedis'' colour is returned, otherwise "transparent" is returned. (If the taxonomic hierarchy is too deep to process, the error colour is returned.) Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxoboxColour|''taxon_name''}}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. Examples: :<nowiki>{{#invoke:Autotaxobox|taxoboxColour|Felis}}</nowiki> β {{#invoke:Autotaxobox|taxoboxColour|Felis}} :<nowiki>{{#invoke:Autotaxobox|taxoboxColour|Acacia}}</nowiki> β {{#invoke:Autotaxobox|taxoboxColour|Acacia}} == taxoboxList == Given the name of a taxon, this function returns the rows of taxa in an automated taxobox, based on the taxonomic hierarchy for the supplied taxon. If the lowest taxon displayed in the taxobox is below the rank of genus, the supplied taxon will usually be at a higher rank than the taxobox's target taxon, so that there is an offset to be taken into account. Usage: <code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxoboxList<br> |''the name of taxon upwards from which the taxonomic hierarchy is to be displayed by this function''<br> |display_taxa = ''the number of taxa above taxon to force to be displayed''<br> |authority = ''taxonomic authority for the lowest level taxon in the taxobox (the taxobox_target) (see also offset below)''<br> |parent_authority = ''taxonomic authority for taxobox_target's parent''<br> |gparent_authority = ''taxonomic authority for taxobox_target's grandparent''<br> |ggparent_authority = ''taxonomic authority for taxobox_target's greatgrandparent''<br> |gggparent_authority = ''taxonomic authority for taxobox_target's greatgreatgrandparent''<br> |bold_first = ''bold to embolden taxon in its row''<br> |offset = ''the offset of taxon from taxobox_target β the number of steps from taxobox_target to taxon''<br> }}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. The others are explained above. Examples: <pre>{| class="wikitable" {{#invoke:Autotaxobox|taxoboxList|Felis|authority=Linnaeus, 1758}} |}</pre> β {| class="wikitable" {{#invoke:Autotaxobox|taxoboxList|Felis|authority=Linnaeus, 1758}} |} == taxonomyList == Given a taxon name, this function returns the rows of the taxonomy table displayed on the "Template:Taxonomy/''taxon_name''" page, based on the taxonomic hierarchy for the supplied taxon name. When <em>descending</em> the taxonomic hierarchy, if a rank is found that is at either the same or a higher level than a rank already encountered (e.g. a family is found below a subfamily), the cell displaying the rank is given a reddish background; if it's the supplied taxon, the article is put into the tracking category [[:Category:Taxonomy templates showing anomalous ranks]]. The numerical values defined in <code>getRankTable()</code> are used to determine the correct sequence of ranks. Ranks without values in this table do not have their order checked. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonomyList|''taxon_name''}}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. Examples: <pre>{{#invoke:Autotaxobox|taxonomyList|Felis}}</pre> β {| class="wikitable" |{{#invoke:Autotaxobox|taxonomyList|Felis}} |} == callTaxonomyKey == This function prepares for, and then calls, {{tl|Taxonomy key}} to display a taxonomy template page (which in turn invokes [[#taxonomyList|<code>taxonomyList</code>]] from this module). It does this by building up the information the template requires, following one <code>same_as</code> link if present, and then calling it. It is used by {{tl|Don't edit this line}}. Usage: <code><nowiki>{{</nowiki>#invoke:Autotaxobox|callTaxonomyKey<br> |taxon= <br> |parent= <br> |rank= <br> |extinct= <br> |always_display= <br> |link_target=value of the 'link' parameter in the taxonomy template<br> |link_text=value of the unnamed parameter in the taxonomy template<br> |refs= <br> |same_as= <br> }}</code> == showRefs == Shows the refs field in a taxonomy template, handing incertae sedis taxa and using 'β' for absent refs. Usage: :<nowiki>{{</nowiki>#invoke:Autotaxobox|showRefs|''taxon_name''|''refs''}} Examples: :<nowiki>{{</nowiki>#invoke:Autotaxobox|showRefs|Neoscona|<nowiki>{{</nowiki>Taxon info|Neoscona|refs}}}} β {{#invoke:Autotaxobox|showRefs|Neoscona|{{Taxon info|Neoscona|refs}}}} :<nowiki>{{</nowiki>#invoke:Autotaxobox|showRefs|Incertae sedis/Characidae|}} β {{#invoke:Autotaxobox|showRefs|Incertae sedis/Characidae|}} == taxonLink == Returns a wikilink to a taxon, if required including 'β ' before it and ' (?)' after it, and optionally italicized or bolded without a wikilink. It can be used externally via {{tl|Taxon link}}. Some parameters can, under some circumstances, be omitted. Usage: <code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonLink<br> |taxon= </code>(having '/?' at the end triggers the output of ' (?)')<code><br> |extinct= </code>('yes' or 'true' triggers the output of 'β ')<code><br> |bold= </code>('yes' makes the core output bold and not wikilinked)<code><br> |italic= </code>('yes' makes the core output italic)<code><br> |link_target=''target for the wikilink''<br> |plain_link_text= ''text of the wikilink'' </code>(without β , italics, etc.)<code><br> }}</code> Examples: :<nowiki>{{#invoke:Autotaxobox|taxonLink|taxon=Felis|italic=yes}}</nowiki> β {{#invoke:Autotaxobox|taxonLink|taxon=Felis|italic=yes}} :<nowiki>{{#invoke:Autotaxobox|taxonLink|taxon=Incertae sedis/Animalia}}</nowiki> β {{#invoke:Autotaxobox|taxonLink|taxon=Incertae sedis/Animalia}} :<nowiki>{{#invoke:Autotaxobox|taxonLink|link_target=Pterosaur|plain_link_text=Pterosauromorpha|extinct=yes}}</nowiki> β {{#invoke:Autotaxobox|taxonLink|link_target=Pterosaur|plain_link_text=Pterosauromorpha|extinct=yes}} :<nowiki>{{#invoke:Autotaxobox|taxonLink|taxon=Dinosauria/?|link_target=Dinosaur|plain_link_text=Dinosauria|extinct=yes}}</nowiki> β {{#invoke:Autotaxobox|taxonLink|taxon=Dinosauria/?|link_target=Dinosaur|plain_link_text=Dinosauria|extinct=yes}} ==taxonInfo== Given the names of a taxon and the required item of information stored in the taxon's taxonomy template, this function returns the value of the item, following one "same as" link if available and the value would otherwise be the empty string. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonInfo|''taxon_name''|''item_name''}}</code> Parameters: :The first unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. :The possible values of the second unnamed parameter are given at {{tl|Taxon info/doc}}. Examples: :<nowiki>{{#invoke:Autotaxobox|taxonInfo|Felis|rank}}</nowiki> β {{#invoke:Autotaxobox|taxonInfo|Felis|rank}} :<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}}</nowiki> β {{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}} :<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}}</nowiki> β {{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}} ==Utilities== These functions are intended to be used only in analysing and understanding the automated taxobox system, including the taxonomic hierarchies encoded in taxonomy templates β for example in testing and debugging. They are not part of the functioning of the automated taxobox system. ===getMaxSearchLevels=== Returns the maximum number of levels of a taxonomic hierarchy encoded in taxonomy templates that the system will search. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|getMaxSearchLevels}}</code> β {{#invoke:Autotaxobox|getMaxSearchLevels}} ===showRankTable=== Returns a sortable wikitable containing the ranks and corresponding numerical values defined in <code>getRankTable()</code> and used in checking the consistency of a taxonomic hierarchy. If a taxon has a value in the rank table, it should always be lower than one higher in the taxonomic hierarchy. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|showRankTable}}</code> ===find=== Given a taxon name and a rank, this function returns the taxon's ancestor of the given rank. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|''taxon_name''|''rank''}}</code> Parameters: :The first unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. :The second unnamed parameter should be the Latinized name of a rank. Examples: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Felis|ordo}}</code> β {{#invoke:Autotaxobox|find|Felis|ordo}} :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Felis|classis}}</code> β {{#invoke:Autotaxobox|find|Felis|classis}} :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Pteranodon|phylum}}</code> β {{#invoke:Autotaxobox|find|Pteranodon|phylum}} :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Pteranodon|classis}}</code> β {{#invoke:Autotaxobox|find|Pteranodon|classis}} ===nth=== Given a taxon name, this function returns the ''n''th taxon above it in the taxonomic hierarchy. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|nth|''taxon_name''|n=''integer''}}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. :'''n''' is the level whose taxon is to be found Examples: :<nowiki>{{#invoke:Autotaxobox|nth|Felis|n=1}}</nowiki> β {{#invoke:Autotaxobox|nth|Felis|n=1}} :<nowiki>{{#invoke:Autotaxobox|nth|Felis|n=15}}</nowiki> β {{#invoke:Autotaxobox|nth|Felis|n=15}} ===nLevels=== Given a taxon name, this function returns the number of levels at and above it in the taxonomic hierarchy. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|nLevels|''taxon_name''}}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. Examples: :<nowiki>{{#invoke:Autotaxobox|nLevels|Felis}}</nowiki> β {{#invoke:Autotaxobox|nLevels|Felis}} :<nowiki>{{#invoke:Autotaxobox|nLevels|Pteranodon}}</nowiki> β {{#invoke:Autotaxobox|nLevels|Pteranodon}} ===listAll=== Given a taxon name, this function returns a comma-separated list of all the levels at and above it in the taxonomic hierarchy. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|listAll|''taxon_name''}}</code> Parameters: :The unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists. Examples: :<nowiki>{{#invoke:Autotaxobox|listAll|Plantae}}</nowiki> β {{#invoke:Autotaxobox|listAll|Plantae}} :<nowiki>{{#invoke:Autotaxobox|listAll|Felis}}</nowiki> β {{#invoke:Autotaxobox|listAll|Felis}} ===removeQualifier=== Given a taxon name, this function returns the name with any qualifier (i.e. any part after a "/") removed. Usage: :<code><nowiki>{{</nowiki>#invoke:Autotaxobox|removeQualifier|''taxon_name''}}</code> Examples: :<nowiki>{{#invoke:Autotaxobox|removeQualifier|Eukaryota/display}}</nowiki> β {{#invoke:Autotaxobox|removeQualifier|Eukaryota/display}} :<nowiki>{{#invoke:Autotaxobox|removeQualifier|Felis}}</nowiki> β {{#invoke:Autotaxobox|removeQualifier|Felis}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Taxobox templates]] }}</includeonly> <noinclude> [[Category:Module documentation pages]] </noinclude>
Summary:
Please note that all contributions to MycoTaxa may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MycoTaxa:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Anglicise rank
(
edit
)
Template:Citation
(
edit
)
Template:Delink
(
edit
)
Template:Don't edit this line always display
(
edit
)
Template:Don't edit this line extinct
(
edit
)
Template:Don't edit this line link target
(
edit
)
Template:Don't edit this line link text
(
edit
)
Template:Don't edit this line parent
(
edit
)
Template:Don't edit this line rank
(
edit
)
Template:Don't edit this line refs
(
edit
)
Template:Don't edit this line same as
(
edit
)
Template:Edit
(
edit
)
Template:Edit a taxon
(
edit
)
Template:High-risk
(
edit
)
Template:High-use
(
edit
)
Template:History
(
edit
)
Template:Is italic taxon
(
edit
)
Template:Module rating
(
edit
)
Template:Principal rank
(
edit
)
Template:Str left
(
edit
)
Template:Taxobox/Error colour
(
edit
)
Template:Taxobox colour
(
edit
)
Template:Taxon info
(
edit
)
Template:Taxonomy/Acacia
(
edit
)
Template:Taxonomy/Aeluroidea
(
edit
)
Template:Taxonomy/Amniota
(
edit
)
Template:Taxonomy/Amorphea
(
edit
)
Template:Taxonomy/Angiosperms
(
edit
)
Template:Taxonomy/Animalia
(
edit
)
Template:Taxonomy/Archaeplastida
(
edit
)
Template:Taxonomy/Archosauria
(
edit
)
Template:Taxonomy/Archosauria/skip
(
edit
)
Template:Taxonomy/Avemetatarsalia
(
edit
)
Template:Taxonomy/Aves/skip
(
edit
)
Template:Taxonomy/Bilateria
(
edit
)
Template:Taxonomy/Boreoeutheria
(
edit
)
Template:Taxonomy/Breviquartossa
(
edit
)
Template:Taxonomy/CAM
(
edit
)
Template:Taxonomy/Caesalpinioideae
(
edit
)
Template:Taxonomy/Carnivora
(
edit
)
Template:Taxonomy/Carnivoraformes
(
edit
)
Template:Taxonomy/Carnivoramorpha
(
edit
)
Template:Taxonomy/Choanozoa
(
edit
)
Template:Taxonomy/Chordata
(
edit
)
Template:Taxonomy/Core eudicots
(
edit
)
Template:Taxonomy/Deuterostomia
(
edit
)
Template:Taxonomy/Diaphoretickes
(
edit
)
Template:Taxonomy/Embryophytes/Plantae
(
edit
)
Template:Taxonomy/Eudicots
(
edit
)
Template:Taxonomy/Eugnathostomata
(
edit
)
Template:Taxonomy/Eukaryota
(
edit
)
Template:Taxonomy/Eukaryota/displayed
(
edit
)
Template:Taxonomy/Eumetazoa
(
edit
)
Template:Taxonomy/Eupterodactyloidea
(
edit
)
Template:Taxonomy/Eutheria
(
edit
)
Template:Taxonomy/Fabaceae
(
edit
)
Template:Taxonomy/Fabales
(
edit
)
Template:Taxonomy/Fabids
(
edit
)
Template:Taxonomy/Felidae
(
edit
)
Template:Taxonomy/Feliformia
(
edit
)
Template:Taxonomy/Felinae
(
edit
)
Template:Taxonomy/Felis
(
edit
)
Template:Taxonomy/Feloidea
(
edit
)
Template:Taxonomy/Ferae
(
edit
)
Template:Taxonomy/Ferungulata
(
edit
)
Template:Taxonomy/Filozoa
(
edit
)
Template:Taxonomy/Gnathostomata
(
edit
)
Template:Taxonomy/Holozoa
(
edit
)
Template:Taxonomy/Laurasiatheria
(
edit
)
Template:Taxonomy/Life
(
edit
)
Template:Taxonomy/Macronychoptera
(
edit
)
Template:Taxonomy/Mammalia
(
edit
)
Template:Taxonomy/Mammalia/skip
(
edit
)
Template:Taxonomy/Mimosoid clade
(
edit
)
Template:Taxonomy/Monofenestrata
(
edit
)
Template:Taxonomy/Neoscona
(
edit
)
Template:Taxonomy/Nephrozoa
(
edit
)
Template:Taxonomy/Novialoidea
(
edit
)
Template:Taxonomy/Obazoa
(
edit
)
Template:Taxonomy/Olfactores
(
edit
)
Template:Taxonomy/Opisthokonta
(
edit
)
Template:Taxonomy/Ornithocheiroidea
(
edit
)
Template:Taxonomy/Ornithodira
(
edit
)
Template:Taxonomy/Pan-Carnivora
(
edit
)
Template:Taxonomy/ParaHoxozoa
(
edit
)
Template:Taxonomy/Placentalia
(
edit
)
Template:Taxonomy/Plantae
(
edit
)
Template:Taxonomy/Polysporangiophytes/Plantae
(
edit
)
Template:Taxonomy/Pteranodon
(
edit
)
Template:Taxonomy/Pteranodontia
(
edit
)
Template:Taxonomy/Pteranodontidae
(
edit
)
Template:Taxonomy/Pteranodontinae
(
edit
)
Template:Taxonomy/Pteranodontoidea
(
edit
)
Template:Taxonomy/Pterodactyliformes
(
edit
)
Template:Taxonomy/Pterodactyloidea
(
edit
)
Template:Taxonomy/Pterodactylomorpha
(
edit
)
Template:Taxonomy/Pterosauria
(
edit
)
Template:Taxonomy/Pterosauromorpha
(
edit
)
Template:Taxonomy/Reptiliomorpha
(
edit
)
Template:Taxonomy/Rosids
(
edit
)
Template:Taxonomy/Sauropsida
(
edit
)
Template:Taxonomy/Scrotifera
(
edit
)
Template:Taxonomy/Spermatophytes/Plantae
(
edit
)
Template:Taxonomy/Superrosids
(
edit
)
Template:Taxonomy/Teleostomi
(
edit
)
Template:Taxonomy/Tetrapoda
(
edit
)
Template:Taxonomy/Theria
(
edit
)
Template:Taxonomy/Theria/skip
(
edit
)
Template:Taxonomy/Tracheophytes/Plantae
(
edit
)
Template:Taxonomy/Vertebrata
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Template:Toolbar
(
edit
)
Module:Arguments
(
edit
)
Module:Autotaxobox
(
edit
)
Module:Citation/CS1
(
edit
)
Module:Citation/CS1/Configuration
(
edit
)
Module:Delink
(
edit
)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:TaxonItalics
(
edit
)
Module:Toolbar
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/A
(
edit
)
Module:Yesno
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
In other projects