Template:Infobox election

维基百科,自由的百科全书
跳转至: 导航搜索
Documentation icon 模板文档[查看] [编辑] [页面历史] [清除]

總統或議會選舉信息框。

用法[编辑]

{{Infobox Election
| box_width = 
| election_name      = 
| country            = 
| flag_year          = 
| type               = 
| ongoing            = 
| party_colour       = 
| previous_election  = 
| previous_year      = 
| next_election      = 
| next_year          = 
| seats_for_election = 
| election_date      = <!-- {{Start date|YYYY|MM|DD}} -->
| turnout            = 
| image1             = <!-- 建議使用自由版權的圖像 -->
| colour1            = 
| nominee1           = 
| leader1            = 
| leader_since1      = 
| party1             = 
| alliance1          = 
| home_state1        = 
| leaders_seat1      = 
| running_mate1      = 
| last_election1     = 
| seats_before1      =
| seats_needed1      = 
| electoral_vote1    = 
| states_carried1    = 
| seats1             = 
| seats_after1       = 
| seat_change1       = 
| popular_vote1      = 
| percentage1        = 
| swing1             = 
| image2             = <!-- 建議使用自由版權的圖像 -->
| colour2            = 
| nominee2           = 
| leader2            = 
| leader_since2      = 
| party2             = 
| alliance2          = 
| home_state2        = 
| leaders_seat2      = 
| running_mate2      = 
| last_election2     = 
| seats_before2      =
| seats_needed2      = 
| electoral_vote2    = 
| states_carried2    = 
| seats2             = 
| seats_after2       = 
| seat_change2       = 
| popular_vote2      = 
| percentage2        = 
| swing2             = 
| poll1_date         = 
| poll1_source       = 
| poll1_nominee1     = 
| poll1_party1       = 
| poll2_date         = 
| poll2_source       = 
| poll2_nominee1     = 
| poll2_party1       = 
| poll1_date         = 
| poll1_source       = 
| poll1_nominee2     = 
| poll1_party2       = 
| poll2_date         = 
| poll2_source       = 
| poll2_nominee2     = 
| poll2_party2       = 
| map_image          = 
| map_size           = 
| map_caption        = 
| title              = 
| posttitle          =
| before_election    = 
| before_colour      = 
| after_election     = 
| after_colour       = 
| before_party       = 
| after_party        = 
| result             =
| '''Minor Candidates'''
| candidate1         =
| candidate2         =
| candidate3         =
| candidate4         =
| candidate5         =
| party1             =
| party2             =
| party3             =
| party4             =
| party5             =
| votes1             =
| votes2             =
| votes3             =
| votes4             =
| votes5             =
}}
*必填
† 只在ongoing為"yes"(選舉未完結)時才會顯示
‡ 只在ongoing為"no"(選舉已完結)時才會顯示
Field Type Description
election_name * Name given to the election. If this field is left empty the page name is displayed
country 舉行的國家或地區
flag_year For historical elections when an older flag design was in effect, enter the year the flag came into effect (not the election year). Default is to use the current flag.
type * 選舉類型。只可填以下其中一個:presidential、legislative、parliamentary。
ongoing * 填 yes(將進行的選舉)或 no(已完結)。Fields marked with a † are only displayed if the election is ongoing. Fields marked with a ‡ are only displayed if the election is has finished.(預設為 no)。
party_colour Also spelled party_color. To turn off the party colours enter 'no'.
previous_election 前次同類型選舉的條目名稱(不存在的條目不會有連結)
previous_year 前次同類型選舉的年份
previous_mps legislative The MPs elected in the last election.
next_election 下次同類型選舉的條目名稱(不存在的條目不會有連結)
next_year 下次同類型選舉的年份
next_mps legislative The MPs elected in the next election.
seats_for_election legislative The number of seats for election and the house or chamber the seats are for.
election_date 選舉日期 - use {{Start date}}
image1 Image of Nominee or Party Leader. The number can be changed up to six to display different Nominees or Leaders at the same time.
colour1 Also spelt color1. Enter a hex colour code (without the #) to override the border colour of image1. The number can be changed up to six to display different Nominees or Leaders at the same time.
nominee1 presidential Name of Nominee. When appropriate, candidate1 can be used instead. The number can be changed up to six to display different Nominees at the same time.
leader1 legislative 黨領袖姓名。最多可顯示6個黨(leader1至leader6)。
leader_since1 legislative The date the Leader took office. The number can be changed up to six to display different Parties at the same time.
party1 政黨
alliance1 政治聯盟
home_state1 presidential The state the Nominee represents. The number can be changed up to six to display different Nominees at the same time.
leaders_seat1 legislative The seat the Leader represents. The number can be changed up to six to display different Parties at the same time.
running_mate1 presidential The Nominee's Running mate. The number can be changed up to six to display different Nominees at the same time.
last_election1 legislative 前次選舉取得的議席數目及得票率。最多可顯示6個黨(last_election1至last_election6)。
seats_before1 legislative 選舉前的議席數目。最多可顯示6個黨。
electoral_vote1 presidential The electoral votes obtained by the Nominee. The number can be changed up to six to display different Nominees at the same time.
states_carried1 presidential The states carried or won by the Nominee. The number can be changed up to six to display different Nominees at the same time.
seats1 legislative The seats won at the election. The number can be changed up to six to display different Parties at the same time.
seats_after1 legislative The seat count after the election. The number can be changed up to six to display different Parties at the same time.
seat_change1 legislative The change in the number of seats won at the election compared to the previous election. The number can be changed up to six to display different Parties at the same time.
popular_vote1 The number of votes obtained by the Nominee or Party. The number can be changed up to six to display different Nominees or Parties at the same time.
percentage1 The percentage of the popular vote obtained by the Nominee or Party. The number can be changed up to six to display different Nominees or Parties at the same time.
swing1 legislative The swing or change in popular vote at the election compared to the pervious election. The number can be changed up to six to display different Parties at the same time.
seats_needed1 legislative The seats required to gain an overall majority. The number can be changed up to six to display different Parties at the same time.
poll1_date The date of the opinion poll. The number can be changed up to five to display different polls at the same time.
poll1_source The source or ULR of the opinion poll. The number can be changed up to five to display different polls at the same time.

poll1_nominee1

poll1_nominee1 presidential The percentage poll 1 gave to nominee 1. The poll number can be changed up to five to display different polls at the same time. The nominee number can be changed up to six to display different Nominees at the same time.
poll1_party1 presidential The percentage poll 1 gave to party 1. The poll number can be changed up to five to display different polls at the same time. The party number can be changed up to six to display different Nominees at the same time.
map_image Image of the election map.
map_size Size of image of the election map to be displayed.(預設300px)。
map_caption Caption on image of the election map to be displayed.
title Title decided by the election. (President, Speaker, Government, Prime Minister...)
posttitle Title of the victor of the election (President-elect, Prime Minister-designate, successor, …). If not used, then {{{title}}}-elect will be used.
before_election 是次選舉前的總統、議長、政府或總理
before_colour Also spelt before_color. Enter a hex colour code (without the #) to override the font colour of before_election.
after_election 是次選舉後的總統、議長、政府或總理
after_colour Also spelt after_color. Enter a hex colour code (without the #) to override the font colour of after_election.
before_party 是次選舉前的執政黨
after_party 是次選舉後的執政黨
result Parliamentary or electoral college majority

注意[编辑]

The template can display up to six parties or Nominees at the same time, three on the top row and three on the bottom row. If only four are needed, use the first two on the top and bottom lines. This is done by only using the numbers 1, 2, 4 and 5 on the fields that require a number.

All the fields that work for Legislative will also work for Parliamentary. The only difference between the two is the titles above the images.

The template uses the party fields to display the party colour(黨象徵顏色) in the background of the images and some text. 如果不想使用,填:

| party_colour=no

To override the colour for party1 or nominee1, input:

| colour1=[HEX OF COLOUR MINUS #]

The hex number must be entered without the hash for the field to work. The number (colour1) can be changed up to six for different parties or Nominees. The fields work with both spellings of the word 'colour'.

例子[编辑]

總統選舉[编辑]

2004年美国总统选举
美國
2000 ←
2004年11月2日  (2004-11-02) → 2008

  George-W-Bush.jpeg John Kerry headshot with US flag.jpg
获提名人 乔治·沃克·布什 约翰·克里
政党 共和黨 民主黨
本州 德克萨斯州 麻薩諸塞州
竞选搭档 迪克·切尼 约翰·爱德华兹
选举人票 286 251
胜出州/省 31 19+DC
民选得票 62,040,610 59,028,111
得票率 50.7% 48.3%

US presidential election 2004 map.svg

Presidential election results map. Red denotes states won by Bush/Cheney (31), Blue denotes those won by Kerry/Edwards (19+DC). Light blue is the electoral vote for "John Edwards" (sic) by an undetermined Minnesota "faithless elector". Numbers indicate the number of electoral votes allotted to each state.

前任總統

乔治·沃克·布什
共和黨

当选總統

乔治·沃克·布什
共和黨

{{Infobox Election
| election_name = 2004年美国总统选举
| country = 美國
| type = presidential
| ongoing = no
| previous_election = 2000年美国总统选举
| previous_year = 2000
| next_election = 2008年美国总统选举
| next_year = 2008
| election_date =  {{Start date|2004|11|2}}

<!--        George W. Bush       -->
| image1 = [[File:George-W-Bush.jpeg|150px]]
| nominee1 = [[乔治·沃克·布什]]
| party1 = [[共和黨 (美國)|共和黨]]
| home_state1 = [[德克萨斯州]]
| running_mate1 = [[迪克·切尼]]
| electoral_vote1 = 286
| states_carried1 = 31
| popular_vote1 = 62,040,610
| percentage1 = 50.7%

<!--          John Kerry        -->
| image2 = [[File:John Kerry headshot with US flag.jpg|130px]]
| nominee2 = [[约翰·克里]]
| party2 = [[民主黨 (美國)|民主黨]]
| home_state2 = [[麻薩諸塞州]]
| running_mate2 = [[约翰·爱德华兹]]
| electoral_vote2 = 251
| states_carried2 = 19+[[华盛顿哥伦比亚特区|DC]]
| popular_vote2 = 59,028,111
| percentage2 = 48.3%

| map_image = US presidential election 2004 map.svg
| map_size = 350px
| map_caption = Presidential election results map.

| title = 總統
| before_election = [[乔治·沃克·布什]]
| before_party = [[共和黨 (美國)|共和黨]]
| after_election = [[乔治·沃克·布什]]
| after_party = [[共和黨 (美國)|共和黨]]
}}


將會舉行的總統選舉[编辑]

2008年美国总统选举
美國
2004 ←
2008年11月4日  (2008-11-04) → 2012

  Hillary Rodham Clinton.jpg Sen. Barack Obama smiles.jpg John Edwards, official Senate photo portrait.jpg
候选人 希拉里·克林顿 贝拉克·奥巴马 约翰·爱德华兹
政党 民主黨 民主黨 民主黨
本州 紐約州 伊利諾伊州 North Carolina
民意调查
2007-08-03[1] 45% 22% 9%
2007-08-01[2] 46% 23% 12%
2007-08-01[3] 44% 23% 14%
2007-07-30[4] 43% 22% 13%

  Rudy Giuliani.jpg Fred Thompson.jpg John McCain official photo portrait.JPG
候选人 魯迪·朱利安尼 弗雷德·汤普森 約翰·麥凱恩
政党 共和黨 共和黨 共和黨
本州 紐約州 田納西州 Arizona
民意调查
2007-08-03[5] 26% 21% 11%
2007-08-01[6] 32% 20% 13%
2007-08-01[7] 33% 20% 17%
2007-07-30[8] 30% 22% 13%

US Electoral College Map.PNG

Presidential electoral votes by state.

现任總統

乔治·沃克·布什
共和黨

{{Infobox Election
| election_name = 2008年美国总统选举
| country = 美國
| type = presidential
| ongoing = yes
| previous_election = 2004年美国总统选举
| previous_year = 2004
| next_election = <!-- United States presidential election, 2012 -->
| next_year = 2012
| election_date =  {{Start date|2008|11|4}}

<!--        Hillary Rodham Clinton      -->
| image1 = [[File:Hillary Rodham Clinton.jpg|125px]]
| candidate1 = [[希拉里·克林顿]]
| party1 = [[民主黨 (美國)|民主黨]]
| home_state1 = [[紐約州]]
| running_mate1 = 
| electoral_vote1 = 
| states_carried1 = 
| popular_vote1 = 
| percentage1 = 

<!--            Barack Obama           -->
| image2 = [[File:Sen._Barack_Obama_smiles.jpg|125px]]
| candidate2 = [[贝拉克·奥巴马]]
| party2 = [[民主黨 (美國)|民主黨]]
| home_state2 = [[伊利諾伊州]]
| running_mate2 = 
| electoral_vote2 = 
| states_carried2 = 
| popular_vote2 = 
| percentage2 = 

<!--            John Edwards           -->
| image3 = [[File:John Edwards, official Senate photo portrait.jpg|125px]]
| candidate3 = [[约翰·爱德华兹]]
| party3 = [[民主黨 (美國)|民主黨]]
| home_state3 = [[North Carolina]]
| running_mate3 = 
| electoral_vote3 = 
| states_carried3 = 
| popular_vote3 = 
| percentage3 = 

<!--            Rudy Giuliani          -->
| image4 = [[File:Rudy Giuliani.jpg|125px]]
| candidate4 = [[魯迪·朱利安尼]]
| party4 = [[共和黨 (美國)|共和黨]]
| home_state4 = [[紐約州]]
| running_mate4 = 
| electoral_vote4 = 
| states_carried4 = 
| popular_vote4 = 
| percentage4 = 

<!--        Fred Thompson              -->
| image5 = [[File:Fred Thompson.jpg|110px]]
| candidate5 = [[弗雷德·汤普森]]
| party5 = [[共和黨 (美國)|共和黨]]
| home_state5 = [[田納西州]]
| running_mate5 = 
| electoral_vote5 = 
| states_carried5 = 
| popular_vote5 = 
| percentage5 = 

<!--            John McCain            -->
| image6 = [[File:John McCain official photo portrait.JPG|125px]]
| candidate6 = [[約翰·麥凱恩]]
| party6 = [[共和黨 (美國)|共和黨]]
| home_state6 = [[Arizona]]
| running_mate6 = 
| electoral_vote6 = 
| states_carried6 = 
| popular_vote6 = 
| percentage6 = 

<!--      Polls       -->
| poll1_date = 2007-08-03
| poll1_source = http://www.rasmussenreports.com/public_content/politics/election_2008__1/daily_presidential_tracking_polling_history
| poll1_candidate1 = '''45%'''
| poll1_candidate2 = 22%
| poll1_candidate3 = 9%
| poll1_candidate4 = '''26%'''
| poll1_candidate5 = 21%
| poll1_candidate6 = 11%

| poll2_date = 2007-08-01
| poll2_source = http://www.msnbc.msn.com/id/20109634/site/newsweek/
| poll2_candidate1 = '''46%'''
| poll2_candidate2 = 23%
| poll2_candidate3 = 12%
| poll2_candidate4 = '''32%'''
| poll2_candidate5 = 20%
| poll2_candidate6 = 13%

<!--      Seperate Polls for Dems and GOP       -->
| poll3_date1 = 2007-08-01
| poll3_source1 = http://www.pollingreport.com/wh08dem.htm
| poll3_candidate1 = '''44%'''
| poll3_candidate2 = 23%
| poll3_candidate3 = 14%

| poll3_date2 = 2007-08-01
| poll3_source2 = http://www.pollingreport.com/wh08rep.htm
| poll3_candidate4 = '''33%'''
| poll3_candidate5 = 20%
| poll3_candidate6 = 17%

| poll4_date1 = 2007-07-30
| poll4_source1 = http://www.pollingreport.com/wh08dem.htm
| poll4_candidate1 = '''43%'''
| poll4_candidate2 = 22%
| poll4_candidate3 = 13%

| poll4_date2 = 2007-07-30
| poll4_source2 = http://www.pollingreport.com/wh08rep.htm
| poll4_candidate4 = '''30%'''
| poll4_candidate5 = 22%
| poll4_candidate6 = 13%

| map_image = US Electoral College Map.PNG
| map_size = 350px
| map_caption = Presidential electoral votes by state.

| title = 總統
| before_election = [[乔治·沃克·布什]]
| before_party = [[共和黨 (美國)|共和黨]]
| after_election = 
| after_party = 
}}


議會選舉[编辑]

2005年英國大選
英国
2001 ←
2005年5月5日  (2005-05-05) → 2010

下議院全數646席
  第一大党 第二大党 第三党派
  Tony Blair cropped from defenselink.jpg Michael Howard.jpg Charles Peter Kennedy.jpg
党领袖 托尼·布莱尔 迈克尔·霍华德 查尔斯·肯尼迪
政党 工党 保守黨 自由民主党
上任期 1994年7月21日 2003年11月6日 1999年8月9日
代表选区 塞奇菲爾德 福克斯通和海斯 羅斯、斯凱和洛哈伯
上届结果 412席, 40.7% 166席, 31.7% 52席, 18.3%
赢得议席 356 198 62
议席差额 -56 +33 +11
民选得票 9,562,122 8,772,598 5,981,874
得票率 35.3% 32.3% 22.1%
游离票率 -5.5% +0.6% +3.7%

前任首相

托尼·布莱尔
工党

当选首相

托尼·布莱尔
工党

{{Infobox Election
| election_name = 2005年英國大選
| country = 英國
| type = parliamentary
| ongoing = no
| previous_election = 2001年英國大選
| previous_year = 2001
| previous_mps = MPs elected in the United Kingdom general election, 2001
| next_election = 2010年英國大選
| next_year = 2010
| next_mps = MPs elected in the United Kingdom general election, 2005
| seats_for_election = 下議院全數646席
| election_date = {{Start date|2005|5|5}}

<!--      Labour      -->
| image1 = [[File:Tony Blair cropped from defenselink.jpg|100px]]
| leader1 = [[托尼·布莱尔]]
| leader_since1 = 1994年7月21日
| party1 = [[工党 (英国)|工党]]
| leaders_seat1 = [[塞奇菲爾德 (英國國會選區)|塞奇菲爾德]]
| last_election1 = 412席, 40.7%
| seats1 = 356
| seat_change1 = -56
| popular_vote1 = 9,562,122
| percentage1 = 35.3%
| swing1 = -5.5%

<!--      Conservative     -->
| image2 = [[File:Michael Howard.jpg|120px]]
| leader2 = [[迈克尔·霍华德]]
| leader_since2 = 2003年11月6日
| party2 = [[保守黨 (英國)|保守黨]]
| leaders_seat2 = [[福克斯通和海斯 (英國國會選區)|福克斯通和海斯]]
| last_election2 = 166席, 31.7%
| seats2 = 198
| seat_change2 = +33
| popular_vote2 = 8,772,598
| percentage2 = 32.3%
| swing2 = +0.6%

<!--      Liberal Democrats      -->
| image3 = [[File:Charles Peter Kennedy.jpg|120px]]
| leader3 = [[查尔斯·肯尼迪]]
| leader_since3 = 1999年8月9日
| party3 = [[自由民主党 (英国)|自由民主党]]
| leaders_seat3 = [[羅斯、斯凱和洛哈伯 (英國國會選區)|羅斯、斯凱和洛哈伯]]
| last_election3 = 52席, 18.3%
| seats3 = 62
| seat_change3 = +11
| popular_vote3 = 5,981,874
| percentage3 = 22.1%
| swing3 = +3.7%

| title = 首相
| before_election = [[托尼·布莱尔]]
| before_party = [[工党 (英国)|工党]]
| after_election = [[托尼·布莱尔]]
| after_party = [[工党 (英国)|工党]]
}}


將會舉行的議會選舉[编辑]

與上面「議會選舉」章節大部分相同(除了選舉結果暫時留空外),不過在| ongoing = 一行需要填yes,如下:

{{Infobox Election
| election_name = 第54屆英國大選
| country = 英國
| type = parliamentary
| ongoing = yes
| previous_election = 2005年英國大選
| previous_year = 2005
|(下略)
}}


微格式[编辑]

此模板產生的HTML标记包含了hCalendar微格式,能夠讓電腦解析事件的详情,便于维基百科将该条目归类,或让用户通过浏览器将该事件添加进日历或日记应用程序中。關於微格式的更多使用資訊,請參閱維基百科的微格式專題

日期只会在使用了{{Start date}}或{{End date}}的情况下显示,URL只会在使用了{{Url}}的情况下被包含。

hCalendar使用的HTML class包括:

  • attendee
  • contact
  • description
  • dtend
  • dtstart
  • location
  • organiser
  • summary
  • url
  • vevent

請勿移除或修改這些class,也請勿更改或移除有相關設定之模板及設定。

Note: If no date is entered, then the microformat is not emitted.