Jump to content

Template:Cite web: Difference between revisions

From IdeaWazaWiki
wikademia>Ligulem
__NOEDITSECTION__
wikademia>Wikademia
m 1 revision
 
(170 intermediate revisions by 70 users not shown)
Line 1: Line 1:
<cite style="font-style:normal;"><includeonly>{{qif
<includeonly>{{Citation/core
   |test={{boolnand
  |Citation class=web
      |1={{{url|}}}
  |Surname1 = {{#if:{{{last|}}}
      |2={{{title|}}}
                |{{{last}}}
    }}
                |{{#if:{{{last1|}}}
   |then=Error on call to [[template:cite web]]: Parameters '''url''' and '''title''' must be specified&#32;
                  |{{{last1}}}
}}</includeonly>{{qif
                  |{{{author|}}}
   |test={{{author|{{{last|}}}}}}
                }}
   |then={{qif
              }}
    |test={{{authorlink|}}}
  |Surname2 = {{#if:{{{last2|}}}|{{{last2}}}|{{{coauthors|}}}}}
    |then=[[{{{authorlink}}}|{{qif
  |Surname3 = {{{last3|}}}
      |test={{{last|}}}
  |Surname4 = {{{last4|}}}
      |then={{{last}}}{{qif
   |Surname5 = {{{last5|}}}
        |test={{{first|}}}
  |Surname6 = {{{last6|}}}
         |then=, {{{first}}}
  |Surname7 = {{{last7|}}}
      }}
  |Surname8 = {{{last8|}}}
      |else={{{author}}}
  |Surname9 = {{{last9|}}}
    }}]]
   |Given1 = {{#if:{{{first|}}}|{{{first}}}|{{{first1|}}}}}
    |else={{qif
  |Given2 = {{{first2|}}}
      |test={{{last|}}}
  |Given3 = {{{first3|}}}
      |then={{{last}}}{{qif
  |Given4 = {{{first4|}}}
        |test={{{first|}}}
  |Given5 = {{{first5|}}}
        |then=, {{{first}}}
   |Given6 = {{{first6|}}}
  |Given7 = {{{first7|}}}
  |Given8 = {{{first8|}}}
   |Given9 = {{{first9|}}}
  |Authorlink1 = {{#if:{{{authorlink|}}}|{{{authorlink}}}|{{{authorlink1|}}}}}
  |Authorlink2 = {{{authorlink2|}}}
  |Authorlink3 = {{{authorlink3|}}}
  |Authorlink4 = {{{authorlink4|}}}
  |Authorlink5 = {{{authorlink5|}}}
  |Authorlink6 = {{{authorlink6|}}}
  |Authorlink7 = {{{authorlink7|}}}
  |Authorlink8 = {{{authorlink8|}}}
  |Authorlink9 = {{{authorlink9|}}}
  |Year={{#if:{{{year|}}}|{{{year}}}    <!-- attempt to derive year from date, if possible -->
          |{{#if: {{{date|}}}
            |{{#iferror: {{#time:Y|{{{date|}}} }}
                |{{#iferror:{{#time:Y|{{{publication-date|einval}}} }}||{{#time:Y|{{{publication-date|}}} }}}}
                |{{#time:Y|{{{date|}}} }}
              }}
            |{{{publication-date|}}} <!-- last resort -->
          }}
         }}
  |Date = {{#if:{{{date|}}}|{{{date}}}|{{{day|}}} {{{month|}}} {{#if:{{{year|}}}|{{{year}}}|{{{publication-date|}}}}}}}
  |Title={{{work|}}}
  |At = {{#if:{{{page|}}}|{{{page}}}|{{{pages|}}}}}
  |IncludedWorkTitle = {{#if:{{{url|}}}|{{#if:{{{title|}}}|{{{title}}}|<span class="error">Error: no {{para|title}} specified when using {{tl|cite web}}</span>{{#if: {{NAMESPACE}}|| [[Category:Articles with broken citations]]}}}}|<span class="error">Error: no {{para|url}} specified when using {{tl|cite web}}</span>{{#if: {{NAMESPACE}}|| [[Category:Articles with broken citations]]}}}}
  |IncludedWorkURL = {{#if:{{{archiveurl|}}}|{{{archiveurl|}}}|{{{url|}}}}}
  |Place = {{{location|}}}
  |Publisher = {{{publisher|}}}
  |language = {{{language|}}}
  |format = {{{format|}}}
  |DOI={{{doi|{{{DOI|}}}}}}
  |AccessDate={{#if:{{{accessdate|}}}|{{{accessdate}}}|{{
    #if:{{{accessdaymonth|}}}|{{{accessdaymonth}}} {{{accessyear|}}}|{{
      #if:{{{accessmonthday|}}}|{{{accessmonthday}}} {{{accessyear|}}}|
      {{{accessday|}}} {{{accessmonth|}}} {{{accessyear|}}}
       }}
       }}
      |else={{{author}}}
     }}
     }}
  }}
  }}
}}{{qif
   |DateFormat={{#if:{{{dateformat|}}}|{{{dateformat}}}|none}}
   |test={{{author|{{{last|}}}}}}
   |quote = {{{quote|}}}
  |then={{qif
   |Ref={{{ref|}}}
    |test={{{coauthors|}}}
   |Sep = {{{separator|{{{seperator|.}}}}}}
    |then=, {{{coauthors}}}
   |PS={{#if:{{{quote|}}}||.}}
  }}
   |OriginalURL = {{#if:{{{archiveurl|}}}|{{{url|}}}}}
}}{{qif
   |ArchiveDate= {{{archivedate|}}}
   |test={{{year|}}}
}}{{#if:{{{accessdaymonth|}}}{{{accessmonthday|}}}|[[Category:Cite web templates using unusual accessdate parameters|{{NAMESPACE}} {{PAGENAME}}]]}}</includeonly><noinclude>
   |then=&#32;({{{year|}}})
{{pp-template}}
}}{{qif
{{documentation}}
   |test={{{author|}}}{{{year|}}}
  |then=.}}{{qif
   |test={{booland
    |1={{{url|}}}
    |2={{{title|}}}}}
   |then=&#32;[{{{url}}} {{{title}}}].
}}{{qif
  |test={{{format|}}}
  |then=&#32;({{{format|}}})
}}{{qif
   |test={{{work|}}}
  |then=&#32;''{{{work}}}''.}}{{qif
  |test={{{publisher|}}}
  |then=&#32;{{{publisher}}}.
}}{{qif
  |test={{{accessdate|}}}
  |then=&#32;URL accessed on [[{{{accessdate}}}]]{{qif
    |test={{{accessyear|}}}
    |then=, [[{{{accessyear}}}]]
  }}
}}</cite><noinclude>
This template is a simpler replacement for [[template:web reference]]. It provides lower case parameters only.
 
== Usage ==
'''<nowiki>{{cite web
| last =
| first =
| authorlink =
| coauthors =
| year =
| url =
| title =
| format =
| work =
| publisher =
| accessdate =
| accessyear =
}}</nowiki>'''
 
=== Required parameters ===
* '''url''': URL of online item.
* '''title''': Title of online item.
* '''accessdate''': Date (Month Day) when item was accessed. Should be [[ISO 8601]] YYYY-MM-DD format.
** '''accessyear''': Year when item was accessed. (Optional if ISO 8601 date used)
 
=== Optional parameters ===
* '''author''': Author
** '''last''' works with '''first''' to produce <code>last, first</code>
** '''authorlink''' works either with '''author''' or with '''last''' & '''first''' to link to the appropriate article
** '''coauthors''': allows additional authors
* '''year''': Date published.
* '''format''': Format, i.e. PDF.  HTML implied if not specified.
* '''work''': If this item is part of a larger work, name of that work.
* '''publisher''': Publisher, if any.
 
 
__NOEDITSECTION__
{{esoteric}}
 
[[Category:Citation templates|{{PAGENAME}}]]
 
</noinclude>
</noinclude>

Latest revision as of 17:36, 10 April 2009

[create] Template documentation