Difference between revisions of "Template:IPNI"
imported>Peter coxhead (updated to tested sandbox version – allows CS2 style citations) |
imported>Peter coxhead (updated because of changes to the IPNI website and the URLs it accepts) |
||
| Line 1: | Line 1: | ||
| − | {{{{{|safesubst:}}}#if:{{{ | + | {{{{{|safesubst:}}}#if:{{{search|{{{query|}}}}}} |
| − | |||
|{{#invoke: template wrapper | wrap | |{{#invoke: template wrapper | wrap | ||
| _template = {{#ifeq:{{{mode|CS1}}}|CS2|citation|cite web}} | | _template = {{#ifeq:{{{mode|CS1}}}|CS2|citation|cite web}} | ||
| − | | _exclude = accessdate, access-date, authority, date, id, taxon | + | | _exclude = accessdate, access-date, authority, date, id, taxon, query, search |
| − | + | | url = https://www.ipni.org/?q{{=}}{{urlencode:{{{query}}}}} | |
| − | | url = | + | | title = Search for '{{{search|{{{query}}}}}}' |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| work = [[International Plant Names Index]] (IPNI) | | work = [[International Plant Names Index]] (IPNI) | ||
| − | | publisher = | + | | publisher = Royal Botanic Gardens, Kew |
| accessdate = {{{date|{{{accessdate|{{{access-date|}}}}}}}}} | | accessdate = {{{date|{{{accessdate|{{{access-date|}}}}}}}}} | ||
| + | }} | ||
| + | |{{#if:{{{abbrev|}}} | ||
| + | |{{#invoke: template wrapper | wrap | ||
| + | | _template = {{#ifeq:{{{mode|CS1}}}|CS2|citation|cite web}} | ||
| + | | _exclude = accessdate, access-date, authority, date, id, taxon, query, search, abbrev | ||
| + | | url = https://www.ipni.org/?q{{=}}author+std%3A{{urlencode:{{{abbrev}}}}} | ||
| + | | title = Author abbreviation '{{{abbrev}}}' | ||
| + | | work = [[International Plant Names Index]] (IPNI) | ||
| + | | publisher = Royal Botanic Gardens, Kew | ||
| + | | accessdate = {{{date|{{{accessdate|{{{access-date|}}}}}}}}} | ||
| + | }} | ||
| + | |{{if both | {{{author|}}} | {{{id|}}} | ||
| + | |{{#invoke: template wrapper | wrap | ||
| + | | _template = {{#ifeq:{{{mode|CS1}}}|CS2|citation|cite web}} | ||
| + | | _exclude = accessdate, access-date, authority, date, id, taxon, author | ||
| + | | url = https://www.ipni.org/a/{{{id}}} | ||
| + | | title = {{{author}}} | ||
| + | | work = [[International Plant Names Index]] (IPNI) | ||
| + | | publisher = Royal Botanic Gardens, Kew | ||
| + | | accessdate = {{{date|{{{accessdate|{{{access-date|}}}}}}}}} | ||
| + | }} | ||
| + | |{{#invoke: template wrapper | wrap | ||
| + | | _template = {{#ifeq:{{{mode|CS1}}}|CS2|citation|cite web}} | ||
| + | | _exclude = accessdate, access-date, authority, date, id, taxon | ||
| + | | url = https://www.ipni.org/n/{{{id|{{#property:P961}}}}} | ||
| + | | title = {{#if:{{{taxon|}}} | ||
| + | |{{#invoke:eFloras|name|{{{taxon}}}}} {{{authority|}}} | ||
| + | |{{if both | {{#property:P961}} | {{#property:P225}} | ||
| + | |{{if either | ||
| + | | {{#if: {{{id|}}} | | 1 }}<!-- value of |id= is empty --> | ||
| + | | {{#ifeq: {{{id|}}} | {{#property:P961}} | 1 }}<!-- value of |id= is equal to P961 --> | ||
| + | | {{#invoke:eFloras|name|{{#property:P225}}}} {{{authority|}}} | ||
| + | }} | ||
| + | |Plant name details | ||
| + | }} | ||
| + | }} | ||
| + | | work = [[International Plant Names Index]] (IPNI) | ||
| + | | publisher = Royal Botanic Gardens, Kew | ||
| + | | accessdate = {{{date|{{{accessdate|{{{access-date|}}}}}}}}} | ||
| + | }} | ||
}}<!-- | }}<!-- | ||
-->{{#if: {{{id|<noinclude>1</noinclude>}}} | -->{{#if: {{{id|<noinclude>1</noinclude>}}} | ||
| Line 27: | Line 56: | ||
}} | }} | ||
}} | }} | ||
| − | }}<noinclude> | + | }} |
| + | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 09:39, 21 July 2019
"Script error: No such module "eFloras".". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew.
Contents
Usage
This template produces citations to the International Plant Names Index (IPNI). To produce a reference, enclose a use of the template in ref tags.
Citation for a single taxon
{{IPNI |id=77086113-1 |taxon=Rhodanthemum atlanticum subsp. gelidum |authority=(Maire) Dobignard |access-date=2019-07-21}}→
"Script error: No such module "eFloras". (Maire) Dobignard". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
- Note: as of January 2021[update], there is a problem if the authority consists of more than one letter plus a stop/period, since the latter will be omitted. A work-around is to duplicate the stop, but this needs a better longer term solution.
- {{IPNI |id=30149252-2 |taxon=Meconopsis |authority=Vig.}} → "Script error: No such module "eFloras". Vig". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. – missing .
- {{IPNI |id=30149252-2 |taxon=Meconopsis |authority=Vig..}} → "Script error: No such module "eFloras". Vig." International Plant Names Index (IPNI). Royal Botanic Gardens, Kew.
The authority may be omitted:
{{IPNI |id=77086113-1 |taxon=Rhodanthemum atlanticum subsp. gelidum |access-date=2019-07-21}}→
"Script error: No such module "eFloras".". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
If the taxon name is omitted, a dummy title will be generated for the citation, which is undesirable:
{{IPNI |id=77086113-1 |access-date=2019-07-21}}→
International Plant Names Index (IPNI). Royal Botanic Gardens, Kew https://www.ipni.org/n/77086113-1. Retrieved 2019-07-21. Missing or empty|title=(help)
Note: if the template is used on a page with a link to a Wikidata item using the same taxon name, then the ID may be omitted and will be picked up from Wikidata. This is not recommended as it depends on the setup in Wikidata, which may change; pages in the English Wikipedia are regularly linked to Wikidata items with different taxon names because of Wikidata limitations.
Citation for an author
{{IPNI |id=22405-1 |author=Carl Linnaeus |access-date=2019-07-21}}→
"Carl Linnaeus". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
Citation for an author abbreviation
{{IPNI |abbrev=L.f. |access-date=2019-07-21}}→
"Author abbreviation 'L.f.'". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
Citation for a search
The output may be a list of results. It is possible to search for all occurrences of a taxon name or of an author name.
Search for a taxon:
{{IPNI |search=Rhodanthemum |access-date=2019-07-21}}→
"Search for 'Rhodanthemum'". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
Search for an author:
{{IPNI |search=Carl Linnaeus |access-date=2019-07-21}}→
"Search for 'Carl Linnaeus'". International Plant Names Index (IPNI). Royal Botanic Gardens, Kew. Retrieved 2019-07-21.
See also
- Category:Articles using Template:IPNI with missing parameters: added if none of
|id=,|abbrev=or|search=was provided (and no Wikidata item was found).
| The above documentation is transcluded from Template:IPNI/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. |