Template:BillboardEncode
Billboard magazine indexes the artists on their website by a number called the artist ID. Each individual artist has a single identification number through which all chart history can be tracked form inside and outside the website. This template is used to support {{singlechart}}, {{albumchart}}, and {{BillboardURLbyName}}.
Internally, it uses forty subtemplates, split by the first character of the artist's name. This prevents the system from needing to load the entire translation table every time the system.
{{BillboardID}} compiles the artists and their respective IDs, and provides the ID when called with a supported artist's name. It is a reasonably complete list (as of 11 February 2012 it includes over 30,000 artists) and anyone can help adding or asking missing IDs to it. This template is a supporting template: 99% of the time, the artists name can be passed to urlencode and the link will be fine. The other 1% are a real problem.
- Billboard replaces most, but not all, characters that are not in the English alphabet with a "-"
- Sometimes, Billboard will replace characters that are not in the English alphabet with a replacement that they think looks appropriate.
- Billboard frequently, but not always, drops "a", "the", "of", "as", and "in" from the URLs.
- "+" characters frequently mangle the characters around it.
- The rules are psychotically inconsistent. For example, "Mike + the Mechanics" becomes http://www.billboard.com/artist/1493113/mike-the-mechanics but "Florence + The Machine" becomes http://www.billboard.com/artist/302247/florence-machine
This template is simply an override. It returns the results of urlencode if it will work. Exception cases are listed and a specific string is returned.
Usage
Copy and paste one of the following onto the {{Singlechart}}
or {{Albumchart}}
templates when calling a Billboard chart, replacing Artistname with the artist whom chart history you are consulting:
{{BillboardID|Artistname}}
{{BillboardID|}}
Alternately, it can also be written:
{{BBID|Artistname}}
{{BBID|}}