Difference between revisions of "Template:Cite news"

From Self-sufficiency
Jump to: navigation, search
(Undid revision 252561884 by David Fuchs (talk) - broken)
(implementing new code based on citation/core (see talk page))
Line 1: Line 1:
<includeonly>{{
+
{{Citation/core
#if: {{{archiveurl|}}}{{{archivedate|}}}
+
  |Citation class=news
  | {{#if: {{#if: {{{archiveurl|}}}| {{#if: {{{archivedate|}}} |1}}}}
+
  |Surname1 = {{{last|{{{surname|{{{last1|{{{surname1|{{{author1|{{{author|{{{authors|{{{author|}}}}}}}}}}}}}}}}}}}}}}}}
    ||<div style="border:1px solid red; background-color:#ffdab9; display:table;">
+
  |Surname2 = {{{last2|{{{surname2|{{{author2|{{{coauthor|{{{coauthors|}}}}}}}}}}}}}}}
You must specify '''''archiveurl=''''' and '''''archivedate=''' when using {{tl|cite news}}. Available parameters:
+
  |Surname3 = {{{last3|{{{surname3|{{{author3|}}}}}}}}}
{{Cite news/doc/parameterlist}}
+
   |Surname4 = {{{last4|{{{surname4|{{{author4|}}}}}}}}}
</div>{{
+
  |Surname5 = {{{last5|{{{surname5|{{{author5|}}}}}}}}}
    #if: {{NAMESPACE}}||
+
  |Surname6 = {{{last6|{{{surname6|{{{author6|}}}}}}}}}
      [[Category:Articles with broken citations]]
+
  |Surname7 = {{{last7|{{{surname7|{{{author7|}}}}}}}}}
    }}
+
  |Surname8 = {{{last8|{{{surname8|{{{author8|}}}}}}}}}
}}
+
  |Surname9 = {{{last9|{{{surname9|{{{author9|}}}}}}}}}
}}{{#if: {{{title|}}}
+
  |Given1 = {{{first1|{{{given1|{{{first|{{{given|}}}}}}}}}}}}
   |{{#if: {{{author|}}}{{{last|}}}
+
   |Given2 = {{{first2|{{{given2|}}}}}}
    | {{#if: {{{authorlink|}}}
+
  |Given3 = {{{first3|{{{given3|}}}}}}
      | [[{{{authorlink}}}|{{#if: {{{last|}}}
+
  |Given4 = {{{first4|{{{given4|}}}}}}
        | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }}
+
   |Given5 = {{{first5|{{{given5|}}}}}}
        | {{{author}}}
+
  |Given6 = {{{first6|{{{given6|}}}}}}
      }}]]
+
  |Given7 = {{{first7|{{{given7|}}}}}}
      | {{#if: {{{last|}}}
+
  |Given8 = {{{first8|{{{given8|}}}}}}
        | {{{last}}}{{#if: {{{first|}}} | , {{{first}}} }}
+
  |Given9 = {{{first9|{{{given9|}}}}}}
        | {{{author}}}
+
   |Authorlink1 = {{{author-link|{{{author1-link|{{{authorlink|{{{authorlink1|}}}}}}}}}}}}
      }}
+
   |Authorlink2 = {{{author2-link|{{{authorlink2|}}}}}}
    }}
+
  |Authorlink3 = {{{author3-link|{{{authorlink3|}}}}}}
   }}{{#if: {{{author|}}}{{{last|}}}
+
  |Authorlink4 = {{{author4-link|{{{authorlink4|}}}}}}
    | {{#if: {{{coauthors|}}} | &#59;&#32;{{{coauthors}}} }}
+
  |Authorlink5 = {{{author5-link|{{{authorlink5|}}}}}}
   }}{{#if: {{{author|}}}{{{last|}}}
+
  |Authorlink6 = {{{author6-link|{{{authorlink6|}}}}}}
    | {{#if: {{{date|}}}
+
   |Authorlink7 = {{{author7-link|{{{authorlink7|}}}}}}
    | &#32;({{#ifeq:{{#time:Y-m-d|{{{date}}}}}|{{{date}}}|{{{date}}}|{{{date}}}}}) }}
+
  |Authorlink8 = {{{author8-link|{{{authorlink8|}}}}}}
   }}{{#if: {{{last|}}}{{{author|}}}
+
  |Authorlink9 = {{{author9-link|{{{authorlink9|}}}}}}
   | .&#32;}}{{#if: {{{curly|}}}|“|"
+
   |Year={{{year|{{   <!-- attempt to derive year from date, if possible -->
  }}{{#if: {{{archiveurl|}}}
+
            #if: {{{date|}}}
    | [{{{archiveurl}}} {{{title}}}]
+
            |{{
    | {{#if: {{{url|}}}  
+
                #iferror:{{#time:Y|{{{date|}}} }}
      | [{{{url}}} {{{title}}}]
+
                |{{#iferror:{{#time:Y|{{{publication-date|einval}}} }}||{{#time:Y|{{{publication-date|}}} }}}}
      | {{{title}}}
+
                |{{#time:Y|{{{date|}}} }}
    }}
+
              }}
   }}{{#if: {{{curly|}}}|”|"}}{{#if: {{{format|}}} | &#32;({{{format}}})
+
            |{{{publication-date|}}} <!-- last resort -->
    }}{{#if:{{{language|}}}  
+
          }}
   | &#32;(in {{{language}}})
+
        }}}
}}{{#if: {{{agency|}}}
+
  |Date = {{#if:{{{date|}}}|{{{date}}}|{{{day|}}} {{{month|}}} {{{year|{{{publication-date|}}}}}}}}
    | , {{{agency}}}}}{{#if: {{{work|}}}
+
   |Title={{#if:{{{journal|{{{periodical|{{{newspaper|{{{magazine|{{{work|}}}}}}}}}}}}}}}|{{{title|}}}}}
    | , ''{{{work}}}''{{#if: {{{location|}}} |&#32;({{{location}}})}}}}{{#if: {{{publisher|}}}
+
   |URL={{{archiveurl|{{{url|}}}}}}
    | , {{{publisher}}}
+
   |Series={{{agency|}}}
  }}{{#if: {{{author|}}}{{{last|}}}
+
   |Periodical = {{{journal|{{{periodical|{{{newspaper|{{{magazine|{{{work|}}}}}}}}}}}}}}}
    | | {{#if: {{{date|}}}
+
  |Volume = {{{volume|}}}
    | &#32;({{#ifeq:{{#time:Y-m-d|{{{date}}}}}|{{{date}}}|{{{date}}}|{{{date}}}}}) }}
+
  |Issue = {{{issue|{{{number|}}}}}}
   }}{{#if: {{{pages|}}}
+
   |At = {{
    | , pp.&nbsp;{{{pages}}}
+
          #if: {{{page|}}}
    |{{#if: {{{page|}}}
+
          |p.&nbsp;{{{page}}}
      | , p.&nbsp;{{{page}}}
+
          |{{
    }}
+
              #if: {{{pages|}}}
   }}{{#if: {{{id|}}}  
+
              |pp.&nbsp;{{{pages}}}
    | . {{{id}}}
+
              |{{{at|}}}
   }}{{#if: {{{accessdate|}}}
+
            }}
   | <span class=reference-accessdate>.&#32;Retrieved on {{#ifeq:{{#time:Y-m-d|{{{accessdate}}}}}|{{{accessdate}}}|{{#time:j F Y|{{{accessdate}}}}}|{{{accessdate}}}}}{{#if: {{{accessyear|}}} | , {{{accessyear}}} }}</span>
+
        }}
   }}{{#if: {{{accessmonthday|}}}
+
  |IncludedWorkTitle = {{#if:{{{journal|{{{periodical|{{{newspaper|{{{magazine|{{{work|}}}}}}}}}}}}}}}||{{{title|}}}}}
  | <span class=reference-accessdate>.&#32;Retrieved on {{{accessmonthday}}}{{#if: {{{accessyear|}}} | , {{{accessyear}}} }}</span>
+
   |IncludedWorkURL = {{{chapter-url|{{{chapterurl|{{{contribution-url|}}}}}}}}}
  }}{{#if: {{{accessdaymonth|}}}
+
  |Edition = {{{edition|}}}
  | <span class=reference-accessdate>.&#32;Retrieved on {{{accessdaymonth}}}{{#if: {{{accessyear|}}} | &#32;{{{accessyear}}} }}</span>
+
  |Place = {{{place|{{{location|}}}}}}
  }}.{{#if: {{{archivedate|}}}
+
  |PublicationPlace = {{{publication-place|{{{place|{{{location|}}}}}}}}}
   | &#32;Archived from [{{{url}}} the original] on {{#ifeq:{{#time:Y-m-d|{{{archivedate}}}}}|{{{archivedate}}}|{{#time:j F Y|{{{archivedate}}}}}|{{{archivedate}}}}}.
+
   |Publisher = {{{publisher|}}}
  }}{{ #if: {{{quote|}}}
+
   |PublicationDate = {{{publication-date|}}}
    | &nbsp;"{{{quote}}}"
+
  |language = {{{language|{{{in|}}}}}}
  }}|Template error: argument '''title''' is required.}}<!--
+
   |format = {{{format|}}}
 
+
  |ID={{{id|{{{ID|}}}}}}
This is a COinS tag (http://ocoins.info), which allows automated tools to parse the citation information:
+
   |ISBN={{{isbn|{{{ISBN|}}}}}}
   --><span class="Z3988" title="ctx_ver=Z39.88-2004<!--
+
  |ISSN={{{issn|{{{ISSN|}}}}}}
  -->&rft_val_fmt={{urlencode:info:ofi/fmt:kev:mtx:dc}}<!--                    Field descriptions: http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:dc
+
   |OCLC={{{oclc|{{{OCLC|}}}}}}
   -->&rft.type=newspaperArticle<!--                                            The nature or genre of the content of the resource.  (newspaperArticle chosen purely because it is recognized by Zotero.)
+
   |PMID={{{pmid|{{{PMID|}}}}}}
  -->&rft.subject=News<!--                                                      A topic of the content of the resource. Typically expressed as keywords, key phrases or classification codes...
+
  |PMC={{{pmc|{{{PMC|}}}}}}
  -->{{#if: {{{first|}}}     | &rft.aufirst={{urlencode:{{{first}}}}}       }}<!-- First author's given name or names or initials... may contain multiple words and punctuation, i.e. "Fred F", "Fred James"
+
   |Bibcode={{{bibcode|}}}
   -->{{#if: {{{last|}}}     | &rft.aulast={{urlencode:{{{last}}}}}         }}<!-- First author's family name. This may be more than one word ... i.e. Smith, Fred James is recorded as "aulast=smith"
+
  |DOI={{{doi|{{{DOI|}}}}}}
   -->{{#if: {{{author|}}}   | &rft.au={{urlencode:{{{author}}}}}           }}<!-- This data element contains the full name of a single author, i. e. "Smith, Fred M", "Harry S. Truman".
+
   |AccessDate={{#if:{{{accessdate|}}}|{{{accessdate}}}|{{{accessday|}}} {{{accessmonth|}}} {{{accessyear|}}}}}
   -->&rft.title={{urlencode:{{{title|}}}}}<!--                                    A name given to the resource.
+
   |laysummary = {{{laysummary|}}}
   -->{{#if: {{{url|}}}       | &rft.identifier={{urlencode:{{{url}}}}}     }}<!-- URL
+
  |quote = {{{quote|}}}
   -->{{#if: {{{format|}}}   | &rft.format={{urlencode:{{{format}}}}}       }}<!-- The physical or digital manifestation of the resource... may include the media-type or dimensions of the resource.
+
  |laydate = {{{laydate|}}}
   -->{{#if: {{{agency|}}}     | &rft.source={{urlencode:{{{agency}}}}}     }}<!-- A Reference to a wire service or other press agency from which the present resource is derived. 
+
   |Ref={{{ref|}}}
  -->{{#if: {{{work|}}}     | &rft.source={{urlencode:{{{work}}}}}         }}<!-- A Reference to a resource from which the present resource is derived.
+
  |Sep = {{{separator|{{{seperator|,}}}}}}
   -->{{#if: {{{publisher|}}} | &rft.publisher={{urlencode:{{{publisher}}}}} }}<!-- An entity responsible for making the resource available... person, an organization, or a service.
+
   |Archive = {{
   -->{{#if: {{{pages|}}}     | &rft.pages={{urlencode:{{{pages}}}}}         }}<!-- Start and end pages for parts (of a book), i.e. "124-147"
+
              #if:{{{archiveurl|}}}|Archived from {{#if:{{{url|}}}|[{{{url|}}} the original]|the original}} {{#if:{{{archivedate|}}}| on {{{archivedate}}}|. You must specify the date the archive was made using the <code>archivedate=</code> parameter.{{#if: {{NAMESPACE}}|| [[Category:Articles with broken citations]]}}}}
   -->{{#if: {{{page|}}}     | &rft.spage={{urlencode:{{{page}}}}}         }}<!-- Start page for parts (of a book), i.e. "124"
+
            }}
  -->{{#if: {{{date|}}}     | &rft.date={{urlencode:{{{date}}}}}          }}<!-- A date of an event in the lifecycle of the resource... typically the creation or availability of the resource. (ISO 8601)
+
}}<noinclude>
  -->{{#if: {{{language|}}} | &rft.language={{urlencode:{{{language}}}}}   }}<!-- A language of the intellectual content of the resource. Recommended best practice is to use RFC 3066... in conjunction with ISO639
+
  -->"><span style="display: none;">&nbsp;</span></span></includeonly><noinclude>
+
 
{{pp-template|small=yes}}
 
{{pp-template|small=yes}}
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 20:33, 6 January 2009