Difference between revisions of "Template:Cite sports-reference/testcases"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
m (Since <tt> is obsolete in HTML5, replace it with <kbd> – see HTML element#tt, Wikipedia:HTML5, and mw:Help:Extension:Linter/obsolete-tag. using AWB)
imported>Zyxw
(update)
Line 3: Line 3:
 
== Olympics ==
 
== Olympics ==
  
=== Unnamed parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=Unnamed parameters
{{refbegin}}
+
|code=<nowiki>{{__TEMPLATENAME__ | Larysa Latynina | https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | 28 January 2010 }}</nowiki>
; Usage
+
}}
: <kbd><nowiki>{{Cite sports-reference | Larysa Latynina | https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | 28 January 2010 }}</nowiki></kbd>
 
; Live template
 
: {{Cite sports-reference | Larysa Latynina | https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | 28 January 2010 }}
 
; Sandbox template
 
: {{Cite sports-reference/sandbox | Larysa Latynina | https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | 28 January 2010 }}
 
{{refend}}
 
  
=== Named parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters with {{para|name}}
{{refbegin}}
+
|code=<nowiki>{{__TEMPLATENAME__ | name = Larysa Latynina | url = https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | accessdate = 28 January 2010 }}</nowiki>
; Usage
+
}}
: <kbd><nowiki>{{Cite sports-reference | name = 2004 Modern Pentathlon: Men's Individual | url = https://www.sports-reference.com/olympics/summer/2004/MOP/mens-individual.html | accessdate = 13 November 2012 }}</nowiki></kbd>
+
 
; Live template
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters with {{para|title}}
: {{Cite sports-reference | name = 2004 Modern Pentathlon: Men's Individual | url = https://www.sports-reference.com/olympics/summer/2004/MOP/mens-individual.html | accessdate = 13 November 2012 }}
+
|code=<nowiki>{{__TEMPLATENAME__ | 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 }}</nowiki>
; Sandbox template
+
}}
: {{Cite sports-reference/sandbox | name = 2004 Modern Pentathlon: Men's Individual | url = https://www.sports-reference.com/olympics/summer/2004/MOP/mens-individual.html | accessdate = 13 November 2012 }}
+
 
{{refend}}
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters with {{para|title|Archived copy}}
 +
|code=<nowiki>{{__TEMPLATENAME__ | url = https://www.sports-reference.com/olympics/athletes/ka/miho-kawabe-1.html | accessdate = 21 July 2012 | title = Archived copy | archiveurl = https://web.archive.org/web/20121111123257/http://www.sports-reference.com/olympics/athletes/ka/miho-kawabe-1.html | archivedate = 11 November 2012 | url-status = live }}</nowiki>
 +
}}
  
 
== College football ==
 
== College football ==
  
=== Unnamed parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=Unnamed parameters
{{refbegin}}
+
|code=<nowiki>{{__TEMPLATENAME__ | Jimmy Collier | https://www.sports-reference.com/cfb/players/jimmy-collier-1.html | January 7, 2014 }}</nowiki>
; Usage
+
}}
: <kbd><nowiki>{{Cite sports-reference | Jimmy Collier | https://www.sports-reference.com/cfb/players/jimmy-collier-1.html | January 7, 2014 }}</nowiki></kbd>
+
 
; Live template
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters
: {{Cite sports-reference | Jimmy Collier | https://www.sports-reference.com/cfb/players/jimmy-collier-1.html | January 7, 2014 }}
+
|code=<nowiki>{{__TEMPLATENAME__ | title = Arkansas Razorbacks | url = https://www.sports-reference.com/cfb/schools/arkansas/ | accessdate = August 12, 2014 }}</nowiki>
; Sandbox template
+
}}
: {{Cite sports-reference/sandbox | Jimmy Collier | https://www.sports-reference.com/cfb/players/jimmy-collier-1.html | January 7, 2014 }}
+
 
{{refend}}
+
== Missing title/name ==
 +
The Wikipedia page name is used if the template is missing {{para|title}} or {{para|name}}.
  
=== Named parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=No parameters (using Wikidata)
{{refbegin}}
+
|code=<nowiki>{{__TEMPLATENAME__}}</nowiki>
; Usage
+
}}
: <kbd><nowiki>{{Cite sports-reference | name = Arkansas Razorbacks | url = https://www.sports-reference.com/cfb/schools/arkansas/ | accessdate = August 12, 2014 }}</nowiki></kbd>
 
; Live template
 
: {{Cite sports-reference | name = Arkansas Razorbacks | url = https://www.sports-reference.com/cfb/schools/arkansas/ | accessdate = August 12, 2014 }}
 
; Sandbox template
 
: {{Cite sports-reference/sandbox | name = Arkansas Razorbacks | url = https://www.sports-reference.com/cfb/schools/arkansas/ | accessdate = August 12, 2014 }}
 
{{refend}}
 
  
== Missing URL ==
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters
Any of the following will add an article to [[:Category:Articles using sports-reference citation without URL]].
+
|code=<nowiki>{{__TEMPLATENAME__ | url = https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | accessdate = 28 January 2010 }}</nowiki>
 +
}}
  
=== No parameters ===
+
== Missing url ==
The template uses the current pagename if a name or title is not provided.
+
Articles will be added to [[:Category:Articles using sports-reference citation without URL]] if the template is missing {{para|url}}.
{{refbegin}}
 
; Usage
 
: <kbd><nowiki>{{Cite sports-reference}}</nowiki></kbd>
 
; Live template
 
: {{Cite sports-reference}}
 
; Sandbox template
 
: {{Cite sports-reference/sandbox}}
 
{{refend}}
 
  
=== Unnamed parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=Unnamed parameters
{{refbegin}}
+
|code=<nowiki>{{__TEMPLATENAME__ | Larysa Latynina }}</nowiki>
; Usage
+
}}
: <kbd><nowiki>{{Cite sports-reference | Larysa Latynina }}</nowiki></kbd>
 
; Live template
 
: {{Cite sports-reference | Larysa Latynina }}
 
; Sandbox template
 
: {{Cite sports-reference/sandbox | Larysa Latynina }}
 
{{refend}}
 
  
=== Named parameters ===
+
{{Test case nowiki |format=rows |collapsible=yes |title=Named parameters
The access date is not displayed if URL is not provided.
+
|code=<nowiki>{{__TEMPLATENAME__ | title = 2004 Modern Pentathlon: Men's Individual | url = | accessdate = 13 November 2012 }}</nowiki>
{{refbegin}}
+
}}
; Usage
 
: <kbd><nowiki>{{Cite sports-reference | name = 2004 Modern Pentathlon: Men's Individual | url = | accessdate = 13 November 2012 }}</nowiki></kbd>
 
; Live template
 
: {{Cite sports-reference | name = 2004 Modern Pentathlon: Men's Individual | url = | accessdate = 13 November 2012 }}
 
; Sandbox template
 
: {{Cite sports-reference/sandbox | name = 2004 Modern Pentathlon: Men's Individual | url = | accessdate = 13 November 2012 }}
 
{{refend}}
 

Revision as of 13:01, 27 February 2020

Template:Testcases page

Olympics

Unnamed parameters
{{Cite sports-reference | Larysa Latynina | https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | 28 January 2010 }}
{{Cite sports-reference}}
"Larysa Latynina". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010.Expression error: Unrecognized punctuation character "[".
{{Cite sports-reference/sandbox}}
"Larysa Latynina". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010.Expression error: Unrecognized punctuation character "[".
Named parameters with |name=
{{Cite sports-reference | name = Larysa Latynina | url = https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | accessdate = 28 January 2010 }}
{{Cite sports-reference}}
"Larysa Latynina". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010.Expression error: Unrecognized punctuation character "[".
{{Cite sports-reference/sandbox}}
"Larysa Latynina". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010.Expression error: Unrecognized punctuation character "[".
Named parameters with |title=
{{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 }}
{{Cite sports-reference}}
"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/sandbox}}
"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 "[".
Named parameters with |title=Archived copy
{{Cite sports-reference | url = https://www.sports-reference.com/olympics/athletes/ka/miho-kawabe-1.html | accessdate = 21 July 2012 | title = Archived copy | archiveurl = https://web.archive.org/web/20121111123257/http://www.sports-reference.com/olympics/athletes/ka/miho-kawabe-1.html | archivedate = 11 November 2012 | url-status = live }}
{{Cite sports-reference}}
"[[:Template:PAGENAMEBASE]]". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Archived from the original on 11 November 2012. Retrieved 21 July 2012. URL–wikilink conflict (help)Expression error: Unrecognized punctuation character "[".
{{Cite sports-reference/sandbox}}
"[[:Template:PAGENAMEBASE]]". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Archived from the original on 11 November 2012. Retrieved 21 July 2012. URL–wikilink conflict (help)Expression error: Unrecognized punctuation character "[".

College football

Unnamed parameters
{{Cite sports-reference | Jimmy Collier | https://www.sports-reference.com/cfb/players/jimmy-collier-1.html | January 7, 2014 }}
{{Cite sports-reference}}
"Jimmy Collier". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved January 7, 2014.Expression error: Unrecognized punctuation character "[".
{{Cite sports-reference/sandbox}}
"Jimmy Collier". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved January 7, 2014.Expression error: Unrecognized punctuation character "[".
Named parameters
{{Cite sports-reference | title = Arkansas Razorbacks | url = https://www.sports-reference.com/cfb/schools/arkansas/ | accessdate = August 12, 2014 }}
{{Cite sports-reference}}
"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/sandbox}}
"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 "[".

Missing title/name

The Wikipedia page name is used if the template is missing |title= or |name=.

No parameters (using Wikidata)
{{Cite sports-reference}}
{{Cite sports-reference}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "[[:Template:PAGENAMEBASE]]" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04. URL–wikilink conflict (help)
{{Cite sports-reference/sandbox}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "[[:Template:PAGENAMEBASE]]" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04. URL–wikilink conflict (help)
Named parameters
{{Cite sports-reference | url = https://www.sports-reference.com/olympics/athletes/la/larysa-latynina-1.html | accessdate = 28 January 2010 }}
{{Cite sports-reference}}
"[[:Template:PAGENAMEBASE]]". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010. URL–wikilink conflict (help)Expression error: Unrecognized punctuation character "[".
{{Cite sports-reference/sandbox}}
"[[:Template:PAGENAMEBASE]]". Expression error: Unrecognized punctuation character "[".Expression error: Unrecognized punctuation character "[". Sports-Reference.com. Sports Reference LLC. Retrieved 28 January 2010. URL–wikilink conflict (help)Expression error: Unrecognized punctuation character "[".

Missing url

Articles will be added to Category:Articles using sports-reference citation without URL if the template is missing |url=.

Unnamed parameters
{{Cite sports-reference | Larysa Latynina }}
{{Cite sports-reference}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "Larysa Latynina" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04.
{{Cite sports-reference/sandbox}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "Larysa Latynina" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04.
Named parameters
{{Cite sports-reference | title = 2004 Modern Pentathlon: Men's Individual | url = | accessdate = 13 November 2012 }}
{{Cite sports-reference}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "2004 Modern Pentathlon: Men's Individual" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04. Retrieved 13 November 2012.
{{Cite sports-reference/sandbox}}
Evans, Hilary; Gjerde, Arild; Heijmans, Jeroen; Mallon, Bill; et al. Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html "2004 Modern Pentathlon: Men's Individual" Check |archive-url= value (help). Olympics at Sports-Reference.com. Sports Reference LLC. Archived from Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value)..html the original Check |url= value (help) on 2016-12-04. Retrieved 13 November 2012.