模板: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}}