Difference between revisions of "Template:ISMN"
imported>Matthiaspaul (deliberately going through (identifier) redirect for consistency with CS1 citation templates and to improve reverse lookup functionality) |
imported>Headbomb (fix) |
||
| Line 1: | Line 1: | ||
| − | {{#if:{{{1|<noinclude>$</noinclude>}}}|{{Catalog lookup link|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|article-link={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISMN (identifier)}}|article-name={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISMN}}|list-leadout={{{leadout|}}}}}{{#if:{{trim|{{{1|}}}}}|{{#ifeq:{{yesno-no|{{{invalid1|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{1|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{2|}}}}}|{{#ifeq:{{yesno-no|{{{invalid2|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{2|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{3|}}}}}|{{#ifeq:{{yesno-no|{{{invalid3|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{3|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{4|}}}}}|{{#ifeq:{{yesno-no|{{{invalid4|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{4|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{5|}}}}}|{{#ifeq:{{yesno-no|{{{invalid5|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{5|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{6|}}}}}|{{#ifeq:{{yesno-no|{{{invalid6|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{6|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{7|}}}}}|{{#ifeq:{{yesno-no|{{{invalid7|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{7|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{8|}}}}}|{{#ifeq:{{yesno-no|{{{invalid8|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{8|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{9|}}}}}|{{#ifeq:{{yesno-no|{{{invalid9|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{9|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}}}}}}}}}}}}}}}}}}}|{{error-small|Parameter error in {{tl|ISMN}}: Missing [[ISMN]].}}}}<noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude> | + | {{#if:{{{1|<noinclude>$</noinclude>}}}|{{Catalog lookup link|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|article-link={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISMN (identifier)}}|article-name={{#ifeq:{{yesno-no|{{{plainlink|}}}}}|yes||ISMN}}|list-leadout={{{leadout|}}}}}{{#if:{{trim|{{{1|}}}}}|{{#ifeq:{{yesno-no|{{{invalid1|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{1|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{2|}}}}}|{{#ifeq:{{yesno-no|{{{invalid2|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{2|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{3|}}}}}|{{#ifeq:{{yesno-no|{{{invalid3|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{3|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{4|}}}}}|{{#ifeq:{{yesno-no|{{{invalid4|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{4|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{5|}}}}}|{{#ifeq:{{yesno-no|{{{invalid5|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{5|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{6|}}}}}|{{#ifeq:{{yesno-no|{{{invalid6|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{6|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{7|}}}}}|{{#ifeq:{{yesno-no|{{{invalid7|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{7|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{8|}}}}}|{{#ifeq:{{yesno-no|{{{invalid8|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{8|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}{{#if:{{trim|{{{9|}}}}}|{{#ifeq:{{yesno-no|{{{invalid9|}}}}}|yes|{{main other|[[Category:Articles with invalid ISMNs]]}}|{{#invoke:check isxn|check_ismn|{{{9|}}}|error={{error-small| Parameter error in {{tl|ISMN}}: Invalid [[ISMN (identifier)|ISMN]].}}{{main other|[[Category:Pages with ISMN errors]]}}}}}}}}}}}}}}}}}}}}}}}}|{{error-small|Parameter error in {{tl|ISMN}}: Missing [[ISMN (identifier)|ISMN]].}}}}<noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude> |
Latest revision as of 14:02, 3 May 2020
| This template uses Lua: |
Usage
Use this template to create a lists of International Standard Music Numbers with or without the usual "ISMN" prefix.
Entering ISMNs
An ISMN link is created by using the {{ISMN}} template with the International Standard Music Number. Example:
{{ISMN|979-0-2600-0043-8}}produces ISMN 979-0-2600-0043-8
In tables (or other applications) where the letters "ISMN" would be redundant, it can be omitted using the |plainlink= parameter.
The |leadout= parameter can be used to define a different conjunction between the last two list items.
Error checking
This template uses Module:Check isxn to validate the ISMN. If the ISMN is not valid, this subtemplate will still generate the link, and it will add the article to Category:Pages with ISMN errors.
Since invalid ISMNs are sometimes used in publications, it is possible to disable the validity check for individual ISMNs given as parameters. In order to do so, add invalid?=yes (with ? replaced by the parameter number 1 to 9) to the template. In this case, the article will be added to Category:Articles with invalid ISMNs.
See also
- {{Please check ISMN}}
- {{ISBN}}
- {{ISSN}}
- {{Catalog lookup link}}
| The above documentation is transcluded from Template:ISMN/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |