Skabelon:BillboardEncode/doc
Dette er dokumentationsundersiden til Skabelon:BillboardEncode. Denne side indeholder information om brug, kategorier samt andet indhold, som ikke er en del af den oprindelige skabelonside. |
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
[rediger kildetekst]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
[rediger kildetekst]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. juni 2012}}
{{singlechart|Billboardhot100|1|artist=Gotye|artistid=619936|accessdate=2. juni 2012}}
- Instead, using this template, it might be called as this:
{{albumchart|Billboard200|10|artist=Gotye|artistid={{BillboardID|Gotye}}|accessdate=2. juni 2012}}
{{singlechart|Billboardhot100|1|artist=Gotye|artistid={{BillboardID|Gotye}}|accessdate=2. juni 2012}}
- As an example (using the template):
Chart | Peak position |
---|---|
USA Billboard Hot 100[1] | 1 |
Chart | Peak position |
---|---|
US Billboard 200[2] | 10 |
- ^ "Gotye Chart History (Hot 100)". Billboard.. Hentet 2. juni 2012.
- ^ "Gotye Album & Song Chart History" (engelsk). Billboard 200 for Gotye. Prometheus Global Media. Hentet 2. juni 2012.
What if it doesn't work?
[rediger kildetekst]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:
- Go find your artist's list of charts on Billboard.
- 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.
- Edit the appropriate child of {{BillboardID}}. For Shakira, that's {{BillboardID/S}}, because "Shakira" begins with an "S".
- 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.
- 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 Skabelondiskussion:BillboardID, and someone will come help.
Maintenance categories
[rediger kildetekst]To help maintain music articles, this template will automatically categorize articles that call it based on the parameters used in the reference.
BillboardID category
[rediger kildetekst]Kategori:Articles using BillboardID contains all articles that make use of the template.
See also
[rediger kildetekst]- {{singlechart}}
- {{albumchart}}