Template:Speciesbox: Difference between revisions

From IndicWiki Sandbox
m 1 revision imported
No edit summary
 
Line 1: Line 1:
<noinclude><!--
<includeonly>{| class="infobox biota" style="width:22em; font-size:88%; line-height:1.35em; border: 1px solid #a2a9b1; background-color: #f8f9fa; padding: 0.2em;"
-====================================================================
|-
- Template:Speciesbox - Generate a taxobox infobox for species
! colspan="2" style="text-align:center; font-size:125%; background-color: #d1e7dd;" | {{{name|{{PAGENAME}}}}}
-====================================================================
{{#if:{{{fossil_range|}}}|
--
{{!}}-
--  This template chooses parameters to send to {Taxobox/core}, to
{{!}} colspan="2" style="text-align:center; font-size:90%;" {{!}} Temporal range: {{{fossil_range}}}
--   generate a right-side taxobox infobox.  Most parameters are just
}}
--  passed directly; some are explained with a comment.  When run as
{{#if:{{{image|}}}|
--  stand-alone, the template shows Acacia aemula as sample output.
{{!}}-
--
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{image}}}|{{#if:{{{image_upright|}}}|{{#expr: 250 * {{{image_upright}}} }}px|250px}}|alt={{{image_alt|{{{name|{{PAGENAME}}}}}}}}]]
--  The genus name of the species is found by looking in order at
}}
--  (1) the genus parameter
{{#if:{{{image_caption|}}}|
--  (2) the first word of the taxon parameter
{{!}}-
--  (3) the first word of the page name.
{{!}} colspan="2" style="text-align:center; font-size:90%;" {{!}} {{{image_caption}}}
--  The species name/specific epithet is found by looking in order at
}}
--  (1) the species parameter
{{#if:{{{image2|}}}|
--  (2) the rest of the taxon parameter after removing the first word
{{!}}-
--  (3) the rest of the page name after removing any final part in
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{image2}}}|{{#if:{{{image2_upright|}}}|{{#expr: 250 * {{{image2_upright}}} }}px|250px}}|alt={{{image2_alt|{{{name|{{PAGENAME}}}}}}}}]]
--      parentheses and then removing the first word.
}}
--
{{#if:{{{image2_caption|}}}|
--  The genus name is then the entry into the taxonomic hierarchy.
{{!}}-
--
{{!}} colspan="2" style="text-align:center; font-size:90%;" {{!}} {{{image2_caption}}}
--  A complication is that if the taxonomy template for the genus needs
}}
--   disambiguation (i.e. is "Template:Taxonomy/GENUS (DISAMBIG)") then
{{#if:{{{status|}}}|
--  the parameters will be genus=GENUS (DISAMBIG) | species=EPITHET
{{!}}-
--  Can also have genus=GENUS/QUALIFIER
! colspan="2" style="text-align:center; background-color: #e2e3e5;" {{!}} Conservation status
--
{{!}}-
-------------------------------- Invoke {Taxobox/core}
{{!}} colspan="2" style="text-align:center;" {{!}} {{{status}}}{{#if:{{{status_system|}}}|&#32;({{{status_system}}})}}{{#if:{{{status_ref|}}}|{{{status_ref}}}}}
The nowiki that follows is needed because of parser bug T18700--></noinclude><nowiki/>{{Taxobox/core<includeonly>
}}
| edit link = {{if empty|{{{edit link|}}}|{{{edit_link|}}}|edit}}</includeonly><noinclude><!--
{{#if:{{{status2|}}}|
  --
{{!}}-
  -- fossil_range: If the specified fossil range is a period supported
! colspan="2" style="text-align:center; background-color: #e2e3e5;" {{!}} Secondary Conservation status
  -- by templates {period_start} and {next_period}, then it incorporates
{{!}}-
  -- the specified range in template {geological range}, but checking
{{!}} colspan="2" style="text-align:center;" {{!}} {{{status2}}}{{#if:{{{status2_system|}}}|&#32;({{{status2_system}}})}}{{#if:{{{status2_ref|}}}|{{{status2_ref}}}}}
  -- to display properly. Otherwise, just passes parameter.
}}
  --></noinclude>
{{#if:{{{extinct|}}}|
| temporal_range = {{#if:{{{fossil_range|}}}{{{fossil range|}}}|{{#iferror:{{geological range|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}} }}|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}}|{{geological range|{{if empty|{{{temporal_range|}}}|{{{temporal range|}}}|{{{fossil_range|}}}|{{{fossil range|}}}}} }} }} | {{#if:{{{oldest fossil|}}}{{{oldest_fossil|}}}|{{geological range|{{if empty|{{{oldest fossil|}}}|{{{oldest_fossil}}}}}|{{if empty|{{{youngest fossil|}}}|{{{youngest_fossil|}}}|Recent}} }} }} }}<noinclude><!--
{{!}}-
PARENT: this is the taxon whose taxonomy template is used to find the taxonomic hierarchy; if
{{!}} colspan="2" style="text-align:center; color: #b00000;" {{!}} Extinct: {{{extinct}}}
not supplied as a parameter value, it defaults to the genus name.
}}
Template:Taxonomy/PARENT must exist. --></noinclude>
{{#if:{{{taxon|{{{genus|}}}}}}|
| parent = <includeonly>{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}</includeonly><noinclude>Acacia<!--
{{!}}-
DISPLAY PARENTS:
! colspan="2" style="text-align:center; background-color: #d1e7dd;" {{!}} Scientific classification
Number of immediate parents to display. Defaults to 1 above species, normally the genus (which is displayed as
{{#if:{{{classification_status|}}}|
a major rank, anyway).
{{!}}-
--></noinclude>
{{!}} Status:
| display_taxa = {{#expr:{{if empty|{{{display parents|}}}|{{{display_parents|}}}|1}}-1}}<noinclude><!--
{{!}} {{{classification_status}}}
AUTHORITY (etc):
}}
In the format "author, year". 
{{#if:{{{genus|}}}|
Species-authority is redundant to binomial_authority; we'll just list it the once.  (This avoids reference-duplication errors, too.
{{!}}-
| species_authority = {{if empty|{{{authority|}}}|{{{binomial authority|}}}|{{{binomial_authority|}}}}}--></noinclude>
{{!}} Genus:
| authority = {{{authority|}}}
{{!}} ''{{{genus}}}''
| parent_authority = {{if empty|{{{parent_authority|}}}|{{{parent authority|}}}}}
}}
| grandparent_authority = {{if empty|{{{grandparent_authority|}}}|{{{grandparent authority|}}}}}
{{#if:{{{parent|}}}|
| greatgrandparent_authority = {{if empty|{{{greatgrandparent_authority|}}}|{{{greatgrandparent authority|}}}}}
{{!}}-
| greatgreatgrandparent_authority = {{if empty|{{{greatgreatgrandparent_authority|}}}|{{{greatgreatgrandparent authority|}}}}}
{{!}} Parent taxon:
| greatgreatgreatgrandparent_authority = {{if empty|{{{greatgreatgreatgrandparent_authority|}}}|{{{greatgreatgreatgrandparent authority|}}}}}
{{!}} ''{{{parent}}}''
| offset = 1
}}
<noinclude><!--
{{#if:{{{species|}}}|
NAME:
{{!}}-
{{Speciesbox/name}} both determines the taxobox name and whether the page title should be italicized by
{{!}} Species:
adding the {{italic title}} template.
{{!}} ''{{{species}}}''
--></noinclude>
}}
| name = {{Speciesbox/name|{{if empty|{{{name|}}}|<noinclude>''Acacia aemula''</noinclude>}}|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}|{{PAGENAMEBASE}}|{{if empty|{{{italic_title|}}}|{{{italic title|}}}|yes}}}}<noinclude><!--
}}
-- colour:  (Note UK spelling here) There are two cases:
{{#if:{{{taxon|{{{genus|}}}}}}|
1) the parameter color_as has a value – the colour is found directly using {{Taxobox colour|color_as}}
{{!}}-
2) otherwise – Module:Autotaxobox|taxoboxColour searches up the taxonomic hierarchy to try to find a taxon that
! colspan="2" style="text-align:center; background-color: #d1e7dd;" {{!}} Binomial name
    determines the taxobox colour
{{!}}-
--></noinclude>
{{!}} colspan="2" style="text-align:center;" {{!}} ''{{#if:{{{taxon|}}}|{{{taxon}}}|{{{genus}}} {{{species|}}}}}'{{#if:{{{authority|}}}|<br />{{{authority}}}}}
| colour  = {{#if:{{{color_as|}}}{{{colour_as|}}}{{{color as|}}}{{{colour as|}}}|{{Taxobox colour|{{if empty|{{{color_as|}}}|{{{colour_as|}}}|{{{color as|}}}|{{{colour as|}}}}}}}|{{#invoke:Autotaxobox|taxoboxColour|<includeonly>{{{parent|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}}}</includeonly><noinclude>Acacia</noinclude> }} }}
}}
| status  = {{{status|}}}
{{#if:{{{type_strain|}}}|
| status_system = {{if empty|{{{status system|}}}|{{{status_system|}}}}}
{{!}}-
| status_ref = {{if empty|{{{status ref|}}}|{{{status_ref|}}}}}
{{!}} Type strain:
| status2  = {{{status2|}}}
{{!}} {{{type_strain}}}
| status2_system = {{if empty|{{{status2 system|}}}|{{{status2_system|}}}}}
}}
| status2_ref = {{if empty|{{{status2 ref|}}}|{{{status2_ref|}}}}}
{{#if:{{{subdivision|}}}|
| status3  = {{{status3|}}}
{{!}}-
| status3_system = {{if empty|{{{status3 system|}}}|{{{status3_system|}}}}}
! colspan="2" style="text-align:center; background-color: #e2e3e5;" {{!}} {{{subdivision_ranks|Subdivisions}}}{{#if:{{{subdivision_ref|}}}|{{{subdivision_ref}}}}}
| status3_ref = {{if empty|{{{status3 ref|}}}|{{{status3_ref|}}}}}
{{!}}-
| trend = {{{trend|}}}
{{!}} colspan="2" {{!}} {{{subdivision}}}
| image = {{{image|}}}
}}
| upright = {{if empty|{{{image_upright|}}}|{{{image upright|}}}}}
{{#if:{{{range_map|}}}|
| image_alt = {{if empty|{{{image alt|}}}|{{{image_alt|}}}}}
{{!}}-
| image_caption = {{if empty|{{{image caption|}}}|{{{image_caption|}}}}}
! colspan="2" style="text-align:center; background-color: #d1e7dd;" {{!}} Range map
| image2 = {{{image2|}}}
{{!}}-
| upright2 = {{if empty|{{{image2_upright|}}}|{{{image2 upright|}}}}}
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{range_map}}}|{{#if:{{{range_map_upright|}}}|{{#expr: 250 * {{{range_map_upright}}} }}px|250px}}|alt={{{range_map_alt|}}}]]
| image2_alt = {{if empty|{{{image2 alt|}}}|{{{image2_alt|}}}}}
{{#if:{{{range_map_caption|}}}|
| image2_caption = {{if empty|{{{image2 caption|}}}|{{{image2_caption|}}}}}
{{!}}-
| classification_status = {{if empty|{{{classification status|}}}|{{{classification_status|}}}}}
{{!}} colspan="2" style="text-align:center; font-size:90%;" {{!}} {{{range_map_caption}}}
| diversity = {{{diversity|}}}
}}
| diversity_ref = {{if empty|{{{diversity ref|}}}|{{{diversity_ref|}}}}}
}}
| diversity_link = {{if empty|{{{diversity link|}}}|{{{diversity_link|}}}}}
{{#if:{{{range_map2|}}}|
| extinct = {{{extinct|}}}
{{!}}-
| species = {{#if:{{{extinct|}}}|&dagger;|{{#ifeq:{{{status|}}}|EX|&dagger;|{{Taxon info|<includeonly>{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}</includeonly><noinclude>Acacia</noinclude>|dagger}}}}}}<!--
{{!}} colspan="2" style="text-align:center;" {{!}} [[File:{{{range_map2}}}|{{#if:{{{range_map2_upright|}}}|{{#expr: 250 * {{{range_map2_upright}}} }}px|250px}}|alt={{{range_map2_alt|}}}]]
-->'''{{taxon italics|abbreviated=yes|<includeonly>{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}</includeonly><noinclude>Acacia aemula</noinclude>}}'''
{{#if:{{{range_map2_caption|}}}|
| binomial = <span style="font-weight:normal;">{{#if:{{{extinct|}}}|&dagger;|{{#ifeq:{{{status|}}}|EX|&dagger;|{{Taxon info|<includeonly>{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}</includeonly><noinclude>Acacia</noinclude>|dagger}}}}}}</span><!--
{{!}}-
-->{{taxon italics|<includeonly>{{Speciesbox/trim|{{Speciesbox/getGenus|{{{taxon|}}}|{{{genus|}}}}}}} {{Speciesbox/getSpecies|{{{taxon|}}}|{{{species|}}}}}</includeonly><noinclude>Acacia aemula</noinclude>}}
{{!}} colspan="2" style="text-align:center; font-size:90%;" {{!}} {{{range_map2_caption}}}
| binomial_authority = {{if empty|{{{authority|}}}|{{{binomial authority|}}}|{{{binomial_authority|}}}}}
}}
| subdivision = {{{subdivision|}}}
}}
| subdivision_ranks = {{if empty|{{{subdivision ranks|}}}|{{{subdivision_ranks|}}}|Subspecies}}
{{#if:{{{synonyms|}}}|
| subdivision_ref = {{if empty|{{{subdivision_ref|}}}|{{{subdivision ref|}}}}}
{{!}}-
| type_strain = {{if empty|{{{type strain|}}}|{{{type_strain|}}}}}
! colspan="2" style="text-align:center; background-color: #e2e3e5;" {{!}} Synonyms{{#if:{{{synonyms_ref|}}}|{{{synonyms_ref}}}}}
| type_strain_ref = {{if empty|{{{type_strain_ref|}}}|{{{type strain ref|}}}}}
{{!}}-
| range_map = {{if empty|{{{range map|}}}|{{{range_map|}}}}}
{{!}} colspan="2" style="font-size:90%;" {{!}} {{{synonyms}}}
| range_map_upright = {{if empty|{{{range_map_upright|}}}|{{{range map upright|}}}}}
}}
| range_map_alt = {{if empty|{{{range map alt|}}}|{{{range_map_alt|}}}}}
|-
| range_map_caption = {{if empty|{{{range map caption|}}}|{{{range_map_caption|}}}}}
|}</includeonly><noinclude>
| range_map2 = {{if empty|{{{range map2|}}}|{{{range_map2|}}}}}
== Usage ==
| range_map2_upright = {{if empty|{{{range_map2_upright|}}}|{{{range map2 upright|}}}}}
 
| range_map2_alt = {{if empty|{{{range map2 alt|}}}|{{{range_map2_alt|}}}}}
Copy and paste this snippet onto an article page:
| range_map2_caption = {{if empty|{{{range map2 caption|}}}|{{{range_map2_caption|}}}}}
 
| range_map3 = {{if empty|{{{range map3|}}}|{{{range_map3|}}}}}
<pre>
| range_map3_upright = {{if empty|{{{range_map3_upright|}}}|{{{range map3 upright|}}}}}
{{Speciesbox
| range_map3_alt = {{if empty|{{{range map3 alt|}}}|{{{range_map3_alt|}}}}}
| name =
| range_map3_caption = {{if empty|{{{range map3 caption|}}}|{{{range_map3_caption|}}}}}
| fossil_range =
| range_map4 = {{#invoke:Infobox mapframe|autoWithCaption}}
| image =
| synonyms_ref = {{if empty|{{{synonyms ref|}}}|{{{synonyms_ref|}}}}}
| image_upright =
| synonyms = {{{synonyms|}}}
| image_alt =  
| audio = {{{audio|}}}
| image_caption =
| audio_caption = {{if empty|{{{audio caption|}}}|{{{audio_caption|}}}}}
| image2 =  
}}{{Speciesbox/parameterCheck|{{{taxon|}}}|{{{genus|}}}|{{{species|}}}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using speciesbox with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Speciesbox]] with unknown parameter "_VALUE_"|ignoreblank=y| mapframe_args = y | audio | audio_caption | authority | binomial authority | binomial_authority | classification status | classification_status | color as | color_as | colour as | colour_as | display parents | display_parents | diversity | diversity link | diversity ref | diversity_link | diversity_ref | edit link | edit_link | extinct | fossil range | fossil_range | genus | grandparent authority | grandparent_authority | greatgrandparent authority | greatgrandparent_authority | greatgreatgrandparent authority | greatgreatgrandparent_authority | greatgreatgreatgrandparent authority | greatgreatgreatgrandparent_authority | image | image alt | image caption | image upright | image_alt | image_caption | image_upright | image2 | image2 alt | image2 caption | image2 upright | image2_alt | image2_caption | image2_upright | italic title | italic_title | name | oldest fossil | oldest_fossil | parent | parent authority | parent_authority | range map | range map alt | range map caption | range map upright | range map2 | range map2 alt | range map2 caption | range map2 upright | range map3 | range map3 alt | range map3 caption | range map3 upright | range_map | range_map_alt | range_map_caption | range_map_upright | range_map2 | range_map2_alt | range_map2_caption | range_map2_upright | range_map3 | range_map3_alt | range_map3_caption | range_map3_upright | species | status | status ref | status system | status_ref | status_system | status2 | status2 ref | status2 system | status2_ref | status2_system | status3 | status3_ref | status3_system | subdivision | subdivision ranks | subdivision ref | subdivision_ranks | subdivision_ref | synonyms | synonyms ref | synonyms_ref | taxon | temporal range | temporal_range | trend | type strain | type strain ref | type_strain | type_strain_ref | youngest fossil | youngest_fossil }}{{#invoke:Check for conflicting parameters|check
| image2_upright =
| template = [[Template:Speciesbox]]
| image2_alt =
| cat = {{main other|Category:Pages using speciesbox with conflicting parameters}}
| image2_caption =
| edit link; edit_link
| status =
| temporal_range; temporal range; fossil_range; fossil range
| status_system =  
| oldest fossil; oldest_fossil
| status_ref =
| youngest fossil; youngest_fossil
| status2 =
| display parents; display_parents
| status2_system =
| authority; binomial authority; binomial_authority
| status2_ref =
| parent_authority; parent authority
| extinct =  
| grandparent_authority; grandparent authority
| classification_status =
| greatgrandparent_authority; greatgrandparent authority
| taxon =
| greatgreatgrandparent_authority; greatgreatgrandparent authority
| genus =
| greatgreatgreatgrandparent_authority; greatgreatgreatgrandparent authority
| parent =
| italic_title; italic title
| species =  
| color_as; colour_as; color as; colour as
| authority =
| status system; status_system
| type_strain =
| status ref; status_ref
| subdivision_ranks =
| status2 system; status2_system
| subdivision_ref =  
| status2 ref; status2_ref
| subdivision =  
| image_upright; image upright
| range_map =
| image alt; image_alt
| range_map_upright =
| image caption; image_caption
| range_map_alt =
| image2_upright; image2 upright
| range_map_caption =
| image2 alt; image2_alt
| range_map2 =  
| image2 caption; image2_caption
| range_map2_upright =
| classification status; classification_status
| range_map2_alt =
| diversity ref; diversity_ref
| range_map2_caption =
| diversity link; diversity_link
| synonyms =
| subdivision ranks; subdivision_ranks
| synonyms_ref =  
| subdivision_ref; subdivision ref
}}
| type strain; type_strain
</pre>
| type_strain_ref; type strain ref
 
| range map; range_map
[[Category:Infobox templates]]
| range_map_upright; range map upright
</noinclude>
| range map alt; range_map_alt
| range map caption; range_map_caption
| range map2; range_map2
| range_map2_upright; range map2 upright
| range map2 alt; range_map2_alt
| range map2 caption; range_map2_caption
| range map3; range_map3
| range_map3_upright; range map3 upright
| range map3 alt; range_map3_alt
| range map3 caption; range_map3_caption
| synonyms ref; synonyms_ref
}}<noinclude>
{{documentation}}</noinclude>

Latest revision as of 14:30, 21 July 2026

Usage

Copy and paste this snippet onto an article page:

{{Speciesbox
| name = 
| fossil_range = 
| image = 
| image_upright = 
| image_alt = 
| image_caption = 
| image2 = 
| image2_upright = 
| image2_alt = 
| image2_caption = 
| status = 
| status_system = 
| status_ref = 
| status2 = 
| status2_system = 
| status2_ref = 
| extinct = 
| classification_status = 
| taxon = 
| genus = 
| parent = 
| species = 
| authority = 
| type_strain = 
| subdivision_ranks = 
| subdivision_ref = 
| subdivision = 
| range_map = 
| range_map_upright = 
| range_map_alt = 
| range_map_caption = 
| range_map2 = 
| range_map2_upright = 
| range_map2_alt = 
| range_map2_caption = 
| synonyms = 
| synonyms_ref = 
}}