Template:BillboardEncode

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]

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.

  1. Billboard replaces most, but not all, characters that are not in the English alphabet with a "-"
  2. Sometimes, Billboard will replace characters that are not in the English alphabet with a replacement that they think looks appropriate.
  3. Billboard frequently, but not always, drops "a", "the", "of", "as", and "in" from the URLs.
  4. "+" characters frequently mangle the characters around it.
  5. 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|}}

Example

The template might be used the following way: On the {{Singlechart}} or {{Albumchart}}, when calling Billboard charts, do the next:

  • Usually, those templates might be called as this:
  • {{albumchart|Billboard200|10|artist=Gotye|artistid=619936|accessdate=2 June 2012}}
  • {{singlechart|Billboardhot100|1|artist=Gotye|artistid=619936|accessdate=2 June 2012}}
  • Instead, using this template, it might be called as this:
  • {{albumchart|Billboard200|10|artist=Gotye|artistid={{BillboardID|Gotye}}|accessdate=2 June 2012}}
  • {{singlechart|Billboardhot100|1|artist=Gotye|artistid={{BillboardID|Gotye}}|accessdate=2 June 2012}}
  • As an example (using the template):
Chart Peak
position
US Billboard Hot 100[1] 1
Chart Peak
position
US Billboard 200[2] 10
  1. ^ "Gotye Album & Song Chart History" Billboard Hot 100 for Gotye. Retrieved 2 June 2012.
  2. ^ "Gotye Album & Song Chart History" Billboard 200 for Gotye. Retrieved 2 June 2012.

What if it doesn't work?

The usual problem is going to be that you didn't match the artist name on Billboard. Billboard is picky! "Selena Gomez & the Scene" is not the same as "Selena Gomez and the Scene". "Ana Belén" and "Ana Belen" are not the same. So, double check your name.


If that doesn't help, the problem probably lies in {{BillboardID}}. Fixing it is simple:

  1. Go find your artist's list of charts on Billboard.
  2. Look at the URL. Again, looking at http://www.billboard.com/artist/278867/Shakira/chart?f=379 you will see that big number:278867. That's the magic number we need.
  3. Edit the appropriate child of {{BillboardID}}. For Shakira, that's {{BillboardID/S}}, because "Shakira" begins with an "S".
  4. Insert the line. Again, using Shakira as an example, it's
    ||shakira = 278867
    Pay attention to the case. It has to be lower case inside the template.
  5. Now try again. Please doublecheck a few artists' articles that begin with the same letter and make sure you didn't break them. You can easily break hundreds of articles by inserting an error in the BillboardID templates, so be careful.

If you can't figure it out, drop a note at Template talk:BillboardID, and someone will come help.

Maintenance categories

To help maintain music articles, this template will automatically categorize articles that call it based on the parameters used in the reference.

BillboardID category

Category:Articles using BillboardID contains all articles that make use of the template.

See also