Template:Cite web: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(+ vertical formats to copy and paste; + CSS hack to allow uniform code style, both wrapping *and* possible to format)
(+- error message: Using Template:Error for missing URL and/or title)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{
<includeonly>{{#if: {{#if: {{{url|}}} | {{#if: {{{title|}}} | no error }} }}
#if: {{#if: {{{url|}}} | {{#if: {{{titel|}}}{{{title|}}} |1}}}}
| |{{error|missing parameters '''url''' and/or '''title'''|cite web}}
  ||<font style="color: red;">Cannot use [[Template:Cite web]], due to missing parameters '''url''' and/or '''title'''</font>
}}<!--
}}{{#if: {{{language|}}}
 
  |{{#ifexist:sjabloon:{{{language}}}
-->{{#if: {{{author|}}}{{{last|}}}
    |{{ {{{language}}} }}
| {{#if: {{{authorlink|}}}{{{authorlink-wiki|}}}
    | <span style="font-size: 0.95em; font-weight: bold; color:#555; position: relative;">({{{language}}})&#32;</span>
  | {{Template:Cite web/link
  }}
    |type = {{#if: {{{authorlink-wiki|}}} | wiki | ext}}
}}{{#if: {{{archiveurl|}}}{{{archivedate|}}}
     |link = {{{authorlink|}}}{{{authorlink-wiki|}}}
  | {{#if: {{#if: {{{archiveurl|}}}| {{#if: {{{archivedate|}}} |1}}}}
     |label = {{#if: {{{last|}}} | {{{last}}}{{#if: {{{first|}}} |,&nbsp;{{{first}}}}} | {{{author}}} }}  
    ||<font style="color: red;">Cannot use [[Template:Cite web]], due to missing parameters '''archiveurl''' of '''archivedate''' (either both or neither must be used)</font>
}}
}}{{#if: {{{author|}}}{{{last|}}}
  | {{#if: {{{authorlink|}}}
     | [[{{{authorlink|}}}|{{#if: {{{last|}}}
      | {{{last|}}}{{#if: {{{first|}}} | , {{{first|}}} }}
      | {{{author|}}}
    }}]]
     | {{#if: {{{last|}}}
      | {{{last|}}}{{#if: {{{first|}}} | , {{{first|}}} }}
      | {{{author|}}}
     }}
     }}
  }}
   | {{#if: {{{last|}}}
}}{{#if: {{{author|}}}{{{last|}}}
     |{{{last}}}{{#if: {{{first|}}} |,&nbsp;{{{first}}}}}
   | {{#if: {{{coauthors|}}}| <nowiki>;</nowiki>&#32;{{{coauthors|}}} }}
    |{{{author}}}
}}{{#if: {{{author|}}}{{{last|}}}|
    {{#if: {{{date|}}}
     | &#32;({{{date|}}})
    | {{#if: {{{year|}}}
      | {{#if: {{{month|}}}
        | &#32;({{{month|}}} {{{year|}}})
        | &#32;({{{year|}}})
      }}
     }}
     }}
   |}}
   }}<!--
}}{{#if: {{{last|}}}{{{author|}}}
 
  | .&#32;}}{{#if: {{{archiveurl|}}}
-->{{#if: {{{coauthors|}}} |<nowiki>;</nowiki>&nbsp;{{{coauthors}}}}}<!--
    | {{#if: {{{archiveurl|}}} | {{#if: {{{title|}}} | [{{{archiveurl|}}} {{{title|}}}] }}}}
 
    | {{#if: {{{url|}}} | {{#if: {{{title|}}} | [{{{url}}} {{{title|}}}] }}}}
-->{{#if: {{{date|}}}
}}{{#if: {{{format|}}}
  | &nbsp;({{{date}}})
  | &#32;{{{format|}}})
  | {{#if: {{{year|}}}
}}{{#if: {{{work|}}}
    | {{#if: {{{month|}}}
  | .&#32;''{{{work|}}}''
      | &nbsp;({{{month}}} {{{year}}})
}}{{#if: {{{pages|}}}
      | &nbsp;({{{year}}})
  | &#32;{{{pages|}}}
      }}
}}{{#if: {{{publisher|}}}
    }}
  | .&#32;{{{publisher|}}}{{#if: {{{author|}}}{{{last|}}}
  }}.&nbsp;
    |
}}<!--
    | {{#if: {{{date|}}}{{{year|}}}{{{month|}}} || }}
 
  }}
-->{{#if: {{{archiveurl|}}}
}}{{#if: {{{author|}}}{{{last|}}}
| {{#if: {{{work|}}} | ''[{{{archiveurl}}} "{{{work}}}"]'' | {{#if: {{{title|}}} | [{{{archiveurl}}} {{{title}}}] }} }}
  ||{{#if: {{{date|}}}
| {{#if: {{{url|}}} | {{#if: {{{work|}}} | ''[{{{url}}} "{{{work}}}"]'' | {{#if: {{{title|}}} | [{{{url}}} {{{title}}}] }} }} }}
    | &#32;({{{date|}}})
}}<!--
    | {{#if: {{{year|}}}
 
      | {{#if: {{{month|}}}
-->{{#if: {{{language|}}}
        | &#32;({{{month|}}} {{{year|}}})
|&nbsp;(in {{{language}}})
        | &#32;({{{year|}}})
}}<!--
      }}
 
    }}
-->{{#if: {{{format|}}}
  }}
|&nbsp;({{{format}}})
}}.{{#if: {{{archivedate|}}}
}}<!--
  | &#32;Archived from [{{{url}}} the original] on {{{archivedate|}}}.
 
}}{{#if: {{{bezochtdatum|}}}{{{accessdate|}}}
-->{{#if: {{{pages|}}}
  | <small>&#32;Retrieved {{{accessdate|}}}{{#if: {{{accessyear|}}} | , {{{accessyear|}}} }}.</small>
|,&nbsp;pages {{{pages}}}
}}{{#if: {{{accessmonthday|}}}
}}.<!--
  | <small>&#32;Retrieved {{{accessmonthday|}}} {{{accessyear|}}}.</small>
 
}}{{#if: {{{quote|}}}  
-->{{#if: {{{publisher|}}}
  | &nbsp;<small>"{{{quote}}}"</small>
|&nbsp;Published by {{{publisher|}}}.
}}<!--
 
-->{{#if: {{{archiveurl|}}}
|&nbsp;Archived from [{{{url}}} the original]{{#if: {{{archivedate|}}} |&nbsp;on {{{archivedate}}}}}.
}}<!--
 
-->{{#if: {{{accessdate|}}}
|&nbsp;Retrieved {{{accessdate|}}}.
}}<!--
 
-->{{#if: {{{quote|}}}  
|&nbsp;''"{{{quote}}}"''
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{Informative template|1=
{{Informative template|1=
== Goal ==
== Goal ==
This template is used to cite online sources in wiki articles.
This template is used to cite online sources in wiki articles.
__TOC__
== Usage ==
<nowiki>{{</nowiki>'''cite web'''
{{!}} url            =
{{!}} title          =
{{!}} ''first''          =
{{!}} ''last''            =
{{!}} ''author''          =
{{!}} ''coauthors''      =
{{!}} ''authorlink''      =
{{!}} ''authorlink-wiki'' =
{{!}} ''date''            =
{{!}} ''work''            =
{{!}} ''publisher''      =
{{!}} ''pages''          =
{{!}} ''language''        =
{{!}} ''format''          =
{{!}} ''archiveurl''      =
{{!}} ''archivedate''    =
{{!}} ''accessdate''      =
{{!}} ''quote''          =
<nowiki>}}</nowiki>


== Usage ==
The only mandatory parameters are '''url''' and '''title'''.
=== Copyable examples with pre-filled accessdate ===
Citations within a page should use consistent formats. However, there is no consensus about which format is best. The following examples are for citations where one or more authors are listed in a single <tt><nowiki>|author=authors</nowiki></tt> parameter, using any format. Also shown below are two separate date formats that are commonly used:


;Day Month Year
; url: URL of the resource.
<div class="mw-code" style="background-color: #ffffff;"><nowiki>{{cite web |url= |title= |author= |date= |publisher= |accessdate=</nowiki>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}<nowiki>}}</nowiki></div>
;Month Day, Year
<div class="mw-code" style="background-color: #ffffff;"><nowiki>{{cite web |url= |title= |author= |date= |publisher= |accessdate=</nowiki>{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}<nowiki>}}</nowiki></div>


;Day Month Year, all parameters
; title: Title of the resource.
<div class="mw-code" style="background-color: #ffffff;"><nowiki>{{cite web |url= |title= |first= |last= |author= |authorlink= |coauthors= |date= |month= |year= |work= |publisher= |page= |pages= |language= |format= |id= |archiveurl= |archivedate= |accessdate=</nowiki>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}<nowiki> |quote= }}</nowiki></div>


Vertical format for use in external links section:
; firstFirst name of the single author. Not needed if '''author''' is used instead.
  <nowiki>* {{cite web
| url =
| title =
| first =
| last =
  | author =
| authorlink =
| coauthors =
| date =
| month =
| year =
| work =
| publisher =
| page =
| pages =
| language =
| format =
| id =
| archiveurl =
| archivedate =
| accessdate = </nowiki>{{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}<nowiki>
| quote =
}}</nowiki>


;Month Day, Year, all parameters
; last: Last name of the single author.  Not needed if '''author''' is used instead.
<div class="mw-code" style="background-color: #ffffff;"><nowiki>{{cite web |url= |title= |first= |last= |author= |authorlink= |coauthors= |date= |month= |year= |work= |publisher= |page= |pages= |language= |format= |id= |archiveurl= |archivedate= |accessdate=</nowiki>{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}<nowiki> |quote= }}</nowiki></div>


Vertical format for use in external links section:
; authorName of the (single) author. Alternatively, '''first''' and '''last''' can be used.
  <nowiki>* {{cite web
  | url =
| title =
| first =
| last =
| author =
| authorlink =
| coauthors =
| date =
| month =
| year =
| work =
| publisher =
| page =
| pages =
| language =
| format =
| id =
| archiveurl =
| archivedate =
| accessdate = </nowiki>{{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}<nowiki>
| quote =
}}</nowiki>


=== Paramenters ===
; authorlink: URL to the author's home page, profile, etc..
<div class="mw-code" style="background-color: #ffffff;"><nowiki>{{</nowiki>'''cite web''' <nowiki>|</nowiki>url= <nowiki>|</nowiki>title= <nowiki>|</nowiki>''first''= <nowiki>|</nowiki>''last''= <nowiki>|</nowiki>''author''= <nowiki>|</nowiki>''authorlink''= <nowiki>|</nowiki>''coauthors''= <nowiki>|</nowiki>''date''= <nowiki>|</nowiki>''month''= <nowiki>|</nowiki>''year''= <nowiki>|</nowiki>''work''= <nowiki>|</nowiki>''publisher''= <nowiki>|</nowiki>''page''= <nowiki>|</nowiki>''pages''= <nowiki>|</nowiki>''language''= <nowiki>|</nowiki>''format''= <nowiki>|</nowiki>''id''= <nowiki>|</nowiki>''archiveurl''= <nowiki>|</nowiki>''archivedate''= <nowiki>|</nowiki>''accessdate''= <nowiki>|</nowiki>''quote''= <nowiki>}}</nowiki></div>


The only mandatory parameters are '''url''' and '''title'''.  If '''archiveurl''' or '''archivedate''' are used, ''both'' of them must be used.
; authorlink-wiki:  Wiki page name to the author's user name on the wikiFor example, <code>User:BotFlightGear</code> would link to {{usr|BotFlightGear}}.


;url: URL of the resource.
; coauthors: Coauthors of the resource, links can be used.  If there are two coauthors (three authors overall), separate with semicolons (''';''').


;titleTitle of the resource.
; dateDate of resource, any format you wish.


;firstFirst name of the single author. Not needed if '''author''' is used instead.
; workName of the work. Will override '''title'''.  Will be formatted like this: "''<work>''".


;lastLast name of the single authorNot needed if '''author''' is used instead.
; publisherThe publisher of the resourceMay include a link.


;authorName of the author(s), not needed to use if the resource have only one author and '''first''' and '''last''' are used instead.  
; pagesThe numbered pages in the resource that is relevant.  Separate ranges with a dash (<code><nowiki>&ndash;</nowiki></code>) and non sequential pages with comma (<code>,</code>).


;authorlinkLink to authors home page, user page or profile.
; languageThe language of the resource if it is not English or the language of a translated page.


;coauthorsFIXME (unknown usage)
; formatFormat of the resource, such as PDF, DOC, etc..


;dateDate of resourceCould be a full date or a partial date like month and year.
; archiveurlLink to an archived copy of a web pageWill be used instead of '''url'''.


;monthThe month the resource was published.  Not needed if date is used.
; archivedateDate when original URL was archived.


;year:  The year the resource was publishedNot needed if date is used.
; accessdate:  The date the resource was found and added this page, or date it was updatedYou can use any format you wish.


;workSee '''url'''.
; quoteA quote from the resource.  Will be formatted like this: ''"<quote>"''


;publisherThe publisher of the resourceMay include a link.
== Usage examples ==
<nowiki>* {{cite web
| url            = http://wiki.flightgear.org/Main_Page
| title          = FlightGear wiki - Main Page
| author          = Hellosimon
| authorlink-wiki = User:Hellosimon
| date            = 18<sup>th</sup> April, 2006, 8:42 pm
  | publisher       = [http://wiki.flightgear.org/Main_Page FlightGear wiki]
  | archiveurl      = http://wiki.flightgear.org/index.php?title=Main_Page&oldid=1279
| archivedate    = 18<sup>th</sup> April, 2006, 8:42 pm
| accessdate      = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
| quote          = Summary: Rough Outline
}}</nowiki>


;pageThe page in the resource (online book, catalogue etc.) that is relevantUse '''pages''' if more than one page.
* {{cite web
| url            = http://wiki.flightgear.org/Main_Page
| title          = FlightGear wiki - Main Page
| author          = Hellosimon
| authorlink-wiki = User:Hellosimon
  | date            = 18<sup>th</sup> April, 2006, 8:42 pm
| publisher      = [http://wiki.flightgear.org/Main_Page FlightGear wiki]
  | archiveurl      = http://wiki.flightgear.org/index.php?title=Main_Page&oldid=1279
| archivedate    = 18<sup>th</sup> April, 2006, 8:42 pm
| accessdate      = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
| quote          = Summary: Rough Outline
}}


;pages: The numbered pages in the resource that is relevant.  Separate ranges with en dash <nowiki>&ndash;</nowiki> (&amp;ndash;) and non sequaential pages with comma (,).
  <nowiki>* {{cite web
| url        = {{forum url|t=15267}}
| title      = How the project works
| author    = Thorsten
| date      = Feb 09, 2012
| accessdate = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
}}</nowiki>


;language: The language of the resource if it is not English or the language of a translated page.
* {{cite web
  | url        = {{forum url|t=15267}}
| title      = How the project works
| author    = Thorsten
| date      = Feb 09, 2012
| accessdate = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
}}


;format: Format of the resource, for example pdf, doc or djvu.
== Copyable examples ==
Citations within a page should use consistent formats. However, there is no consensus about which format is best. These examples show horizontal and vertical formats of all parameter and often-used ones.


;id:  FIXME (unknown usage)
==== Commonly used parameters (horizontal format) ====
<nowiki>{{</nowiki>'''cite web''' {{!}}url= {{!}}title= {{!}}''author''= {{!}}''date''= {{!}}''publisher''= {{!}}''accessdate''= <nowiki>}}</nowiki>


;archiveurl: Link to an archived copy of a web page.  Both of '''archiveurl''' and '''archivedate''' or neither must be used.
==== Commonly used parameters (vertical format) ====
  <nowiki>* {{</nowiki>'''cite web'''
  {{!}} url        =
  {{!}} title      =
  {{!}} ''author''    =
  {{!}} ''date''       =
  {{!}} ''publisher'' =
  {{!}} ''accessdate'' =
  <nowiki>}}</nowiki>


;archivedate:  Date when original URL was archived.
==== All parameters (horizontal format) ====
<div class="mw-code" style="background-color: #ffffff;">
<nowiki>{{</nowiki>'''cite web''' {{!}}url= {{!}}title= {{!}}''first''= {{!}}''last''= {{!}}''author''= {{!}}''coauthors''= {{!}}''authorlink''= {{!}}''authorlink-wiki''= {{!}}''date''= {{!}}''work''= {{!}}''publisher''= {{!}}''pages''= {{!}}''language''= {{!}}''format''= {{!}}''archiveurl''= {{!}}''archivedate''= {{!}}''accessdate''= {{!}}''quote''= <nowiki>}}</nowiki>
</div>


;accessdate: The date the resource was found and added this page, or date it was updated.  For example '''date={{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}''', or '''date={{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}'''.
==== All parameters (vertical format) ====
  <nowiki>* {{</nowiki>'''cite web'''
  {{!}} url            =
  {{!}} title          =
  {{!}} ''first''          =
  {{!}} ''last''            =
  {{!}} ''author''          =
  {{!}} ''coauthors''      =
  {{!}} ''authorlink''      =
  {{!}} ''authorlink-wiki'' =
  {{!}} ''date''            =
  {{!}} ''work''            =
  {{!}} ''publisher''       =  
  {{!}} ''pages''          =
  {{!}} ''language''        =
  {{!}} ''format''         =
  {{!}} ''archiveurl''      =  
  {{!}} ''archivedate''    =
  {{!}} ''accessdate''      =
  {{!}} ''quote''           =
  <nowiki>}}</nowiki>


;quote:  A quote from the resource.
== Related templates ==
* {{tl|project infrastructure}}
* {{tl|forum url}}
* {{tl|forum link}}
* {{tl|wikipedia}}


}}
}}


[[Category:Templates]]
[[Category:Link templates]]
</noinclude>
</noinclude>

Latest revision as of 14:23, 21 August 2019


The following template description is not displayed when the template is inserted in an article.

Goal

This template is used to cite online sources in wiki articles.

Usage

{{cite web
| url             = 
| title           = 
| first           = 
| last            = 
| author          = 
| coauthors       = 
| authorlink      = 
| authorlink-wiki = 
| date            = 
| work            = 
| publisher       = 
| pages           = 
| language        = 
| format          = 
| archiveurl      = 
| archivedate     = 
| accessdate      = 
| quote           = 
}}

The only mandatory parameters are url and title.

url
URL of the resource.
title
Title of the resource.
first
First name of the single author. Not needed if author is used instead.
last
Last name of the single author. Not needed if author is used instead.
author
Name of the (single) author. Alternatively, first and last can be used.
authorlink
URL to the author's home page, profile, etc..
authorlink-wiki
Wiki page name to the author's user name on the wiki. For example, User:BotFlightGear would link to BotFlightGear.
coauthors
Coauthors of the resource, links can be used. If there are two coauthors (three authors overall), separate with semicolons (;).
date
Date of resource, any format you wish.
work
Name of the work. Will override title. Will be formatted like this: "<work>".
publisher
The publisher of the resource. May include a link.
pages
The numbered pages in the resource that is relevant. Separate ranges with a dash () and non sequential pages with comma (,).
language
The language of the resource if it is not English or the language of a translated page.
format
Format of the resource, such as PDF, DOC, etc..
archiveurl
Link to an archived copy of a web page. Will be used instead of url.
archivedate
Date when original URL was archived.
accessdate
The date the resource was found and added this page, or date it was updated. You can use any format you wish.
quote
A quote from the resource. Will be formatted like this: "<quote>"

Usage examples

* {{cite web
 | url             = http://wiki.flightgear.org/Main_Page
 | title           = FlightGear wiki - Main Page
 | author          = Hellosimon
 | authorlink-wiki = User:Hellosimon
 | date            = 18<sup>th</sup> April, 2006, 8:42 pm
 | publisher       = [http://wiki.flightgear.org/Main_Page FlightGear wiki]
 | archiveurl      = http://wiki.flightgear.org/index.php?title=Main_Page&oldid=1279
 | archivedate     = 18<sup>th</sup> April, 2006, 8:42 pm
 | accessdate      = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
 | quote           = Summary: Rough Outline
 }}
* {{cite web
 | url        = {{forum url|t=15267}}
 | title      = How the project works
 | author     = Thorsten
 | date       = Feb 09, 2012
 | accessdate = {{CURRENTMONTHNAME}} {{CURRENTDAY}}, {{CURRENTYEAR}}
 }}

Copyable examples

Citations within a page should use consistent formats. However, there is no consensus about which format is best. These examples show horizontal and vertical formats of all parameter and often-used ones.

Commonly used parameters (horizontal format)

{{cite web |url= |title= |author= |date= |publisher= |accessdate= }}

Commonly used parameters (vertical format)

* {{cite web
 | url        = 
 | title      = 
 | author     = 
 | date       = 
 | publisher  = 
 | accessdate = 
 }}

All parameters (horizontal format)

{{cite web |url= |title= |first= |last= |author= |coauthors= |authorlink= |authorlink-wiki= |date= |work= |publisher= |pages= |language= |format= |archiveurl= |archivedate= |accessdate= |quote= }}

All parameters (vertical format)

* {{cite web
 | url             = 
 | title           = 
 | first           = 
 | last            = 
 | author          = 
 | coauthors       = 
 | authorlink      = 
 | authorlink-wiki = 
 | date            = 
 | work            = 
 | publisher       = 
 | pages           = 
 | language        = 
 | format          = 
 | archiveurl      = 
 | archivedate     = 
 | accessdate      = 
 | quote           = 
 }}

Related templates