Difference between revisions of "Template:BillboardURLbyName"

From blackwiki
Jump to navigation Jump to search
imported>Elegie
(Use HTTPS for the generated Billboard URL in order to provide increased privacy and security for users. (From what it appears, the HTTP Billboard URL generates a 301 redirect to an equivalent HTTPS URL.))
imported>Alex 21
(Implementing talk page edit requested by User:Dindon~enwiki)
Line 1: Line 1:
<includeonly>https://www.billboard.com/artist/{{BillboardID|{{{artist}}}}}/{{BillboardEncode|{{trim|{{{artist}}}}}}}/{{#ifeq:{{{bio|}}}|true|biography|{{#ifeq:{{{chart|}}}|all|chart|chart?f={{trim|{{BillboardChartNum|{{{chart}}}}}}}}}}}</includeonly><noinclude>
+
<includeonly>https://www.billboard.com/music/{{#invoke:WLink|ansiPercent|{{#invoke:String|replace|{{{artist}}}|&|%26}}|space=-}}{{#if:{{{chart|}}}
 +
|/chart-history/{{#ifeq:{{{chart}}}|all||{{#invoke:WLink|ansiPercent|{{#invoke:String|replace|{{{chart}}}|&|%26}}|space=-}}}}
 +
}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 02:07, 26 January 2019

Template documentation[view] [edit] [history] [purge]

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