Difference between revisions of "Template:Citation/core/sandbox3"

From blackwiki
Jump to navigation Jump to search
imported>Wikid77
(in gated-if checks, put top-level checks for {format}, {Edition} & {Other}.)
imported>Wikid77
(on 14 gated-if structures, unnested the gateway parameters.)
 
Line 4: Line 4:
 
--    test faster techniques for checking the parameters. Due to major
 
--    test faster techniques for checking the parameters. Due to major
 
--    changes, it might not always work like {Citation/core}.
 
--    changes, it might not always work like {Citation/core}.
 +
--
 +
--    As of 13 August 2012, this ran 30% faster than {Citation/core}.
 
--
 
--
 
* core now: {{Citation/core |Title=Rarrgl | Series=Ser34 |URL=x.com}}
 
* core now: {{Citation/core |Title=Rarrgl | Series=Ser34 |URL=x.com}}
Line 259: Line 261:
 
   #if: {{{IncludedWorkTitle|}}}{{#if:{{{Periodical|}}}||{{#if:{{{TransItalic|}}}||{{{TransTitle|}}}}}}}
 
   #if: {{{IncludedWorkTitle|}}}{{#if:{{{Periodical|}}}||{{#if:{{{TransItalic|}}}||{{{TransTitle|}}}}}}}
 
   |{{
 
   |{{
     #if:{{{Surname1|{{{EditorSurname1|}}} }}}
+
     #if:{{{Surname1|}}}{{{EditorSurname1|}}}
 
     |{{{Sep|,}}} 
 
     |{{{Sep|,}}} 
 
   }}{{Citation/make link
 
   }}{{Citation/make link
Line 360: Line 362:
 
     |{{{Sep|,}}} {{{Other|}}}
 
     |{{{Sep|,}}} {{{Other|}}}
 
   }}{{
 
   }}{{
     #if: {{{Surname1|{{{EditorSurname1|{{{IncludedWorkTitle|}}} }}} }}}
+
     #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}
 
     |{{{Sep|,}}} }}{{
 
     |{{{Sep|,}}} }}{{
     #if: {{{Title|{{{TransTitle|}}} }}}
+
     #if: {{{Title|}}}{{{TransTitle|}}}
 
     |{{Citation/make link
 
     |{{Citation/make link
 
         | 1={{
 
         | 1={{
Line 401: Line 403:
 
   #if: {{{Periodical|}}}
 
   #if: {{{Periodical|}}}
 
   |{{
 
   |{{
       #if:{{{Title|{{{IncludedWorkTitle|{{{TransTitle|}}} }}} }}}
+
       #if:{{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
 
       |{{{Sep|,}}} 
 
       |{{{Sep|,}}} 
 
     }}''<nowiki />{{{Periodical}}}<nowiki />''{{
 
     }}''<nowiki />{{{Periodical}}}<nowiki />''{{
Line 429: Line 431:
 
   |{{
 
   |{{
 
       <!--============ Anything else with a title, including books ============-->
 
       <!--============ Anything else with a title, including books ============-->
       #if: {{{Title|{{{TransItalic|}}} }}}
+
       #if: {{{Title|}}}{{{TransItalic|}}}
 
       |{{
 
       |{{
         #if: {{{Surname1|{{{EditorSurname1|{{{IncludedWorkTitle|<!--
+
         #if: {{{Surname1|}}}{{{EditorSurname1|}}}{{{IncludedWorkTitle|}}}<!--
             -->{{{Periodical|}}} }}} }}} }}}
+
             -->{{{Periodical|}}}
 
         |{{{Sep|,}}}
 
         |{{{Sep|,}}}
 
       }}&#32;{{Citation/make link
 
       }}&#32;{{Citation/make link
Line 472: Line 474:
 
         |&#32;({{{Edition}}} ed.)
 
         |&#32;({{{Edition}}} ed.)
 
       }}
 
       }}
     }}<!--endif {Volume|TitleType|Series|Other|Edition}
+
     }}<!--endif {Volume/TitleType/Series/Edition/Other}
 
  -->{{
 
  -->{{
 
       #if: {{{PublicationPlace|}}}
 
       #if: {{{PublicationPlace|}}}
Line 486: Line 488:
 
}}{{
 
}}{{
 
<!--============ Date (if no author/editor) ============-->
 
<!--============ Date (if no author/editor) ============-->
   #if: {{{Surname1|{{{EditorSurname1|}}} }}}
+
   #if: {{{Surname1|}}}{{{EditorSurname1|}}}
 
   |
 
   |
 
   |{{
 
   |{{
Line 524: Line 526:
 
   }}
 
   }}
 
}}{{
 
}}{{
   #if: {{{ARXIV|{{{ASIN|{{{BIBCODE|{{{DOI|}}} }}} }}} }}}
+
   #if: {{{DOI|}}}{{{ARXIV|}}}{{{ASIN|}}}{{{BIBCODE|}}}
 
|{{
 
|{{
 
<!--============ arXiv ==============-->
 
<!--============ arXiv ==============-->
Line 542: Line 544:
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=doi |input1={{{DOI|}}}  |input2={{{DoiBroken|}}} |input3={{{template doc demo|}}}}}
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=doi |input1={{{DOI|}}}  |input2={{{DoiBroken|}}} |input3={{{template doc demo|}}}}}
 
   }}
 
   }}
}}<!--endif {ARXIV|ASIN|BIBCODE|DOI}-->{{
+
}}<!--endif {ARXIV/ASIN/BIBCODE/DOI}-->{{
 
<!--============ ISBN ===============-->
 
<!--============ ISBN ===============-->
 
   #if: {{{ISBN|}}}
 
   #if: {{{ISBN|}}}
Line 551: Line 553:
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=issn |input1={{{ISSN|}}} }}
 
   |{{{Sep|,}}}&#32;{{citation/identifier  |identifier=issn |input1={{{ISSN|}}} }}
 
}}{{
 
}}{{
   #if:{{{JSTOR|{{{JFM|{{{LCCN|{{{MR|{{{OCLC|{{{OL|{{{OSTI|<!--
+
   #if:{{{JSTOR|}}}{{{JFM|}}}{{{LCCN|}}}{{{MR|}}}{{{OCLC|}}}{{{OL|}}}<!--
     -->{{{PMC|{{{PMID|{{{RFC|{{{SSRN|{{{ZBL|{{{ID|<!--
+
     -->{{{OSTI|}}}{{{PMC|}}}{{{PMID|}}}{{{RFC|}}}{{{SSRN|}}}<!--
     -->}}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}}
+
     -->{{{ZBL|}}}{{{ID|}}}
 
|{{
 
|{{
 
<!--============ JFM ================-->
 
<!--============ JFM ================-->
Line 607: Line 609:
 
   |{{{Sep|,}}}&#32;{{{ID}}}
 
   |{{{Sep|,}}}&#32;{{{ID}}}
 
   }}
 
   }}
}}<!--endif {JSTOR|JFM|LCCN|...PMID..|SSRN|ZBL|ID}-->{{
+
}}<!--endif {JSTOR/JFM/LCCN/...PMID../SSRN/ZBL/ID}-->{{
 
<!--============  Archive data, etc ===========-->
 
<!--============  Archive data, etc ===========-->
 
#if: {{{Archive|}}}
 
#if: {{{Archive|}}}
 
|{{{Sep|,}}}&#32;{{{Archive}}}[[Category:Pages using deprecated citation archive parameters]]
 
|{{{Sep|,}}}&#32;{{{Archive}}}[[Category:Pages using deprecated citation archive parameters]]
 
|{{
 
|{{
   #if:{{{ArchiveURL|{{{ArchiveDate|}}} }}}
+
   #if:{{{ArchiveURL|}}}{{{ArchiveDate|}}}
 
   | {{{Sep|,}}}&#32;{{#ifeq: {{{DeadURL|}}} | no
 
   | {{{Sep|,}}}&#32;{{#ifeq: {{{DeadURL|}}} | no
 
     | {{#if:{{{ArchiveURL|}}}
 
     | {{#if:{{{ArchiveURL|}}}
Line 629: Line 631:
 
}}{{
 
}}{{
 
<!--============ URL and AccessDate ============-->
 
<!--============ URL and AccessDate ============-->
   #if: {{{URL|{{{IncludedWorkURL|}}} }}}{{#ifeq:{{{DeadURL|}}}|no|{{{ArchiveURL|}}}|}}
+
   #if: {{{URL|}}}{{{IncludedWorkURL|}}}{{#ifeq:{{{DeadURL|}}}|no|{{{ArchiveURL|}}}|}}
 
   |{{
 
   |{{
     #if: {{{Title|{{{IncludedWorkTitle|{{{TransTitle|}}} }}} }}}
+
     #if: {{{Title|}}}{{{IncludedWorkTitle|}}}{{{TransTitle|}}}
 
     |<span class="printonly">{{{Sep|,}}}&#32;{{
 
     |<span class="printonly">{{{Sep|,}}}&#32;{{
 
                                       #if: {{{IncludedWorkURL|}}}
 
                                       #if: {{{IncludedWorkURL|}}}
Line 717: Line 719:
 
       #if: {{{Publisher|}}} |&rft.pub={{urlencode:{{{Publisher}}}}}
 
       #if: {{{Publisher|}}} |&rft.pub={{urlencode:{{{Publisher}}}}}
 
     }}{{
 
     }}{{
     #if:{{{Volume|{{{Series|{{{Issue|{{{Edition|{{{ARXIV|<!--
+
     #if:{{{Volume|}}}{{{Series|}}}{{{Issue|}}}{{{Edition|}}}{{{ARXIV|}}}<!--
     -->{{{ASIN|{{{BIBCODE|{{{DOI|<!--
+
     -->{{{ASIN|}}}{{{BIBCODE|}}}{{{DOI|}}}
    -->}}} }}} }}} }}} }}} }}} }}} }}}
 
 
     |{{
 
     |{{
 
       #if: {{{Volume|}}} |&rft.volume={{urlencode:{{{Volume}}}}}
 
       #if: {{{Volume|}}} |&rft.volume={{urlencode:{{{Volume}}}}}
Line 737: Line 738:
 
       #if: {{{DOI|}}} |&rft_id=info:doi/{{urlencode:{{{DOI}}}}}
 
       #if: {{{DOI|}}} |&rft_id=info:doi/{{urlencode:{{{DOI}}}}}
 
     }}
 
     }}
     }}<!--endif {Volume|Series|...DOI}-->{{
+
     }}<!--endif {Volume/Series/.../DOI}-->{{
 
       #if: {{{ISBN|}}} |&rft.isbn={{urlencode:{{{ISBN}}}}}
 
       #if: {{{ISBN|}}} |&rft.isbn={{urlencode:{{{ISBN}}}}}
 
     }}{{
 
     }}{{
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
       #if: {{{ISSN|}}} |&rft.issn={{urlencode:{{{ISSN}}}}}
 
     }}{{
 
     }}{{
     #if:{{{JSTOR|{{{JFM|{{{LCCN|{{{MR|{{{OCLC|{{{OL|{{{OSTI|<!--
+
     #if:{{{JSTOR|}}}{{{JFM|}}}{{{LCCN|}}}{{{MR|}}}{{{OCLC|}}}{{{OL|}}}<!--
         -->{{{PMC|{{{PMID|{{{RFC|{{{SSRN|{{{ZBL|<!--
+
         -->{{{OSTI|}}}{{{PMC|}}}{{{PMID|}}}{{{RFC|}}}{{{SSRN|}}}{{{ZBL|}}}
        -->}}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}} }}}
 
 
     |{{
 
     |{{
 
       #if: {{{JFM|}}} |&rft.jfm={{urlencode:{{{JFM}}}}}
 
       #if: {{{JFM|}}} |&rft.jfm={{urlencode:{{{JFM}}}}}
Line 770: Line 770:
 
       #if: {{{ZBL|}}} |&rft_id=info:zbl/{{urlencode:{{{ZBL}}}}}
 
       #if: {{{ZBL|}}} |&rft_id=info:zbl/{{urlencode:{{{ZBL}}}}}
 
     }}
 
     }}
     }}<!--endif {JSTOR|JFM|LCCN|...PMID..|SSRN|ZBL|ID}-->{{
+
     }}<!--endif {JSTOR/JFM/LCCN/...PMID../SSRN/ZBL}-->{{
 
       #if: {{{URL|}}}{{{IncludedWorkURL|}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
 
       #if: {{{URL|}}}{{{IncludedWorkURL|}}} |&rft_id={{urlencode:{{{URL|{{{IncludedWorkURL|}}}}}}}}
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
     }}&rfr_id=info:sid/en.wikipedia.org:{{FULLPAGENAMEE}}"><span style="display: none;">&nbsp;</span></span><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 13:01, 13 August 2012

 

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

Usage

See also