Jump to content

Template talk:Retrieved

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Source and author

[edit]

Function taken from {{Cite web}} and refined by Conrad T. Pino 09:44, 15 October 2007 (UTC)[reply]

Consistency

[edit]

This says "Retrieved on" but Template:cite web and Template:cite news just write "Retrieved". Probably easiest to change this but would be better if they were consistent. -- Horkana (talk) 00:32, 7 January 2010 (UTC)[reply]

i agree, consistency would be nice. 65.88.88.127 (talk) 18:44, 7 April 2012 (UTC)[reply]

Sandbox version (31 August 2024)

[edit]

A new version has been added with documentation. Template Data code and Lua version will follow in the near future, hopefully. 204.19.162.34 (talk) 21:59, 31 August 2024 (UTC)[reply]

Template data added. 204.19.162.34 (talk) 17:29, 2 September 2024 (UTC)[reply]
Implementation note for the current sandbox revision: the deleted parameters registration and subscription (replaced by parameter link-access in sandbox) appear in 3 instances of the production template {{Retrieved}}. 204.19.162.34 (talk) 17:51, 2 September 2024 (UTC)[reply]

Extended-confirmed-protected edit request on 3 September 2024

[edit]

Rewrite of template code and documentation currently in {{Retrieved/sandbox}}, this revision. The diff below compares the current sandbox version with the {{Retrieved}} version imported in the sandbox 5 October 2021, which is functionally the current production version:

diff

Request sync from the sandbox version. Per the section above, only 3 transclusions are affected (by replaced parameters). 65.88.88.201 (talk) 21:49, 3 September 2024 (UTC)[reply]

Note documentation changes. Comparison between production code & sandbox code (current revisions):
diff
Edit Requester from different IP. 50.75.226.250 (talk) 15:34, 4 September 2024 (UTC)[reply]
Clarifying that this revision is the final revision for this edit request. Edit requester from a different IP 65.88.88.47 (talk) 21:49, 6 September 2024 (UTC)[reply]
Code additions (revision), do not foresee more. 64.18.11.7 (talk) 13:32, 12 September 2024 (UTC)[reply]
Not done for now: Please resolve the the failing "5 November" test case. Aaron Liu (talk) 02:01, 7 November 2024 (UTC)[reply]
Thank you for looking into this. The test case you referred to is an error case (the date is missing the year component, an error). The test case below it adds a parameter (|df=dmy) that correctly displays the date in 'day month year' format, using default parser function behavior. 98.7.84.118 (talk) 13:47, 8 November 2024 (UTC)[reply]

Logic (sandbox)

[edit]

The tracking category Category:Template Retrieved errors must be created to trap template errors (commented out in code, and fake-linked in the doc and here). 65.88.88.57 (talk) 18:17, 21 March 2025 (UTC)[reply]

Current revision & workflow

