Difference between revisions of "Template:BillboardURLbyName/doc"

From blackwiki
Jump to navigation Jump to search
imported>GoingBatty
(→‎Usage: removed publisher per Template:Cite web#publisher)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[</nowiki>[[Wikipedia:Wikidata]]<nowiki>]]) -->
 +
 
 +
This template returns a billboard.com URL for an artist's history on a particular chart.
 +
 
 +
== Examples ==
 +
{{Aligned table |cols=3 |class=wikitable
 +
| '''Code'''                                                              | '''Output'''                                                  | '''Comments'''
 +
| {{tlc|BillboardURLbyName|artist{{=}}Carly Rae Jepsen|chart{{=}}Hot 100}} | {{BillboardURLbyName|artist=Carly Rae Jepsen|chart=Hot 100}}  |
 +
| {{tlc|BillboardURLbyName|artist{{=}}Carly Rae Jepsen|chart{{=}}Top Album Sales}} | {{BillboardURLbyName|artist=Carly Rae Jepsen|chart=Top Album Sales}}  |
 +
| {{tlc|BillboardURLbyName|artist{{=}}carly rae jepsen|chart{{=}}top album sales}} | {{BillboardURLbyName|artist=carly rae jepsen|chart=top album sales}}  | Equivalent to above. Artist and chart are case insensitive.
 +
| {{tlc|BillboardURLbyName|artist{{=}}Carly Rae Jepsen|chart{{=}}all}} | {{BillboardURLbyName|artist=Carly Rae Jepsen|chart=all}}  | <code>chart{{=}}all</code> links to Billboard's "main" chart for the given artist (in this case, the Hot 100).
 +
| {{tlc|BillboardURLbyName|artist{{=}}Carly Rae Jepsen}}                  | {{BillboardURLbyName|artist=Carly Rae Jepsen}} | Billboard's landing page for this artist, including their chart history, and recent news and videos relating to the artist. Content at this URL is liable to drift over time. Not recommended.
 +
}}
  
 
== Usage ==
 
== Usage ==
This template returns the URL for the page on the Billboard site showing a given artist's performance on a specific chart. For example, {{tlx|BillboardURLbyName|artist{{=}}Shakira{{!}}chart{{=}}Hot 100}} will generate {{BillboardURLbyName|artist=Shakira|chart=Hot 100}}. The chart name mapping is documented at {{tl|BillboardChartNum}}. The artist name is case insensitive, but, aside from that, must match the one used on the Billboard site ''precisely'': no allowances are made for cases like "&" vs. "and", and Billboard is extremely inconsistent about the use of a leading "The" in a band's name.
 
  
The Billboard name may not match Wikipedia's naming: for example, an article about a song by [[Kesha]] needs to use {{tlx|BillboardURLbyName|artist{{=}}Ke$ha{{!}}chart{{=}}Hot 100}}, because Billboard uses "Ke$ha" for the artist's name. That generates {{BillboardURLbyName|artist=Ke$ha|chart=Hot 100}}, while {{tlx|BillboardURLbyName|artist{{=}}Kesha{{!}}chart{{=}}Hot 100}} will generate {{BillboardURLbyName|artist=Kesha|chart=Hot 100}}. Because the artist name is case insenstive, other strings that will work include "[{{BillboardURLbyName|artist=KE$HA|chart=Hot 100}} KE$HA]", "[{{BillboardURLbyName|artist=ke$ha|chart=Hot 100}} ke$ha]" and even "[{{BillboardURLbyName|artist=kE$hA|chart=Hot 100}} kE$hA]".
+
This template is normally used within citations, e.g.
 +
 
 +
{{Markup
 +
|<nowiki>It reached no. 2 on the Billboard Modern Rock Tracks chart.<ref>{{cite web | url={{BillboardURLbyName|artist=the breeders|chart=alternative songs}} | title=The Breeders Chart History | accessdate=2007-07-31 | work=[[Billboard (magazine)|Billboard]]}}</ref></nowiki>
 +
|It reached no. 2 on the Billboard Alternative Songs chart.<ref>{{cite web | url={{BillboardURLbyName|artist=the breeders|chart=alternative songs}} | title=The Breeders Chart History | accessdate=2007-07-31 | work=[[Billboard (magazine)|Billboard]]}}</ref>
 +
}}
  
This template is normally used within citations, i.e.
+
{{reflist}}
  
*<nowiki><ref>{{cite web |url={{BillboardURLbyName|artist=Jennifer Lopez|chart=Hot 100}}|title=Jennifer Lopez Album & Song Chart History|work=Billboard|accessdate=June 10, 2011}}</ref></nowiki><ref>{{cite web |url={{BillboardURLbyName|artist=Jennifer Lopez|chart=Hot 100}}|title=Jennifer Lopez Album & Song Chart History|work=Billboard|accessdate=June 10, 2011}}</ref>
+
== Notes ==
*<nowiki><ref>[{{BillboardURLbyName|artist=Jennifer Lopez|chart=Hot 100}} Jennifer Lopez Album & Song Chart History]</ref></nowiki><ref>[{{BillboardURLbyName|artist=Jennifer Lopez|chart=Hot 100}} Jennifer Lopez Album & Song Chart History]</ref>
+
 
 +
The artist name used by Billboard may not match Wikipedia's naming. Be especially mindful of artists whose names contain special characters. For example, an article about a song by [[Pink (singer)|P!nk]] needs to use {{tlx|BillboardURLbyName|artist{{=}}pnk|chart{{=}}Hot 100}} to match Billboard's url scheme. Billboard is also inconsistent about the use of a leading "The" in a band's name. For this reason, it's usually a good idea to test any urls generated by this template before adding them to an article.
 +
 
 +
==TemplateData==
 +
<templatedata>
 +
{
 +
"description": "Generates billboard.com URLs for the chart history of a given artist.",
 +
"params": {
 +
"artist": {
 +
"label": "Artist name",
 +
"description": "The name of the artist, as it appears in billboard.com URLs",
 +
"type": "string",
 +
"required": true,
 +
"example": "The White Stripes"
 +
},
 +
"chart": {
 +
"label": "Chart name",
 +
"description": "The name of the Billboard chart",
 +
"example": "Digital Albums",
 +
"type": "string",
 +
"suggested": true
 +
},
 +
"bio": {
 +
"description": "Deprecated. No effect.",
 +
"type": "string",
 +
"deprecated": true
 +
}
 +
}
 +
}
 +
</templatedata>
  
If the chart is specified as "all", the link will be to the main chart page for the artist, using Billboards default "main chart". All charts are selectable from there.
 
{{reflist}}
 
  
 
== See also ==
 
== See also ==
  
<includeonly>
+
<includeonly>{{Sandbox other||
<!-- Categories and interwikis go here: -->
+
<!-- Categories below this line, please; interwikis at Wikidata -->
 +
{{DEFAULTSORT:Billboardurlbyname}}
 
[[Category:External link templates]]
 
[[Category:External link templates]]
 
[[Category:Music templates]]
 
[[Category:Music templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 23:57, 23 April 2020

This template returns a billboard.com URL for an artist's history on a particular chart.

Examples

Script error: No such module "aligned table".

Usage

This template is normally used within citations, e.g.

Markup Renders as
It reached no. 2 on the Billboard Modern Rock Tracks chart.<ref>{{cite web | url={{BillboardURLbyName|artist=the breeders|chart=alternative songs}} | title=The Breeders Chart History | accessdate=2007-07-31 | work=[[Billboard (magazine)|Billboard]]}}</ref>

It reached no. 2 on the Billboard Alternative Songs chart.[1]

  1. "The Breeders Chart History". Billboard. Retrieved 2007-07-31.

Notes

The artist name used by Billboard may not match Wikipedia's naming. Be especially mindful of artists whose names contain special characters. For example, an article about a song by P!nk needs to use {{BillboardURLbyName|artist=pnk|chart=Hot 100}} to match Billboard's url scheme. Billboard is also inconsistent about the use of a leading "The" in a band's name. For this reason, it's usually a good idea to test any urls generated by this template before adding them to an article.

TemplateData

Generates billboard.com URLs for the chart history of a given artist.

Template parameters

ParameterDescriptionTypeStatus
Artist nameartist

The name of the artist, as it appears in billboard.com URLs

Example
The White Stripes
Stringrequired
Chart namechart

The name of the Billboard chart

Example
Digital Albums
Stringsuggested
Biobio

Deprecated. No effect.

Stringdeprecated


See also