Difference between revisions of "Template:Cite sports-reference/sandbox"
Jump to navigation
Jump to search
imported>Zyxw (add check for unknown parameters) |
imported>Uzume (update tracking to use Module:Wd instead of the unmaintained and deprecated Module:Wikidata) |
||
| Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{#if: {{{2|{{{url|}}}}}} | <includeonly>{{#ifeq: {{#if: {{{2|{{{url|}}}}}} | ||
| {{#ifexpr:{{Str find|{{{2|{{{url|}}}}}}|www.sports-reference.com/olympics/}}<>-1|Olympics}} | | {{#ifexpr:{{Str find|{{{2|{{{url|}}}}}}|www.sports-reference.com/olympics/}}<>-1|Olympics}} | ||
| − | | {{#if:{{# | + | | {{#if:{{#invoke:wd|properties|raw|P1447}}|Olympics}} |
}} | Olympics | <!-- citation for Olympics page at Sports-Reference.com --> | }} | Olympics | <!-- citation for Olympics page at Sports-Reference.com --> | ||
{{cite web | {{cite web | ||
| Line 18: | Line 18: | ||
| url = {{#if: {{{2|{{{url|}}}}}} | | url = {{#if: {{{2|{{{url|}}}}}} | ||
| {{{2|{{{url}}}}}} | | {{{2|{{{url}}}}}} | ||
| − | | {{#if:{{# | + | | {{#if:{{#invoke:wd|properties|raw|P1447}}|https://www.sports-reference.com/olympics/athletes/{{First word|1={{#invoke:wd|properties|raw|P1447}}|sep=,}}.html}} |
}} | }} | ||
| work = Olympics at Sports-Reference.com | | work = Olympics at Sports-Reference.com | ||
| Line 30: | Line 30: | ||
| {{#if: {{{2|{{{url|}}}}}} | | {{#if: {{{2|{{{url|}}}}}} | ||
| https://timetravel.mementoweb.org/memento/20161204/{{#if: 1 | {{{2|{{{url}}}}}} }} | | https://timetravel.mementoweb.org/memento/20161204/{{#if: 1 | {{{2|{{{url}}}}}} }} | ||
| − | | {{#if:{{# | + | | {{#if:{{#invoke:wd|properties|raw|P1447}}|https://timetravel.mementoweb.org/memento/20161204/https://www.sports-reference.com/olympics/athletes/{{First word|1={{#invoke:wd|properties|raw|P1447}}|sep=,}}.html}} |
}} | }} | ||
}} | }} | ||
| Line 66: | Line 66: | ||
|<!--Olympic athlete-->{{#ifeq:{{Str rightc|{{{2|{{{url|}}}}}}|5}}|.html | |<!--Olympic athlete-->{{#ifeq:{{Str rightc|{{{2|{{{url|}}}}}}|5}}|.html | ||
|<!--URL ending with .html-->{{#ifeq:{{YesNo-Yes|{{{check-wikidata|}}}}}|yes | |<!--URL ending with .html-->{{#ifeq:{{YesNo-Yes|{{{check-wikidata|}}}}}|yes | ||
| − | |<!--does not use "|check-wikidata=no"-->{{#if:{{# | + | |<!--does not use "|check-wikidata=no"-->{{#if:{{#invoke:wd|properties|raw|P1447}} |
| − | |<!--P1447 defined-->{{#if:{{Str endswith|{{{2|{{{url|}}}}}}|{{First word|1={{# | + | |<!--P1447 defined-->{{#if:{{Str endswith|{{{2|{{{url|}}}}}}|{{First word|1={{#invoke:wd|properties|raw|P1447}}|sep=,}}.html}} |
|<!--ID in URL matches Wikidata--> | |<!--ID in URL matches Wikidata--> | ||
|<!--ID in URL does not match-->{{Main other|[[Category:Articles using sports-reference citation with different Wikidata]]}} | |<!--ID in URL does not match-->{{Main other|[[Category:Articles using sports-reference citation with different Wikidata]]}} | ||
}} | }} | ||
| − | |<!--P1447 not defined-->{{#if:{{#invoke: | + | |<!--P1447 not defined-->{{#if:{{#invoke:wd|label|raw}} |
| − | |<!--Wikidata item exists-->{{#if:{{#invoke:String|match|{{#invoke: | + | |<!--Wikidata item exists-->{{#if:{{#invoke:String|match|{{#invoke:wd|properties|raw|P31}},|Q5,|1|1|true|}} |
|<!--Wikidata contains "instance of" (P31) "human" (Q5)-->{{Main other|[[Category:Sports Reference ID not in Wikidata]]}} | |<!--Wikidata contains "instance of" (P31) "human" (Q5)-->{{Main other|[[Category:Sports Reference ID not in Wikidata]]}} | ||
}} | }} | ||
| Line 82: | Line 82: | ||
}} | }} | ||
}} | }} | ||
| − | |<!--URL not specified-->{{#if:{{# | + | |<!--URL not specified-->{{#if:{{#invoke:wd|properties|raw|P1447}} |
|<!--P1447 defined-->{{Main other|[[Category:Articles using sports-reference citation with Wikidata]]}} | |<!--P1447 defined-->{{Main other|[[Category:Articles using sports-reference citation with Wikidata]]}} | ||
|<!--P1447 not defined-->{{Main other|[[Category:Articles using sports-reference citation without URL]]}} | |<!--P1447 not defined-->{{Main other|[[Category:Articles using sports-reference citation without URL]]}} | ||
Latest revision as of 02:02, 7 June 2020
| This is the template sandbox page for Template:Cite sports-reference (diff). See also the companion subpage for test cases. |
| This template is a Citation Style 1 specific-source template based on {{Cite web}}. For centralised Citation Style 1 discussions, see Help talk:Citation Style 1. |
Template:Uses Wikidata Template:Tracks Wikidata
Template:Cite sports-reference displays an external link to a web page at Sports-Reference.com. It is implemented via the {{Cite web}} template for use as a reference within an article.
Contents
Usage
{{Cite sports-reference |title= [link text/name] |url= [full url] |accessdate= [date accessed] }}
Day Month Year format
{{Cite sports-reference |title= [link text/name] |url= [full url] |accessdate= 8 November 2025 }}
Month Day, Year format
{{Cite sports-reference |title= [link text/name] |url= [full url] |accessdate= November 8, 2025 }}
All parameters
{{Cite sports-reference |title= |url= |access-date= |archive-url= |archive-date= |url-status= |quote= |df= |ref= }}
Examples
| Usage | Result |
|---|---|
| {{Cite sports-reference |title= Larysa Latynina |url= https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html |access-date= 5 May 2011 |archive-url= https://web.archive.org/web/20110501003537/http://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html |archive-date= 1 May 2011 |url-status= dead }} | "Larysa Latynina". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Archived from the original on 1 May 2011. Retrieved 5 May 2011.Expression error: Unrecognized punctuation character "[". |
| {{Cite sports-reference |title= 2004 Modern Pentathlon: Men's Individual |url= https://www.sports-reference.com/olympics/summer/2004/MOP/mens-individual.html |access-date= 13 November 2012 }} | "2004 Modern Pentathlon: Men's Individual". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 13 November 2012.Expression error: Unrecognized punctuation character "[". |
| {{Cite sports-reference |title= Bob Djokovich |url= https://www.sports-reference.com/cbb/players/bob-djokovich-1.html |accessdate= July 16, 2012 }} | "Bob Djokovich". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved July 16, 2012.Expression error: Unrecognized punctuation character "[". |
| {{Cite sports-reference |title= Arkansas Razorbacks |url= https://www.sports-reference.com/cfb/schools/arkansas/ |access-date= August 12, 2014 }} | "Arkansas Razorbacks". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved August 12, 2014.Expression error: Unrecognized punctuation character "[". |
| {{Cite sports-reference |title= Heinie Zimmerman wins the retro-active 1912 NL Triple Crown |url= https://www.sports-reference.com/blog/2015/03/heine-zimmerman-1912-triple-crown/ |accessdate= March 5, 2015 |archiveurl= https://web.archive.org/web/20150306075319/http://www.sports-reference.com/blog/2015/03/heine-zimmerman-1912-triple-crown/ |archivedate= March 6, 2015 |url-status= live }} | "Heinie Zimmerman wins the retro-active 1912 NL Triple Crown". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Archived from the original on March 6, 2015. Retrieved March 5, 2015.Expression error: Unrecognized punctuation character "[". |
Tracking categories
Unknown and unnamed parameters:
- Category:Articles using sports-reference citation with unknown parameters (0)
- Category:Articles using sports-reference citation with unnamed parameters (0)
URL not specified:
- Category:Articles using sports-reference citation with Wikidata (0)
- Category:Articles using sports-reference citation without URL (0)
Olympic athlete URL:
- Category:Articles using sports-reference citation with incorrect URL (0)
- Category:Articles using sports-reference citation with different Wikidata (0)
- Category:Sports Reference ID not in Wikidata (0)
- Category:Articles without Wikidata item (0)
Templates and modules used
| This template uses Lua: |
- Template:Cite web, implemented with Module:Citation/CS1
- Template:First word, implemented with Module:String
- Template:Main other
- Template:Str find, implemented with Module:String
- Template:Str rightc
- Template:Yesno-yes
See also
- Template:Sports reference, for external links to Olympic athlete profiles
- Template:Olympedia, for non-archived links to Olympedia.org (source for Olympics at Sports-Reference pages)
| The above documentation is transcluded from Template:Cite sports-reference/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |