Difference between revisions of "Template:Birdsong/sandbox"
imported>Jonesey95 (cleanup) |
imported>Jonesey95 (cleanup) |
||
| Line 1: | Line 1: | ||
| − | <includeonly><div class="noprint wikilien_alternatif" style="clear:{{{alignment|{{{align|right}}}}}}; float:{{{alignment|{{{align|right}}}}}};margin:0 0 1em 1em;width:{{{length|{{#if: {{{song1|}}} |280|175}}}}}px;border:solid #AAAAAA 1px; background:#FFFFFF;padding: | + | <includeonly><div class="noprint wikilien_alternatif" style="clear:{{{alignment|{{{align|right}}}}}}; float:{{{alignment|{{{align|right}}}}}};margin:0 0 1em 1em;width:{{{length|{{#if: {{{song1|}}} |280|175}}}}}px;border:solid #AAAAAA 1px; background:#FFFFFF;padding:0px;text-align:left;font-size:90%"> |
{| cellpadding="2" cellspacing="0" style="background-color:transparent" | {| cellpadding="2" cellspacing="0" style="background-color:transparent" | ||
|- style="vertical-align:middle;" | |- style="vertical-align:middle;" | ||
| style="line-height:{{{height|50}}}px;vertical-align:middle;text-align:center;" | | | style="line-height:{{{height|50}}}px;vertical-align:middle;text-align:center;" | | ||
[[Image:Spiza americana male 94 231051626 13e01e8125 o cropped.png|{{{height|50}}}px|alt=Dickcissel male perched on a metal pole singing, with neck stretched and beak open.|link=Portal:Birds]] | [[Image:Spiza americana male 94 231051626 13e01e8125 o cropped.png|{{{height|50}}}px|alt=Dickcissel male perched on a metal pole singing, with neck stretched and beak open.|link=Portal:Birds]] | ||
| − | | style="line-height:2;" | | + | | style="vertical-align:middle;line-height:2;" | |
<center>'''Songs & calls'''</center><hr/> | <center>'''Songs & calls'''</center><hr/> | ||
{{#if: {{{song1|}}} |{{{caption song1|Recording 1}}}: [[File:{{{song1|}}}|noicon]]|}}<!-- | {{#if: {{{song1|}}} |{{{caption song1|Recording 1}}}: [[File:{{{song1|}}}|noicon]]|}}<!-- | ||
Revision as of 23:18, 25 February 2017
| 50px | This is the template sandbox page for Template:Birdsong (diff). |
Contents
Purpose
Allows a clean link in articles on bird species to recordings of songs, calls, etc. for that species' listing at xeno-canto.org. Up to four audio recordings at the Wikimedia Commons can be added, and the default image seen can be changed to any one you specify.
Usage
Minimal form
{{Birdsong
| url = url at xeno-canto.org (required)
| species = the name of the species (required). If not using the scientific name, you may need to add a definite article ["the"; "a"] depending on the context.
}}
Scientific name example:
{{Birdsong|species = ''Sitta przewalskii''|url = http://www.xeno-canto.org/species/Sitta-przewalskii}}
produces the template seen at the right for Przevalski's nuthatch.
Common name Example, with definite article needed:
{{Birdsong|species = the Canada goose|url = http://www.xeno-canto.org/species/Branta-canadensis}}
produces the template seen at the right for the Canada goose.
Adding Wikimedia Commons audio files
{{Birdsong
| url = url at xeno-canto.org (required)
| species = the name of the species (required)
| song1 = name of the first audio file (optional)
| caption song1 = caption for the first audio file (optional)
| song2 = name of the second audio file (optional)
| caption song2 = caption for the second audio file (optional)
| song3 = name of the third audio file (optional)
| caption song3 = caption for the third audio file (optional)
| song4 = name of the fourth audio file (optional)
| caption song4 = caption for the fourth audio file (optional)
}}
Thus: {{Birdsong|url = http://www.xeno-canto.org/species/Branta-canadensis|species = Canada goose|song1 = Branta canadensis.ogg|caption song1 = Call of the Canada goose}}produces the template seen at right for the Canada goose.
Changing the image
If you want to change the default image seen in the examples, simply add:
|image=name of image; do NOT prefix "File:"
Example:
{{Birdsong|species = the Canada goose|url = http://www.xeno-canto.org/species/Branta-canadensis|image=Canada Goose -Branta canadensis.JPG}}
produces the template seen at the right.
Additional topography syntax
You can add the following additional, optional, parameters to force a moult of the template's display from its definitive plumage:
| Align = left / center (right by default) | length = Number (250 by default); do NOT use "px"; just enter a number, e.g., length=300 | height = Number (50 by default); do NOT use "px"; just enter a number, e.g., height=75
| The above documentation is transcluded from Template:Birdsong/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |