Difference between revisions of "Template:Citation/identifier/subst"

From blackwiki
Jump to navigation Jump to search
imported>Wikid77
(created, as basic-text version of Template:Citation/identifier, for wp:subst'ing as interwiki-usable text, no Template:Hide_in_print.)
 
imported>Wikid77
(removed test for {doi} prefix "10." of "Bad DOI"; noincluded comment "<!-- -->")
Line 6: Line 6:
 
--  This version puts only universal links, as interwiki-usable text.
 
--  This version puts only universal links, as interwiki-usable text.
 
--
 
--
--></noinclude>{{ {{{|safesubst:}}}#switch:{{{identifier|asin}}}
+
--></noinclude>{{ {{{|safesubst:}}}#switch:{{{identifier|doi}}}
 
  |arxiv= [[arXiv]]:[http://arxiv.org/abs/{{{input1|}}}  {{{input1|}}}]
 
  |arxiv= [[arXiv]]:[http://arxiv.org/abs/{{{input1|}}}  {{{input1|}}}]
  |asin= [[Amazon Standard Identification Number|ASIN]]&nbsp;[//www.amazon.<!--
+
  |asin= [[Amazon Standard Identification Number|ASIN]]&nbsp;<noinclude><!--
    -->{{ {{{|safesubst:}}}#switch: {{{input2|}}}
+
  --></noinclude>[//www.amazon.<noinclude><!--
 +
  --></noinclude>{{ {{{|safesubst:}}}#switch: {{{input2|}}}
 
           |ca=ca
 
           |ca=ca
 
           |cn=cn
 
           |cn=cn
Line 21: Line 22:
 
         }}/dp/{{{input1|}}}  {{{input1|}}}]
 
         }}/dp/{{{input1|}}}  {{{input1|}}}]
 
  |bibcode= [[Bibcode]] [http://adsabs.harvard.edu/abs/{{{input1|}}}  {{{input1|}}}]
 
  |bibcode= [[Bibcode]] [http://adsabs.harvard.edu/abs/{{{input1|}}}  {{{input1|}}}]
  |doi= {{{{{|safesubst:}}}#ifeq:{{str left|{{{input1|}}}|3}}|10.
+
  |doi= {{{{{|safesubst:}}}#if:{{{input2|}}}
        |{{{{{|safesubst:}}}#if:{{{input2|}}}
 
 
           |[[Digital object identifier|doi]]:{{{input1|}}} (inactive {{{input2|}}})
 
           |[[Digital object identifier|doi]]:{{{input1|}}} (inactive {{{input2|}}})
 
           |[[Digital object identifier|doi]]:[http://dx.doi.org/{{urlencode:{{{input1|}}}}}  {{{input1|}}}]
 
           |[[Digital object identifier|doi]]:[http://dx.doi.org/{{urlencode:{{{input1|}}}}}  {{{input1|}}}]
          }}
+
      }}
        |<!--{{citation error|Bad DOI specified}}-->
 
        }}
 
 
  |isbn= [[International Standard Book Number|ISBN]]&nbsp;[[Special:BookSources/{{{input1|}}}|{{{input1|}}}]]
 
  |isbn= [[International Standard Book Number|ISBN]]&nbsp;[[Special:BookSources/{{{input1|}}}|{{{input1|}}}]]
 
  |issn= [[International Standard Serial Number|ISSN]]&nbsp;[//www.worldcat.org/issn/{{{input1|}}}  {{{input1|}}}]
 
  |issn= [[International Standard Serial Number|ISSN]]&nbsp;[//www.worldcat.org/issn/{{{input1|}}}  {{{input1|}}}]

Revision as of 12:31, 8 September 2012

doi:[1]

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

The Template:Citation/identifier/subst is a wp:subst-compatible subtemplate of Template:Citation/identifier, used in wp:CS2 citation style to display id codes for documents (doi, bibcode, PMID, etc.) or books (ISBN, ISSN, etc.). Because the CS2 citation templates are designed to store hidden span-tags and COinS metadata, then subst'ing of the original templates does not generate basic wikitext, but rather the encoded "<span class=...>__</span>" and other internal tagged markup which is not found in basic hand-coded citations.

To use the template, put {subst:Citation/identifier/subst|identifier=xx|input1=...} wherever the template {Citation/identifier} would be used to generate a document-id link, such as: ISBN 123-45-67-890 Parameter error in {{ISBN}}: Invalid ISBN.

      Template:Only in print.

Usage

See also