Difference between revisions of "Template:ISBNT"

From blackwiki
Jump to navigation Jump to search
imported>Matthiaspaul
(Fixed error message parameter. (However, it does not expand tl template at present.))
imported>Matthiaspaul
(Temporarily going through redirect in error message in order to make tl parameter work. This can be changed back to uppercase once Mediawiki's automagical recognition of ISBN has been disabled.)
Line 1: Line 1:
{{#if:{{{1|<noinclude>$</noinclude>}}}|{{Catalog lookup link|{{{id|{{{1|}}}}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|link-prefix=[Special:BookSources/|item-prefix={{!}}|item-postfix=]|list-leadout={{{leadout|}}}}}{{#if:{{trim|{{{1|}}}}}|{{#invoke:check isxn|check_isbn|{{{1|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{2|}}}}}|{{#invoke:check isxn|check_isbn|{{{2|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{3|}}}}}|{{#invoke:check isxn|check_isbn|{{{3|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{4|}}}}}|{{#invoke:check isxn|check_isbn|{{{4|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{5|}}}}}|{{#invoke:check isxn|check_isbn|{{{5|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{6|}}}}}|{{#invoke:check isxn|check_isbn|{{{6|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{7|}}}}}|{{#invoke:check isxn|check_isbn|{{{7|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{8|}}}}}|{{#invoke:check isxn|check_isbn|{{{8|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{9|}}}}}|{{#invoke:check isxn|check_isbn|{{{9|}}}|error={{error|&nbsp;Parameter error in {{tl|ISBNT}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}}}}}}}}}}}}}}}}}|{{error|Parameter error in {{tl|ISBNT}}: No [[ISBN]] given.}}}}<noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude>
+
{{#if:{{{1|<noinclude>$</noinclude>}}}|{{Catalog lookup link|{{{id|{{{1|}}}}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|link-prefix=[Special:BookSources/|item-prefix={{!}}|item-postfix=]|list-leadout={{{leadout|}}}}}{{#if:{{trim|{{{1|}}}}}|{{#invoke:check isxn|check_isbn|{{{1|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{2|}}}}}|{{#invoke:check isxn|check_isbn|{{{2|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{3|}}}}}|{{#invoke:check isxn|check_isbn|{{{3|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{4|}}}}}|{{#invoke:check isxn|check_isbn|{{{4|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{5|}}}}}|{{#invoke:check isxn|check_isbn|{{{5|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{6|}}}}}|{{#invoke:check isxn|check_isbn|{{{6|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{7|}}}}}|{{#invoke:check isxn|check_isbn|{{{7|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{8|}}}}}|{{#invoke:check isxn|check_isbn|{{{8|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}{{#if:{{trim|{{{9|}}}}}|{{#invoke:check isxn|check_isbn|{{{9|}}}|error={{error|&nbsp;Parameter error in {{tl|isbnt<!-- ISBNT -->}}: Invalid [[ISBN]].}}{{main other|[[Category:Pages with ISBN errors]]}}}}}}}}}}}}}}}}}}}}}}|{{error|Parameter error in {{tl|isbnt<!-- ISBNT -->}}: No [[ISBN]] given.}}}}<noinclude>{{documentation}}<!-- Add categories and interwiki lines to the /doc subpage, not here! --></noinclude>

Revision as of 22:31, 26 August 2017

Template documentation[view] [edit] [history] [purge]

Usage

Use this template to create a link to Special:BookSources for an International Standard Book Number without the usual "ISBN" prefix. For example, in a table with a column labelled "ISBN", it would be redundant to write "ISBN" before every International Standard Book Number in the column.

Entering ISBNs

An ISBN link is created by using the {{ISBN}} template with the International Standard Book Number. Example:

In tables (or other applications) where the letters "ISBN" would be redundant, this ISBNT template may be used instead, and the link still gets created automatically:

Error checking

This template uses Module:Check isxn to validate the ISBN. If the ISBN is not valid, this subtemplate will still generate the link, and it will add the article to Category:Pages with ISBN errors.

Since invalid ISBNs are sometimes used in publications, it is possible to disable the validity check for individual ISBNs 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:Pages with listed invalid ISBNs.

  • {{ISBNT}}   produces Parameter error in {{isbnt}}: No ISBN given.

See also