Jump to content

Template:Retrieved/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
ce.
m.
 
(15 intermediate revisions by 8 users not shown)
Line 4: Line 4:
|limited=[[File:Lock-gray-alt-2.svg|10px|link=|Free access subject to limited trial, subscription normally required]]
|limited=[[File:Lock-gray-alt-2.svg|10px|link=|Free access subject to limited trial, subscription normally required]]
|subscription=[[File:Lock-red-alt-2.svg|10px|link=|Paid subscription required]][[Category:Pages containing links to subscription-only content|{{FULLPAGENAME}}]]
|subscription=[[File:Lock-red-alt-2.svg|10px|link=|Paid subscription required]][[Category:Pages containing links to subscription-only content|{{FULLPAGENAME}}]]
|#default={{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">access-info</span></strong>option not valid &#91;&#8288;[[Template:Retrieved/sandbox#access-info|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}}}</span>{{#if:{{{access-info|}}}|{{#if:{{{source-info|}}}|{{#if:{{{nopun|}}}|{{#ifeq:{{{nopun}}}|y||&#8288;.}}|{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,}}{{#ifeq:{{{mode}}}|cs1|.}}}}}}&#32;{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}|{{#if:{{{source-info|}}}|{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|({{{format}}}){{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}}}}}{{#if:{{{mode|}}}|{{#ifeq:{{{mode}}}|cs2|retrieved|{{#ifeq:{{{mode}}}|cs1|Retrieved|{{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">mode</span></strong>option not valid &#91;&#8288;[[Template:Retrieved/sandbox#mode|info]]&#8288;&#93;&#160;<strong>!</strong></span>|Retrieved}}}}}}|Retrieved}}&#32;{{safesubst:<noinclude/>#switch:{{{access-date|{{{accessdate}}}}}}
|#default={{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">access-info</span></strong>&#160;&#8211;&#32;option not valid &#91;&#8288;[[Template:Retrieved/sandbox#access-info|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}}}</span>{{#if:{{{access-info|}}}|{{#if:{{{source-info|}}}|{{#if:{{{nopun|}}}|{{#ifeq:{{{nopun}}}|y||&#8288;.}}|{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,}}{{#ifeq:{{{mode}}}|cs1|.}}}}}}&#32;{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}|{{#if:{{{source-info|}}}|{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|({{{format}}}){{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}}}}}{{#if:{{{mode|}}}|{{#ifeq:{{{mode}}}|cs2|retrieved|{{#ifeq:{{{mode}}}|cs1|Retrieved|{{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">mode</span></strong>&#160;&#8211;&#32;option not valid &#91;&#8288;[[Template:Retrieved/sandbox#mode|info]]&#8288;&#93;&#160;<strong>!</strong></span>|Retrieved}}}}}}|Retrieved}}&#160;{{safesubst:<noinclude/>#switch:{{{access-date|{{{accessdate}}}}}}
|ymd|iso={{safesubst:<noinclude/>#time:Y-m-d}}
|ymd|iso={{safesubst:<noinclude/>#time:Y-m-d}}
|dmy={{safesubst:<noinclude/>#time:j F Y}}
|dmy={{safesubst:<noinclude/>#time:j F Y}}
Line 11: Line 11:
|smdy={{safesubst:<noinclude/>#time:M j, Y}}
|smdy={{safesubst:<noinclude/>#time:M j, Y}}
}}{{#switch:{{{access-date|{{{accessdate}}}}}}
}}{{#switch:{{{access-date|{{{accessdate}}}}}}
|ymd|iso|dmy|sdmy|mdy|smdy={{#if:{{{df|}}}|{{#ifeq:{{{err|}}}|y|<span style="color:red">&#32;<strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">df</span></strong>superfluous use (autoinserted access date) &#91;&#8288;[[Template:Retrieved/sandbox#df|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}
|ymd|iso|dmy|sdmy|mdy|smdy={{#if:{{{df|}}}|{{#ifeq:{{{err|}}}|y|<span style="color:red">&#32;<strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">df</span></strong>&#160;&#8211;&#32;superfluous use (autoinserted access date) &#91;&#8288;[[Template:Retrieved/sandbox#df|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}
|#default={{#iferror:{{#ifexpr:{{#time:U|{{{access-date|{{{accessdate}}}}}}}} <= {{#time:U|now+14 hours}}|{{#if:{{{df|}}}|{{#switch:{{{df}}}
|#default={{#iferror:{{#ifexpr:{{#time:U|{{{access-date|{{{accessdate}}}}}}}} <= {{#time:U|now+14 hours}}|{{#if:{{{df|}}}|{{#switch:{{{df}}}
|ymd|iso={{#time:Y-m-d|{{{access-date|{{{accessdate}}}}}}}}
|ymd|iso={{#time:Y-m-d|{{{access-date|{{{accessdate}}}}}}}}
Line 18: Line 18:
|mdy={{#time:F j, Y|{{{access-date|{{{accessdate}}}}}}}}
|mdy={{#time:F j, Y|{{{access-date|{{{accessdate}}}}}}}}
|smdy={{#time:M j, Y|{{{access-date|{{{accessdate}}}}}}}}
|smdy={{#time:M j, Y|{{{access-date|{{{accessdate}}}}}}}}
|#default={{{access-date|{{{accessdate}}}}}}{{#ifeq:{{{err|}}}|y|<span style="color:red">&#32;<strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">df</span></strong>option not valid &#91;&#8288;[[Template:Retrieved/sandbox#df|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}
|#default={{{access-date|{{{accessdate}}}}}}{{#ifeq:{{{err|}}}|y|<span style="color:red">&#32;<strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">df</span></strong>&#160;&#8211;&#32;option not valid &#91;&#8288;[[Template:Retrieved/sandbox#df|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}
}}|{{{access-date|{{{accessdate}}}}}}{{#switch:{{{access-date|{{{accessdate}}}}}}
}}|{{{access-date|{{{accessdate}}}}}}{{#switch:{{{access-date|{{{accessdate}}}}}}
|{{#time:Y-m-d|{{{access-date|{{{accessdate}}}}}}}}
|{{#time:Y-m-d|{{{access-date|{{{accessdate}}}}}}}}
Line 37: Line 37:
:[[Template:Rotten Tomatoes]]
:[[Template:Rotten Tomatoes]]
:[[Template:URL]]
:[[Template:URL]]
and others; it may also complement [[H:SFN|shortened footnote]]-producing templates such as {{tl|harvnb}} and similar (see [[#Use case: short citations|below]]). The template may accompany other allowable external links when such usage is appropriate. Its utility is limited to providing online-retrieval information; although it may assist [[WP:V|verifiability]], it is not a wikitext-validation, source-discovery or citation tool. Please see {{slink||Exceptions}} for recommended usage exceptions.
and others; it may also complement [[H:SFN|shortened footnote]]-producing templates such as {{tl|harvnb}} and similar (see [[#Use case: Short citations|below]]). The template may accompany other allowable external links when such usage is appropriate. Its application may assist [[WP:V|verifiability]], however this template is not a tool for validating wikitext or discovering sources, and is not an alternative to citations of online material. Please see {{slink||Exceptions}} for recommended usage exceptions.


This template and its documentation use {{cs1}} guidelines, with variations. Per common practice, "link" refers to a source's online {{em|location}} and "source" to its online {{em|content}}. The examples use the current date; if the date is not current {{purge|purge}} the {{nobr|page.{{efn|name=xdate}}}}
This template and its documentation use {{cs1}} guidelines, with variations. Per common practice, "link" refers to a source's online {{em|location}} and "source" to its online {{em|content}}. The examples use the current date; if the date is not current {{purge|purge}} the {{nobr|page.{{efn|name=xdate}}}}
Line 45: Line 45:
|1=<code><nowiki>A [[Brad Pitt]] statement.<ref>{{IMDb name|id=0000093|name=Brad Pitt}}. {{retrieved/sandbox |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</ref></nowiki>
|1=<code><nowiki>A [[Brad Pitt]] statement.<ref>{{IMDb name|id=0000093|name=Brad Pitt}}. {{retrieved/sandbox |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</ref></nowiki>
{{br|2}}
{{br|2}}
<nowiki>===References===</nowiki>
<nowiki>===References===</nowiki>{{br}}<nowiki>
<nowiki>{{reflist}}</nowiki></code>
{{reflist}}</nowiki></code>
}}
}}


Line 75: Line 75:
Copy a blank version from the box above to use. Insert the "{{!}}" (pipe) character between each parameter. Delete unused parameters.{{br}}
Copy a blank version from the box above to use. Insert the "{{!}}" (pipe) character between each parameter. Delete unused parameters.{{br}}
The template uses [[H:CS1#Display options|Citation Style 1 presentation mode]] as the default; it may optionally use [[Template:Citation#Display options|Citation Style 2 mode]]. The template provides limited error handling options.{{br}}
The template uses [[H:CS1#Display options|Citation Style 1 presentation mode]] as the default; it may optionally use [[Template:Citation#Display options|Citation Style 2 mode]]. The template provides limited error handling options.{{br}}
See {{slink||Parameters}} for important details.{{efn|name=logic}}
See {{slink||Parameters}} for important {{nobr|details.{{efn|name=logic}}}}


===Exceptions<!--This section is linked from within this page ([[MOS:HEAD]]).-->===
===Exceptions===


Do not use this template when either the link or the source is inaccessible or unfit for any reason. The template applies only to wikitext-supporting sources (free or restricted){{efn|name=rs}} that are retrievable through working, legitimate external links. See [[Wikipedia:Link rot]].{{br}}
Do not use this template when either the link or the source is inaccessible or unfit for any reason. The template applies only to wikitext-supporting sources (free or restricted){{efn|name=rs}} that are retrievable through working, legitimate external links. See [[Wikipedia:Link rot]].{{br}}
Line 83: Line 83:
In general do not use with stable or static external links e.g. links to online archives or repositories (however, it may be used when accessing online archive [[Snapshot (computer storage)|snapshots]]). See [[Wikipedia:External links]].
In general do not use with stable or static external links e.g. links to online archives or repositories (however, it may be used when accessing online archive [[Snapshot (computer storage)|snapshots]]). See [[Wikipedia:External links]].


==Quickfill examples: basic usage with today's date autoinserted==
==Quickfill examples: basic usage with today's date autoinserted<!--This section is linked from within this page ([[MOS:HEAD]]).-->==


The examples below autoinsert today's date{{efn|name=subst}} in full-date [[WP:DATE#Formats|acceptable date formats]] via the available [[#today|"quickfill" options]]. Copy and paste the suitable example code to use. For details, see {{slink||Access date}}. Consider adding parameter {{bxtn|[[#access-info|access-info]]}} when applicable.
The examples below autoinsert today's date{{efn|name=subst}} in full-date [[WP:DATE#Formats|acceptable date formats]] via the available [[#today|"quickfill" options]]. Copy and paste the suitable example code to use. For details, see {{slink||Access date}}. Consider adding parameter {{bxtn|[[#access-info|access-info]]}} when applicable.
Line 108: Line 108:
::{{retrieved/sandbox |access-date=smdy}}
::{{retrieved/sandbox |access-date=smdy}}


==More examples: user-inserted access date, additional options==
==More examples: user-inserted access date, additional options<!--This section is linked from within this page ([[MOS:HEAD]]).-->==


The examples in this section use the [[ISO 8601|ISO date]] format ({{xt|YYYY-MM-DD}} or {{xt|Year-Month-Day}}) to {{em|enter}} access dates; by default they {{em|display}} access dates in the entered format except where stated as "autoformatted" and in the all-parameter example (via parameter {{bxtn|[[#df|df]]}}).
The examples in this section use the [[ISO 8601|ISO date]] format ({{xt|YYYY-MM-DD}} or {{xt|Year-Month-Day}}) to {{em|enter}} access dates; by default they {{em|display}} access dates in the entered format except where stated as "autoformatted" and in the all-parameter example (via parameter {{bxtn|[[#df|df]]}}).
Line 152: Line 152:
::{{retrieved/sandbox |access-info=registration |nopun=y |source-info=(revised) |format=[[JPEG]] |access-date={{#time:Y-m-d}} |df=dmy |via={{fake link|OnlinePublisherName|example only}} |note=brief link note |mode=cs2 |postscript=; |err=y}}
::{{retrieved/sandbox |access-info=registration |nopun=y |source-info=(revised) |format=[[JPEG]] |access-date={{#time:Y-m-d}} |df=dmy |via={{fake link|OnlinePublisherName|example only}} |note=brief link note |mode=cs2 |postscript=; |err=y}}


==Parameters<!--This section is linked from within this page ([[MOS:HEAD]]).-->==
==Parameters==


===General notes===
===General notes<!--This section is linked from within this page ([[MOS:HEAD]]).-->===


Dependent parameters and parameter options are described under their prerequisite parameters. Parameter options must be entered in lowercase.{{br}}
Dependent parameters and parameter options are described under their prerequisite parameters. Parameter options must be entered in lowercase.{{br}}
Line 163: Line 163:


* Parameter [[#access-date|{{bxt|access-date}}]] or its alias {{bxt|accessdate}} is required.
* Parameter [[#access-date|{{bxt|access-date}}]] or its alias {{bxt|accessdate}} is required.
* Parameter {{bxtn|[[#df|df]]}} (access date autoformat) does not work when the access date is [[#today|"quickfilled"]].
* Parameter {{bxtn|[[#df|df]]}} (access date autoformat) is ignored when the access date is [[#today|"quickfilled"]].
* Parameter {{bxtn|[[#nopun|nopun]]}} (specific punctuation instance) is dependent on parameter {{bxtn|[[#source-info|source-info]]}}.
* Parameter {{bxtn|[[#nopun|nopun]]}} (specific punctuation instance) is dependent on parameter {{bxtn|[[#source-info|source-info]]}}.


===Description===
===Description<!--This section is linked from within this page ([[MOS:HEAD]]).-->===


====Access date====
====Access date<!--This section is linked from within this page ([[MOS:HEAD]]).-->====


{{See also-text|{{slink|Help:Citation Style 1|Access date}}|{{slink|Template:Cite web|Date}}}}
{{See also-text|{{slink|Help:Citation Style 1|Access date}}|{{slink|Template:Cite web|Date}}}}


* {{bxt|{{vanchor|access-date}}}}: This parameter (or its alias {{bxt|accessdate}}) is required{{snd}} its omission or incorrect entry will result in [[#!dm|an error message]] and will suppress all other template output. For basic usage include just this parameter; [[#today|autoinsert]] today's date or [[#manually|manually]] enter a full date. Either case requires a date when the external link (a) was successfully accessed {{em|and}} (b) targeted content supporting the related wikitext.{{efn|name=rs}} Do not wikilink. When input correctly it will display as entered, after the static text "Retrieved". Except in the all-numeric {{xt|Year-Month-Day}} ({{xt|YYYY-MM-DD}}) format, days should be entered without zero-padding (i.e. {{xt|8 {{#time: F Y|-1 month}}}} instead of {{xt|08 {{#time: F Y|-1 month}}}}); zero-padded days and months are required in the all-numeric format. Use any one of Wikipedia's full-date [[WP:DATE#Formats|acceptable date formats]], but select the acceptable format (if any) established in the edited page's citations or references ([[WP:DATEUNIFY]]). The ancillary optional parameter {{bxtn|[[#df|df]]}} may be added to autoformat the display of manually entered access dates; &#91;[[#datex|examples]]&#93;
* {{bxt|{{vanchor|access-date}}}}: This parameter (or its alias {{bxt|accessdate}}) is required{{snd}} its omission or incorrect entry will result in [[#!dm|an error message]] and will suppress all other template output. For basic usage include just this parameter; [[#today|autoinsert]] today's date or [[#manually|manually]] enter a full date. Either case requires a date when the external link (a) was successfully accessed {{em|and}} (b) targeted content supporting the related wikitext.{{efn|name=rs}} Do not wikilink. Displays after the static text "Retrieved". Except in the all-numeric {{xt|Year-Month-Day}} ({{xt|YYYY-MM-DD}}) format, days should be entered without zero-padding (i.e. {{xt|8 {{#time: F Y|-1 month}}}} instead of {{xt|08 {{#time: F Y|-1 month}}}}); zero-padded days and months are required in the all-numeric format. Use any one of Wikipedia's full-date [[WP:DATE#Formats|acceptable date formats]], but please select the acceptable format (if any) established in the edited page's citations or references ([[WP:DATEUNIFY]]). The ancillary optional parameter {{bxtn|[[#df|df]]}} may be added to autoformat the display of manually entered access dates
:{{em|Autoinsert today's date:|id=today}} Enter one of the "quickfill" options{{efn|name=subst}}
:{{em|Autoinsert today's date:|id=today}} Enter one of the "quickfill" options{{efn|name=subst}} &#91;[[#Quickfill examples: basic usage with today's date autoinserted|examples]]&#93;
:{{blist|{{para|access-date|ymd|code=y}} or {{para|access-date|iso|code=y}}{{snd}} displays as the all-numeric {{xt|Year-Month-Day}} ({{xt|YYYY-MM-DD}} or [[ISO 8601|ISO date]]).
:{{blist|{{para|access-date|ymd|code=y}} or {{para|access-date|iso|code=y}}{{snd}} displays as the all-numeric {{xt|Year-Month-Day}} ({{xt|YYYY-MM-DD}} or [[ISO 8601|ISO date]]).
|{{para|access-date|dmy|code=y}}{{snd}} displays as {{xt|Day Month Year}}.
|{{para|access-date|dmy|code=y}}{{snd}} displays as {{xt|Day Month Year}}.
Line 179: Line 179:
|{{para|access-date|sdmy|code=y}}{{snd}} displays as {{xt|Day Month Year}} but with "short" (abbreviated) month name.
|{{para|access-date|sdmy|code=y}}{{snd}} displays as {{xt|Day Month Year}} but with "short" (abbreviated) month name.
|{{para|access-date|smdy|code=y}}{{snd}} displays as {{xt|Month Day, Year}} but with "short" (abbreviated) month name.}}
|{{para|access-date|smdy|code=y}}{{snd}} displays as {{xt|Month Day, Year}} but with "short" (abbreviated) month name.}}
:{{em|Manually insert a date:|id=manually}} Enter a full date &#91;[[#datex|examples]]&#93;
:See [[#Quickfill examples: basic usage with today's date, autoinserted|&sect;&nbsp;Quickfill examples]] above.
:{{blist|{{vanchor|dpart|text=Partial access dates (missing any of day, month or four-digit year) are strongly discouraged; they produce inaccurate access date display, or suppress it with [[#!dp|an error message]].}}
:{{em|Manually insert a date:|id=manually}} Keep in mind
:{{blist|{{vanchor|dpart|text=Partial access dates (missing any of day, month or four-digit year) are strongly discouraged; they will either produce inaccurate access date display or suppress it with [[#!dp|an error message]].}}
|{{vanchor|dformat|text=Access dates that do not conform to one of the [[WP:DATE#Formats|allowed full-date formats]] (also described in the [[#today|quickfill options list]]) will generate [[#!df|an error message]].}}
|{{vanchor|dformat|text=Access dates that do not conform to one of the [[WP:DATE#Formats|allowed full-date formats]] (described in the [[#today|quickfill options list]]) will generate [[#!df|an error message]].}}
|{{vanchor|dfuture|text=Tomorrow's date will display as access date without error; access dates that are {{nobr|2 or more}} days in the future will result in [[#!dd|an error message]] instead.}}&#8288;{{efn|name=tzone}}
|Some formatting errors may be avoided by using the recommended parameter {{bxtn|[[#df|df]]}}.}}
|Some formatting errors may be avoided by using the recommended parameter {{bxtn|[[#df|df]]}}.}}
:{{em|Future dates:}}
:{{blist|{{vanchor|dfuture|text=Access dates that are {{nobr|2 or more}} days in the future will result in [[#!dd|an error message]] instead. Tomorrow's date will display as access date without error.}}&#8288;{{efn|name=tzone}}}}


====Access information====
====Access information====
Line 191: Line 189:
{{See also-text|{{slink|Template:Cite web|Subscription or registration required}}}}
{{See also-text|{{slink|Template:Cite web|Subscription or registration required}}}}


* {{bxtn|{{vanchor|access-info}}}}: If the online source has access requirements or restrictions use one of the options below to add an indicative inline icon (includes [[tooltip]]). This parameter's value displays first, before any other normal template output. Ideally it should display immediately after the external link and a [[non-breaking space]]. Invalid options will silently suppress the inline icon; if error-handling parameter {{bxt|[[#err|err]]}} is used [[#!accesserr|an error message]] will be displayed. See also {{slink||General notes}}; &#91;[[#accessx|example]]&#93;
* {{bxtn|{{vanchor|access-info}}}}: If the online source has access requirements or restrictions use one of the options [[#accessopt|below]] to add an indicative inline icon (includes [[tooltip]]); see applicability detail in {{slink||General notes}} above. This parameter's value displays first, before any other normal template output. Ideally it should display immediately after the external link and a [[non-breaking space]]. Invalid options will silently suppress the inline icon/tooltip; if error-handling parameter {{bxtn|[[#err|err]]}} is used [[#!accesserr|an error message]] will be displayed; &#91;[[#accessx|example]]&#93;
:{{em|Options:|id=accessopt}}
** {{para|access-info|registration|code=y}}{{snd}} free registration is required; displays a gray lock icon.
** {{para|access-info|limited|code=y}}{{snd}} free access is limited e.g. based on number of views, or is time-limited, or is only partially free; displays the same gray lock icon as registration, but with different tooltip text.
:{{blist|{{para|access-info|registration|code=y}}{{snd}} free registration is required; displays a gray lock icon.
|{{para|access-info|limited|code=y}}{{snd}} free access is limited e.g. based on number of views, or is time-limited, or is only partially free; displays the same gray lock icon as registration, but with different tooltip text.
** {{para|access-info|subscription|code=y}}{{snd}} paid subscription is required ([[WP:PAYWALL]]); displays a red lock icon. When set, the edited page will be added to {{cl|Pages containing links to subscription-only content}}.
|{{para|access-info|subscription|code=y}}{{snd}} paid subscription is required ([[WP:PAYWALL]]); displays a red lock icon. When set, the edited page will be added to {{cl|Pages containing links to subscription-only content}}.}}


====Source information, link note====
====Source information, link note====
Line 215: Line 214:
{{See also-text|{{slink|Template:Cite web|Date|Display options}}}}
{{See also-text|{{slink|Template:Cite web|Date|Display options}}}}


* {{bxtn|{{vanchor|df}}}}: Use this parameter to autoformat the output of parameter [[#access-date|{{bxt|access-date}}]]. Works only when the access date is manually entered. Will correctly display it in a full-date [[WP:DATE#Formats|acceptable date format]] according to the options below (partial dates are not supported). When the access date is [[#today|quickfilled]] this parameter is superfluous and is silently ignored; it is also silently ignored when an invalid option is used. Both cases prevent autoformatting; if error-handling parameter {{bxt|[[#err|err]]}} is used relevant [[#!dferr|error messages]] will be displayed. Inclusion of this parameter is recommended when applicable. Please follow any acceptable display format established in the edited page’s citations and/or references ([[WP:DATEUNIFY]]); &#91;[[#dfx|example]]&#93;
* {{bxtn|{{vanchor|df}}}}: Use this parameter to autoformat the output of parameter [[#access-date|{{bxt|access-date}}]]. Works only when the access date is manually entered. Will correctly display it in a full-date [[WP:DATE#Formats|acceptable date format]] according to the options [[#dfopt|below]] (partial dates are not supported). When the access date is [[#today|quickfilled]] this parameter is silently ignored; it is also silently ignored when an invalid option is used. Both cases prevent autoformatting; if error-handling parameter {{bxtn|[[#err|err]]}} is included, relevant [[#!dferr|error messages]] will be displayed. Use of {{bxtn|df}} is recommended when applicable{{snd}} please follow any acceptable date-display format established in the edited page’s citations and/or references ([[WP:DATEUNIFY]]); &#91;[[#dfx|example]]&#93;
:The {{para|df|plain=y|code=y}} options are identical to parameter [[#access-date|{{bxt|access-date}}]] quickfill options in name and function (see [[#today|there]] for descriptions)
:{{em|Options:|id=dfopt}} {{para|df|plain=y|code=y}} options are identical to parameter [[#access-date|{{bxt|access-date}}]] "quickfill" options in name and function (see [[#today|there]] for descriptions)
:{{blist|<code>[ ymd/iso &#124; dmy &#124; mdy &#124; sdmy &#124; smdy ]</code>}}
:{{blist|<code>[ ymd/iso &#124; dmy &#124; mdy &#124; sdmy &#124; smdy ]</code>}}
:{{em|Note:|id=dfpart}} Parameter {{bxtn|df}} affects only the {{em|output}} of parameter {{bxt|access-date}}; ambiguous {{em|input}} such as partial access dates may be misinterpreted, and an unintended access date may be displayed as a result.
:{{em|Note:|id=dfpart}} Parameter {{bxtn|df}} affects the {{em|output}} of parameter {{bxt|access-date}}; ambiguous {{em|input}} in {{bxt|access-date}}{{snd}} such as a partial date{{snd}} may be misinterpreted, producing unintended results.


* {{bxtn|{{vanchor|mode}}}}: Use to change the template presentation mode, which determines autoinserted element separators, terminal punctuation and certain capitalization; the default is Citation Style 1 mode. Invalid options silently suppress {{bxtn|mode}}-related punctuation; if error-handling parameter {{bxt|[[#err|err]]}} is used, the static text "Retrieved" will also be suppressed and [[#!merr|an error message]] will be displayed. To override default terminal punctuation regardless of {{bxtn|mode}} use parameter {{bxtn|[[#postscript|postscript]]}}; &#91;[[#modex|example]]&#93;
* {{bxtn|{{vanchor|mode}}}}: Use to change the template presentation mode, which determines autoinserted element separators, terminal punctuation and certain capitalization; the default is Citation Style 1 mode. Invalid options silently suppress {{bxtn|mode}}-related punctuation; if error-handling parameter {{bxtn|[[#err|err]]}} is used, the static text "Retrieved" will also be suppressed and [[#!merr|an error message]] will be displayed. To override default terminal punctuation regardless of {{bxtn|mode}} use parameter {{bxtn|[[#postscript|postscript]]}}; &#91;[[#modex|example]]&#93;
:{{em|Options:|id=mopt}}
** {{para|mode|cs2|code=y}}{{snd}} insert to switch to Citation Style 2 mode: the separator may include white space and/or a non-wrapping {{nobr|comma ( {{bxtn|,}} )}} or {{nobr|en dash ( {{bxtn|–}} )}}, terminal punctuation is omitted, and the static text "retrieved" is all-lowercase.
** {{para|mode|cs1|code=y}}{{snd}} the default presentation mode; enter to explicitly state, or to switch back to, the Citation Style 1 mode: the separator may include white space and/or a non-wrapping {{nobr|period ( {{bxtn|.}} )}} or en dash, terminal punctuation is a non-wrapping period, and the static text "Retrieved" is capitalized.
:{{blist|{{para|mode|cs2|code=y}}{{snd}} insert to switch to Citation Style 2 mode: the separator may include white space and/or a non-wrapping {{nobr|comma ( {{bxtn|,}} )}} or {{nobr|en dash ( {{bxtn|–}} )}}, terminal punctuation is omitted, and the static text "retrieved" is all-lowercase.
|{{para|mode|cs1|code=y}}{{snd}} the default presentation mode; enter to explicitly state, or to switch back to, the Citation Style 1 mode: the separator may include white space and/or a non-wrapping {{nobr|period ( {{bxtn|.}} )}} or en dash, terminal punctuation is a non-wrapping period, and the static text "Retrieved" is capitalized.}}
:{{em|Note:}} Depending on other included parameters, {{bxtn|mode}}'s effect may display first, either as an error message or in the initial-letter case of "Retrieved".
:{{em|Note:}} Depending on other included parameters, {{bxtn|mode}}'s effect may display first, either as an error message or in the initial-letter case of "Retrieved".


Line 229: Line 229:
====Error message handling====
====Error message handling====


* {{bxtn|{{vanchor|err}}}}: Set {{para|err|y|code=y|plain=y}} (any other input is ignored) to display all error messages related to optional parameter errors. Handling of individual or singular-parameter error messages is not supported. Depending on the parameter(s) in error, using {{bxtn|err}} may cause the relevant error message(s) to appear before any other template output. See also {{slink||Errors and error messages}}; &#91;[[#!accesserr|examples]]&#93;.
* {{bxtn|{{vanchor|err}}}}: Set {{para|err|y|code=y|plain=y}} (any other input is ignored) to display all error messages produced by optional-parameter errors. Handling of individual or per-parameter errors is not supported. Depending on the parameter(s) in error, using {{bxtn|err}} may cause the relevant error message(s) to display before any other template output. See also {{slink||Errors and error messages}}; &#91;[[#!accesserr|examples]]&#93;.


==Use case: short citations==
==Use case: Short citations<!--This section is linked from within this page ([[MOS:HEAD]]).-->==


Short citations ([[WP:SFN]]) may include external links as in-source locations and be subject to the same retrieval information guidelines applying to full citations.{{efn|name=sfn}} This template may be used to complement select [[H:SFN|short citation]]-producing templates, e.g. {{tl|harvnb}}. See {{slink|Template:Harvnb|Adding a URL for the page or location}}.
Short citations ([[WP:SFN]]) may include external links as in-source locations and be subject to the same retrieval information guidelines applying to full citations.{{efn|name=sfn}} This template may be used to complement select [[H:SFN|short citation]]-producing templates, e.g. {{tl|harvnb}}. See {{slink|Template:Harvnb|Adding a URL for the page or location}}.


In the example below, {{tlf|harvnb}} output is followed by a {{xt|non-breaking space}} to provide continuity and context to the output of {{nobr|{{tlf|retrieved}}.{{efn|name=nocat}}}}
In the example below, {{tlf|harvnb}} output is followed by a {{xt|non-breaking space}} (via {{tl|nbsp}}) to provide continuity and context to the output of {{nobr|{{tlf|retrieved}}.{{efn|name=nocat}}}}


;Example&#58;
;Example&#58;
Line 241: Line 241:
|1=<nowiki /><code><nowiki>A wikitext statement.<ref>{{harvnb|AuthorLast|</nowiki>{{#time:Y}}<nowiki>|pp=[https://www.example.com 23</nowiki>{{en dash}}<nowiki>24]}}</nowiki>{{bxt|<nowiki>{{nbsp}}</nowiki>}}<nowiki>{{retrieved/sandbox |access-info=subscription |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</ref></nowiki>
|1=<nowiki /><code><nowiki>A wikitext statement.<ref>{{harvnb|AuthorLast|</nowiki>{{#time:Y}}<nowiki>|pp=[https://www.example.com 23</nowiki>{{en dash}}<nowiki>24]}}</nowiki>{{bxt|<nowiki>{{nbsp}}</nowiki>}}<nowiki>{{retrieved/sandbox |access-info=subscription |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</ref></nowiki>
{{br|2}}
{{br|2}}
<nowiki>===Notes===</nowiki>{{br}}
<nowiki>===Notes===</nowiki>{{br}}<nowiki>
<nowiki>{{reflist}}</nowiki>
{{reflist}}</nowiki>
{{br|3}}
{{br|3}}
<nowiki>===References===</nowiki>{{br}}
<nowiki>===References===</nowiki>{{br}}<nowiki>
<nowiki>{{refbegin}}</nowiki>{{br}}
{{refbegin}}</nowiki>{{br}}<nowiki>
<nowiki>* {{cite journal |author-last=AuthorLast |date=</nowiki>{{#time:F Y}}<nowiki> |title=ArticleTitle |journal=JournalName |issue=5 |pages=21</nowiki>{{en dash}}<nowiki>35 |url=https://example.com |url-access=limited |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</nowiki>
* {{cite journal |author-last=AuthorLast |date=</nowiki>{{#time:F Y}}<nowiki> |title=ArticleTitle |journal=JournalName |issue=5 |pages=21</nowiki>{{en dash}}<nowiki>35 |url=https://example.com |url-access=limited |access-date=</nowiki>{{#time:Y-m-d}}<nowiki>}}</nowiki>{{br}}<nowiki>
<nowiki>{{refend}}</nowiki></code>
{{refend}}</nowiki></code>
}}
}}


Line 262: Line 262:
}}
}}


==Errors and error messages==
==Errors and error messages<!--This section is linked from within this page ([[MOS:HEAD]]).-->==


Error messages generated by access date-related errors are always displayed, and the edited page is added to {{fake link|Category:Template Retrieved errors|Category does not exist yet}}. If parameter [[#access-date|{{bxt|access-date}}/{{bxt|accessdate}}]] is absent or mislabeled the error is fatal and will suppress all other template output.{{br}}
Error messages generated by access date-related errors are always displayed, and the edited page is added to {{fake link|Category:Template Retrieved errors|Category does not exist yet}}. If parameter [[#access-date|{{bxt|access-date}}/{{bxt|accessdate}}]] is absent, mislabeled, or empty the error is fatal and will suppress all other template output.{{br}}
Errors related to optional parameters are silent by default; parameter {{bxtn|[[#err|err]]}} may be added to display error messages for parameters {{bxtn|[[#access-info|access-info]]}}, {{bxtn|[[#df|df]]}} and {{bxtn|[[#mode|mode]]}}. Parameter {{bxtn|[[#nopun|nopun]]}} and {{bxtn|err}} errors are always silent. The remaining optional parameters have no defined error state.{{br}}
Errors related to optional parameters are silent by default; parameter {{bxtn|[[#err|err]]}} may be used to display error messages for parameters {{bxtn|[[#access-info|access-info]]}}, {{bxtn|[[#df|df]]}} and {{bxtn|[[#mode|mode]]}}. No messages are generated by parameter {{bxtn|[[#nopun|nopun]]}} and {{bxtn|err}} errors. The remaining optional parameters have no defined error state.{{br}}
Error conditions and/or error messages may suppress display of related template elements.{{br}}
Error conditions and/or error messages may suppress display of related template elements.{{br}}
There is no error handling for individual parameters; error messages display for all optional parameters, or none.
There is no error handling for individual optional parameters; error messages display for all message-enabled optional parameters, or none.


===Examples===
===Examples===


Examples involving optional parameter errors use the [[#allx|all-parameters example]] from [[#More examples: user-inserted access dates, additional options|&sect;&nbsp;More examples]] {{nobr|above.{{efn|name=nocat}}}}
Examples involving optional-parameter errors use the [[#allx|all-parameters example]] from [[#More examples: user-inserted access date, additional options|&sect;&nbsp;More examples]] {{nobr|above.{{efn|name=nocat}}}}
{{strong|Access date information is missing or not entered correctly (parameter name)|id=!dm}}
{{strong|Access date information is missing or not entered correctly (parameter name)|id=!dm}}
Line 418: Line 418:
==Footnotes==
==Footnotes==
{{notelist|refs=
{{notelist|refs=
{{efn|name=xdate|1=Examples use this page's current timestamp to format dates (at [[UTC+00:00]] {{as of|2024-10-15|lc=y}}). Tomorrow's date may temporarily display as a result, depending on the local timezone, time of day and Wikipedia system settings.}}
{{efn|name=xdate|1=Examples use this page's current timestamp to format dates (for [[en:]], at [[UTC+00:00]] {{as of|2024-10-15|lc=y}}). Tomorrow's date may temporarily display as a result, depending on the local timezone, time of day and Wikipedia system settings.}}
{{efn|name=logic|1=Rudimentary description of the template's logic may be found in {{slink|Template talk:Retrieved|Logic (sandbox)}}.}}
{{efn|name=logic|1=Rudimentary description of the template's logic may be found in {{slink|Template talk:Retrieved|Logic (sandbox)}}.}}
{{efn|name=rs|1=Retrieval information must apply to the specific wikitext ([[WP:TSI]]). The retrieved source's overall relevance to the edited page's subject, or its reliability, is beyond the template's scope.}}
{{efn|name=rs|1=Retrieval information must apply to the specific wikitext ([[WP:TSI]]). The retrieved source's overall relevance to the edited page's subject, or its reliability, is beyond the template's scope.}}

Latest revision as of 14:00, 15 November 2024

Retrieved 2024-12-28⁠.