模板: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|}}
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 |
---|---|
美國(Billboard Hot 100)[1] | 1 |
Chart | Peak position |
---|---|
美國(《告示牌》200)[2] | 10 |
- ^ "Gotye Chart History (Hot 100)". Billboard. [2 June 2012].(英語).
- ^ "Gotye Chart History (Billboard 200)". Billboard. 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:
- Go find your artist's list of charts on Billboard.
- Look at the URL. Again, looking at https://www.billboard.com/artist/shakira/chart-history/hot-100 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 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
收藏-飲食-服裝-交通-體育-娛樂-旅遊-遊戲-嗜好-工具-音樂-舞蹈-電影-戲劇-電視-攝影-繪畫-雕塑-手工藝-家庭-文明-文物-節日-虛構-符號-次文化-動畫-漫畫 |
世界各地 | ||
中國歷史-中國神話-中國音樂 - 中國戲曲-中華民俗 - 中國文學-中文古典典籍-中國武術-中醫-中國畫-書法-佛教-道教-生肖 |
哲學-文學-藝術-語言學-歷史學-地理學-心理學-社會學-政治學-法學-軍事學-傳播學-新聞學-考古學-人類學-民族學-教育學-圖書資訊科學-經濟學-人口學-家政學-管理學-性學 | ||
文化-歷史-語言-宗教-教育-家庭-組織-族群-經濟-政治-政府-國家-傳統-產業-媒體-體育-安全-法律-犯罪-獎勵-城市 |
生物-動物-植物-氣象學-季節-化學元素-礦物-地理-數學-物理學-力學-化學-天文學-星座-地球科學-地質學-生物學-醫學-藥學-農學-資訊科學-系統科學-密碼學 | ||
交通-建築學-土木工程-電機工程-計算機科學-機械工程-能源科學-測繪學-航空航天-礦業-冶金學-印刷-化學工程-水利工程-通信技術-生物工程-材料科學-環境科學 | |||
歷史年表-曆法列表-化學品列表-生物分類總表-電腦相關列表-世界體育競賽列表-國旗列表-各國執政黨列表-國際組織列表-世界民族列表-世界遺產列表-山脈列表-中國年號列表-中華人民共和國縣級以上行政區列表-世界地理索引-語言列表 | |||
主題是為對某一領域感興趣的使用者提供的首頁 政治-歷史-軍事-人物-語言學-經濟學-世界遺產-藝術-音樂-動漫-哲學-電視-電影-宗教-基督教-佛教-猶太教-體育運動-足球-地理學-中國-日本-德國-臺灣-宜蘭- 香港-澳門-湖南-廣東-廣州-北京-上海-南京-西安-蘇州-天文學-火星-數學-物理-化學-生物-心理學-電腦技術-電子遊戲-地鐵-軟件-自由軟體-荷蘭-中華人民共和國-三國-福建-航天-日食-海軍-南非 |
contains all articles that make use of the template.
See also
- {{singlechart}}
- {{albumchart}}