[edit]
- revision-id update: doc edits. 65.88.88.69 (talk) 21:39, 22 April 2025 (UTC)[reply]


  1. If parameter access-date/accessdate is missing, mistyped or has no value, display a notification, categorize the page and exit
  2. Else (access-date/accessdate exists and not empty), wikisubstitute and check for validity; display any notifications and categorize the page; continue
  3. Optionally check for unrecognized parameters and optional-parameter issues, and display any notifications; continue
  4. If there are access restrictions apply relevant option (paywall requirement categorizes page); continue
  5. Display preset presentation mode or apply mode option; applies globally; continue
  6. If parameters access-info and source-info are present, optionally use only whitespace as their separator; continue
  7. If optional parameter source-format/format is preceded by another parameter, display only whitespace as source-format/format leading separator; continue
  8. Diplay static text "Retrieved " per the effective presentation mode; continue
  9. If access date is autoinserted (as today's date), wikisubstitute and display; continue
  10. Else (access date not autoinserted) display (optionally autoformatted) access date; continue
  11. Display optional via parameter; continue
  12. Display optional link-note/note parameter using only whitespace as its leading separator; continue
  13. Display optional terminal punctuation (default is preset by presentation mode); continue
  14. End else (access-date/accessdate); exit

Older revisions

[edit]
- rename of |prepend= to |source-info=. 172.56.166.83 (talk) 18:40, 9 October 2024 (UTC)[reply]
- revision-id update. 71.247.146.98 (talk) 13:06, 15 October 2024 (UTC)[reply]
  • Revision 2. Reflects changes to try current-date-substitution in a simple manner. Change in branch logic (replaced subbranch with branch)
- revision-id update. 50.74.109.2 (talk) 12:40, 23 October 2024 (UTC)[reply]
  • Revision 4. Param aliases (x4), param rename (x2); +error traps & notifications, refactor workflow, sync doc, copy from {{lifespan/doc}}.
- revision-id update: minor doc edits.
- revision-id update: minor doc edits.
- revision-id update: reflects all doc edits. 204.19.162.3 (talk) 17:23, 23 March 2025 (UTC)[reply]
  • Revision 5a. Move unrecognized param check to end of optional error checking; doc ce.
- revision-id update (minor doc edits). 98.7.84.118 (talk) 15:10, 24 March 2025 (UTC)[reply]
  • Revision 5b. Minor edits: hidden comment addition; typo impacting error messaging. Doc: clarify param {{{msg}}} error condition; ce.
- revision-id update: doc edits. 71.247.146.98 (talk) 13:45, 17 April 2025 (UTC)[reply]

Extended-confirmed-protected edit request on 21 November 2024

[edit]

This is a re-submission of the edit request to sync the template to the sandbox, which was described here: "Extended-confirmed-protected edit request on 3 September 2024". The resubmit is due to numerous edits in both the code and the documentation. The previous request was marked as "answered - not done" I believe because of mistaking an intentional error case as a genuine template case in the template's testpage.

Please note that the documentation subpage should also be synced from the sandbox. Also, the new template code requires creation of the maintenance category "Category:Template Retrieved errors", which should be concurrently created in order to trap fatal template errors.

An effort will be undertaken to make sure existing instances can handle the new code properly following sync. Thank you. 65.88.88.237 (talk) 22:52, 21 November 2024 (UTC)[reply]

 Question: Why didn't you reopen the other request instead of creating a new one? Wikieditor662 (talk) 07:25, 11 January 2025 (UTC)[reply]
I thought a new one was more appropriate because the underlying sandbox code had changed, and the requested sync should involve the latest sandbox revision. 65.88.88.236 (talk) 21:48, 14 January 2025 (UTC)[reply]
 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. thetechie@enwiki (she/they | talk) 04:05, 23 January 2025 (UTC)[reply]
You're not very specific about proposed changes, even on the provided link as far as I can see. thetechie@enwiki (she/they | talk) 04:06, 23 January 2025 (UTC)[reply]
{{retrieved}}:
  • <!-- Begin {{Retrieved}} --><includeonly><span class="reference-accessdate">{{#if:{{{access-date|{{{accessdate|}}}}}} :::|{{{prepend|}}}Retrieved{{#if:{{{access-date|{{{accessdate|}}}}}}| {{{access-date|{{{accessdate}}}}}}}}{{#if:{{{via|}}}| – via {{{via}}}}}<span style="font-size: 90%; color: #555">{{#ifeq:{{{subscription|}}}|y| (subscription required)|{{#ifeq:{{{registration|}}}|y| (registration required)}}}}{{#if:{{{note|}}}| ({{{note}}})}}</span>{{{append|.}}}}}{{#if:{{{accessdaymonth|}}}{{{accessmonthday|}}}|[[Category:Cite web templates using unusual accessdate parameters|{{FULLPAGENAME}}]]}}{{#ifeq:{{{subscription|}}}|y|[[Category:Pages containing links to subscription-only content|{{FULLPAGENAME}}]]}}</span></includeonly><!-- End {{Retrieved}} --><noinclude>
{{retrieved/sandbox}}:
  • <!-- Begin {{retrieved/sandbox}} --><includeonly><span class="reference-accessdate">{{safesubst:<noinclude/>#if:{{{access-date|{{{accessdate|}}}}}} :::|<span style="position:relative; top: -2px;">{{#if:{{{access-info|}}}|{{#switch:{{{access-info}}} :::|registration=[[File:Lock-gray-alt-2.svg|10px|link=|Free registration 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}}]] :::|#default={{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong> {{tlx|retrieved}}: Parameter <strong><span style="color:green">access-info</span></strong> – option not valid [⁠[[Template:Retrieved/sandbox#access-info|info]]⁠] <strong>!</strong></span>}}}}}}</span>{{#if:{{{access-info|}}}|{{#if:{{{source-info|}}}|{{#if:{{{nopun|}}}|{{#ifeq:{{{nopun}}}|y||⁠.}}|{{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2|,}}{{#ifeq:{{{mode}}}|cs1|.}}}}}} {{{source-info}}}{{#if:{{{format|}}}| ({{{format}}})}}{{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|⁠.}} |{{#if:{{{format|}}}| ({{{format}}})}}{{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|⁠.}} }}|{{#if:{{{source-info|}}}|{{{source-info}}}{{#if:{{{format|}}}| ({{{format}}})}}{{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|⁠.}} |{{#if:{{{format|}}}|({{{format}}}){{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|⁠.}} }}}}}}{{#if:{{{mode|}}}|{{#ifeq:{{{mode}}}|cs2|retrieved|{{#ifeq:{{{mode}}}|cs1|Retrieved|{{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong> {{tlx|retrieved}}: Parameter <strong><span style="color:green">mode</span></strong> – option not valid [⁠[[Template:Retrieved/sandbox#mode|info]]⁠] <strong>!</strong></span>|Retrieved}}}}}}|Retrieved}} {{safesubst:<noinclude/>#switch:{{{access-date|{{{accessdate}}}}}} :::|ymd|iso={{safesubst:<noinclude/>#time:Y-m-d}} :::|dmy={{safesubst:<noinclude/>#time:j F Y}} :::|sdmy={{safesubst:<noinclude/>#time:j M Y}} :::|mdy={{safesubst:<noinclude/>#time:F j, Y}} :::|smdy={{safesubst:<noinclude/>#time:M j, Y}} :::}}{{#switch:{{{access-date|{{{accessdate}}}}}} :::|ymd|iso|dmy|sdmy|mdy|smdy={{#if:{{{df|}}}|{{#ifeq:{{{err|}}}|y|<span style="color:red"> <strong>!</strong> {{tlx|retrieved}}: Parameter <strong><span style="color:green">df</span></strong> – superfluous use (autoinserted access date) [⁠[[Template:Retrieved/sandbox#df|info]]⁠] <strong>!</strong></span>}}}} :::|#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}}}}}}}} :::|dmy={{#time:j F Y|{{{access-date|{{{accessdate}}}}}}}} :::|sdmy={{#time:j M Y|{{{access-date|{{{accessdate}}}}}}}} :::|mdy={{#time:F j, Y|{{{access-date|{{{accessdate}}}}}}}} :::|smdy={{#time:M j, Y|{{{access-date|{{{accessdate}}}}}}}} :::|#default={{{access-date|{{{accessdate}}}}}}{{#ifeq:{{{err|}}}|y|<span style="color:red"> <strong>!</strong> {{tlx|retrieved}}: Parameter <strong><span style="color:green">df</span></strong> – option not valid [⁠[[Template:Retrieved/sandbox#df|info]]⁠] <strong>!</strong></span>}} :::}}|{{{access-date|{{{accessdate}}}}}}{{#switch:{{{access-date|{{{accessdate}}}}}} :::|{{#time:Y-m-d|{{{access-date|{{{accessdate}}}}}}}} :::|{{#time:j F Y|{{{access-date|{{{accessdate}}}}}}}} :::|{{#time:j M Y|{{{access-date|{{{accessdate}}}}}}}} :::|{{#time:F j, Y|{{{access-date|{{{access-date}}}}}}}} :::|{{#time:M j, Y|{{{access-date|{{{accessdate}}}}}}}}= :::|#default=<span style="color:red"> <strong>!</strong> {{tlx|retrieved}}: Access date format is invalid [⁠[[Template:Retrieved/sandbox#dformat|info]]⁠] <strong>!</strong></span><!--[[Category:Template Retrieved errors|{{FULLPAGENAME}}]]--> :::}}}}|<span style="color:red"><strong>!</strong> {{tlx|retrieved}}: Invalid future access date [⁠[[Template:Retrieved/sandbox#dfuture|info]]⁠] <strong>!</strong></span><!--[[Category:Template Retrieved errors|{{FULLPAGENAME}}]]-->}}|<span style="color:red"><strong>!</strong> {{tlx|retrieved}}: Partial or incorrect access date [⁠[[Template:Retrieved/sandbox#dpart|info]]⁠] <strong>!</strong></span><!--[[Category:Template Retrieved errors|{{FULLPAGENAME}}]]-->}} :::}}{{#if:{{{via|}}}| – via {{{via}}}}}{{#if:{{{note|}}}| ({{{note}}})}}{{#if:{{{postscript|}}}|{{#ifeq:{{{postscript}}}|none||⁠{{{postscript}}}}}|{{#if:{{{mode|}}}|⁠{{#ifeq:{{{mode}}}|cs2||{{#ifeq:{{{mode}}}|cs1|.|}}}}|⁠.}}}}|<span style="color:red"><strong>!</strong> {{tlx|retrieved}}: Parameter <strong><span style="color:green">access-date/accessdate</span></strong> is missing or is incorrectly entered [⁠[[Template:Retrieved/sandbox#access-date|info]]⁠] <strong>!</strong></span><!--[[Category:Template Retrieved errors|{{FULLPAGENAME}}]]-->}}</span></includeonly><!-- End {{retrieved/sandbox}} --><noinclude>
I can of course document every change and addition, but as you can see this constitutes a rewrite, not merely edits here and there. It is a replacement template, and should be judged imo on whether it works, and whether it is compatible with the older template's usage (I also basically authored the existing template and its documentation). Same goes with the doc. As far as I can tell the likely problems with existing transclusions are few: they revolve around use of optional parameters (less than 2 dozen cases) and with exposing access-date errors because of the error checking addition to the sandbox version. There are relatively few of those as well. And I have offered to try to correct those manually. 98.0.181.26 (talk) 16:32, 24 January 2025 (UTC)[reply]
Would like to add that the sandbox version's rough logic flow, posted on this page, should indicate some if not all the differences between the current and proposed templates. 98.0.181.26 (talk) 16:38, 24 January 2025 (UTC)[reply]