Template:Medals table/doc
此頁面是Template:Medals table的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
此模板使用Lua语言: |
本模板用于自动生成奖牌榜,该奖牌榜中的排名和奖牌总数均为自动计算。
用法
{{Medals table | caption = | host = <!-- 主办国图例的解释说明文字,如果不填或者所填内容为国家和地区代码则默认显示模块预设文字 --> | show_limit = <!-- 设定只显示奖牌榜排名前N位的队伍,如果不填则默认显示所有队伍 --> | remaining_text = <!-- 显示前N位以外的总奖牌数一行的队伍一列显示文字,如果不填则默认显示“其余国家/地区” --> | medal_display_text = <!-- 獎項欄位顯示文字,默認為1,顯示為「金牌、銀牌、銅牌」 --> | flag_template = <!-- 奖牌榜队伍列默认使用的模板,例如Template:FlagIOC系列模板;如果不填则默认使用Template:Flagteam --> | event = <!-- 如果flag_template所填模板要求必须带上第二个参数(第一个参数是国家和地区代码),则该栏必填 --> | team = <!-- 队伍列列标题,如果不填则默认显示为“国家 / 地区” --> ... <!-- 各国家和地区的缩写列表参见[[國際奧委會國家編碼列表]] --> | gold_IOC = | silver_IOC = | bronze_IOC = | host_IOC = <!-- 如果该队伍为赛事主办国家/地区,则该栏填yes,否则请留空 --> | name_IOC = <!-- 对应行队伍列所填数据,如果不填则默认显示为{{flag_template|IOC}} --> | note_IOC = <!-- 对应行队伍列后面追加的注释 --> }}
* {{{host}}}
排名 | {{{team}}} | 金牌 | 銀牌 | 銅牌 | 总计 |
---|---|---|---|---|---|
1 | 美国(USA){{{note_USA}}} | 0 | 0 | 0 | {{{gold_USA}}} + {{{silver_USA}}} + {{{bronze_USA}}} |
总计(共1个{{{team}}}) | ### | ### | ### | ### |
参数
以下为部分可填参数:
参数 | 解释 |
---|---|
caption |
奖牌榜表格顶部显示文字 |
host |
主办国图例的解释说明文字,如果不填则默认显示模块预设文字,如果所填的文字是一个国家和地区缩写(例如USA等等),则默认返回模块预设文字以及该缩写所对应的国家和地区名 |
flag_template |
奖牌榜队伍列默认使用的模板,如果不填则默认使用{{Flagteam}}。注意部分国家/地区的IOC代码与ISO代码有差别,例如BRN在IOC代码中代表巴林,在ISO代码中代表文莱 |
event |
flag_template所填模板第二个参数的内容(例如{{flagIOCteam|<country>}}) |
team |
队伍列列标题,如果不填则默认显示为“国家 / 地区” |
hide_rank |
用于隐藏排名一列,如果需要显示排名则该项留空 |
hide_totals |
用于隐藏总计一行,如果需要显示总计则该项留空 |
medal_display_text |
用於修改獎項欄位顯示文字,默認為1,顯示為「金牌、銀牌、銅牌」;2 = 「冠軍、亞軍、季軍」;3 = 「第一名、第二名、第三名」 |
各国家和地区的缩写列表参见國際奧委會國家編碼列表。
包含所有IOC代码的奖牌榜模板
以下代码为包含所有的IOC代码的模板,供需要使用者复制使用。
Template
|
---|
{{Medals table | caption = | host = <!-- 主办国图例的解释说明文字,如果不填则默认显示模块预设文字 --> | show_limit = <!-- 设定只显示奖牌榜排名前N位的队伍,如果不填则默认显示所有队伍 --> | remaining_text = <!-- 显示前N位以外的总奖牌数一行的队伍一列显示文字,如果不填则默认显示“其余国家/地区” --> | flag_template = <!-- 奖牌榜队伍列默认使用的模板,如果不填则默认使用Template:Flagteam --> | event = <!-- 如果flag_template所填模板要求必须带上第二个参数(第一个参数是国家和地区代码),则该栏必填 --> | team = <!-- 队伍列列标题,如果不填则默认显示为“国家 / 地区” --> | gold_AFG = | silver_AFG = | bronze_AFG = | gold_ALB = | silver_ALB = | bronze_ALB = | gold_ALG = | silver_ALG = | bronze_ALG = | gold_AND = | silver_AND = | bronze_AND = | gold_ANG = | silver_ANG = | bronze_ANG = | gold_ANT = | silver_ANT = | bronze_ANT = | gold_ARG = | silver_ARG = | bronze_ARG = | gold_ARM = | silver_ARM = | bronze_ARM = | gold_ARU = | silver_ARU = | bronze_ARU = | gold_ASA = | silver_ASA = | bronze_ASA = | gold_AUS = | silver_AUS = | bronze_AUS = | gold_AUT = | silver_AUT = | bronze_AUT = | gold_AZE = | silver_AZE = | bronze_AZE = | gold_BAH = | silver_BAH = | bronze_BAH = | gold_BAN = | silver_BAN = | bronze_BAN = | gold_BAR = | silver_BAR = | bronze_BAR = | gold_BDI = | silver_BDI = | bronze_BDI = | gold_BEL = | silver_BEL = | bronze_BEL = | gold_BEN = | silver_BEN = | bronze_BEN = | gold_BER = | silver_BER = | bronze_BER = | gold_BHU = | silver_BHU = | bronze_BHU = | gold_BIH = | silver_BIH = | bronze_BIH = | gold_BIZ = | silver_BIZ = | bronze_BIZ = | gold_BLR = | silver_BLR = | bronze_BLR = | gold_BOL = | silver_BOL = | bronze_BOL = | gold_BOT = | silver_BOT = | bronze_BOT = | gold_BRA = | silver_BRA = | bronze_BRA = | gold_BRN = | silver_BRN = | bronze_BRN = | gold_BRU = | silver_BRU = | bronze_BRU = | gold_BUL = | silver_BUL = | bronze_BUL = | gold_BUR = | silver_BUR = | bronze_BUR = | gold_CAF = | silver_CAF = | bronze_CAF = | gold_CAM = | silver_CAM = | bronze_CAM = | gold_CAN = | silver_CAN = | bronze_CAN = | gold_CAY = | silver_CAY = | bronze_CAY = | gold_CGO = | silver_CGO = | bronze_CGO = | gold_CHA = | silver_CHA = | bronze_CHA = | gold_CHI = | silver_CHI = | bronze_CHI = | gold_CHN = | silver_CHN = | bronze_CHN = | gold_CIV = | silver_CIV = | bronze_CIV = | gold_CMR = | silver_CMR = | bronze_CMR = | gold_COD = | silver_COD = | bronze_COD = | gold_COK = | silver_COK = | bronze_COK = | gold_COL = | silver_COL = | bronze_COL = | gold_COM = | silver_COM = | bronze_COM = | gold_CPV = | silver_CPV = | bronze_CPV = | gold_CRC = | silver_CRC = | bronze_CRC = | gold_CRO = | silver_CRO = | bronze_CRO = | gold_CUB = | silver_CUB = | bronze_CUB = | gold_CYP = | silver_CYP = | bronze_CYP = | gold_CZE = | silver_CZE = | bronze_CZE = | gold_DEN = | silver_DEN = | bronze_DEN = | gold_DJI = | silver_DJI = | bronze_DJI = | gold_DMA = | silver_DMA = | bronze_DMA = | gold_DOM = | silver_DOM = | bronze_DOM = | gold_ECU = | silver_ECU = | bronze_ECU = | gold_EGY = | silver_EGY = | bronze_EGY = | gold_ERI = | silver_ERI = | bronze_ERI = | gold_ESA = | silver_ESA = | bronze_ESA = | gold_ESP = | silver_ESP = | bronze_ESP = | gold_EST = | silver_EST = | bronze_EST = | gold_ETH = | silver_ETH = | bronze_ETH = | gold_FIJ = | silver_FIJ = | bronze_FIJ = | gold_FIN = | silver_FIN = | bronze_FIN = | gold_FRA = | silver_FRA = | bronze_FRA = | gold_FSM = | silver_FSM = | bronze_FSM = | gold_GAB = | silver_GAB = | bronze_GAB = | gold_GAM = | silver_GAM = | bronze_GAM = | gold_GBR = | silver_GBR = | bronze_GBR = | gold_GBS = | silver_GBS = | bronze_GBS = | gold_GEO = | silver_GEO = | bronze_GEO = | gold_GEQ = | silver_GEQ = | bronze_GEQ = | gold_GER = | silver_GER = | bronze_GER = | gold_GHA = | silver_GHA = | bronze_GHA = | gold_GRE = | silver_GRE = | bronze_GRE = | gold_GRN = | silver_GRN = | bronze_GRN = | gold_GUA = | silver_GUA = | bronze_GUA = | gold_GUI = | silver_GUI = | bronze_GUI = | gold_GUM = | silver_GUM = | bronze_GUM = | gold_GUY = | silver_GUY = | bronze_GUY = | gold_HAI = | silver_HAI = | bronze_HAI = | gold_HKG = | silver_HKG = | bronze_HKG = | gold_HON = | silver_HON = | bronze_HON = | gold_HUN = | silver_HUN = | bronze_HUN = | gold_INA = | silver_INA = | bronze_INA = | gold_IND = | silver_IND = | bronze_IND = | gold_IRI = | silver_IRI = | bronze_IRI = | gold_IRL = | silver_IRL = | bronze_IRL = | gold_IRQ = | silver_IRQ = | bronze_IRQ = | gold_ISL = | silver_ISL = | bronze_ISL = | gold_ISR = | silver_ISR = | bronze_ISR = | gold_ISV = | silver_ISV = | bronze_ISV = | gold_ITA = | silver_ITA = | bronze_ITA = | gold_IVB = | silver_IVB = | bronze_IVB = | gold_JAM = | silver_JAM = | bronze_JAM = | gold_JOR = | silver_JOR = | bronze_JOR = | gold_JPN = | silver_JPN = | bronze_JPN = | gold_KAZ = | silver_KAZ = | bronze_KAZ = | gold_KEN = | silver_KEN = | bronze_KEN = | gold_KGZ = | silver_KGZ = | bronze_KGZ = | gold_KIR = | silver_KIR = | bronze_KIR = | gold_KOR = | silver_KOR = | bronze_KOR = | gold_KOS = | silver_KOS = | bronze_KOS = | gold_KSA = | silver_KSA = | bronze_KSA = | gold_KUW = | silver_KUW = | bronze_KUW = | gold_LAO = | silver_LAO = | bronze_LAO = | gold_LAT = | silver_LAT = | bronze_LAT = | gold_LBA = | silver_LBA = | bronze_LBA = | gold_LBN = | silver_LBN = | bronze_LBN = | gold_LBR = | silver_LBR = | bronze_LBR = | gold_LCA = | silver_LCA = | bronze_LCA = | gold_LES = | silver_LES = | bronze_LES = | gold_LIE = | silver_LIE = | bronze_LIE = | gold_LTU = | silver_LTU = | bronze_LTU = | gold_LUX = | silver_LUX = | bronze_LUX = | gold_MAD = | silver_MAD = | bronze_MAD = | gold_MAR = | silver_MAR = | bronze_MAR = | gold_MAS = | silver_MAS = | bronze_MAS = | gold_MAW = | silver_MAW = | bronze_MAW = | gold_MDA = | silver_MDA = | bronze_MDA = | gold_MDV = | silver_MDV = | bronze_MDV = | gold_MEX = | silver_MEX = | bronze_MEX = | gold_MGL = | silver_MGL = | bronze_MGL = | gold_MHL = | silver_MHL = | bronze_MHL = | gold_MKD = | silver_MKD = | bronze_MKD = | gold_MLI = | silver_MLI = | bronze_MLI = | gold_MLT = | silver_MLT = | bronze_MLT = | gold_MNE = | silver_MNE = | bronze_MNE = | gold_MON = | silver_MON = | bronze_MON = | gold_MOZ = | silver_MOZ = | bronze_MOZ = | gold_MRI = | silver_MRI = | bronze_MRI = | gold_MTN = | silver_MTN = | bronze_MTN = | gold_MYA = | silver_MYA = | bronze_MYA = | gold_NAM = | silver_NAM = | bronze_NAM = | gold_NCA = | silver_NCA = | bronze_NCA = | gold_NED = | silver_NED = | bronze_NED = | gold_NEP = | silver_NEP = | bronze_NEP = | gold_NGR = | silver_NGR = | bronze_NGR = | gold_NIG = | silver_NIG = | bronze_NIG = | gold_NOR = | silver_NOR = | bronze_NOR = | gold_NRU = | silver_NRU = | bronze_NRU = | gold_NZL = | silver_NZL = | bronze_NZL = | gold_OMA = | silver_OMA = | bronze_OMA = | gold_PAK = | silver_PAK = | bronze_PAK = | gold_PAN = | silver_PAN = | bronze_PAN = | gold_PAR = | silver_PAR = | bronze_PAR = | gold_PER = | silver_PER = | bronze_PER = | gold_PHI = | silver_PHI = | bronze_PHI = | gold_PLE = | silver_PLE = | bronze_PLE = | gold_PLW = | silver_PLW = | bronze_PLW = | gold_PNG = | silver_PNG = | bronze_PNG = | gold_POL = | silver_POL = | bronze_POL = | gold_POR = | silver_POR = | bronze_POR = | gold_PRK = | silver_PRK = | bronze_PRK = | gold_PUR = | silver_PUR = | bronze_PUR = | gold_QAT = | silver_QAT = | bronze_QAT = | gold_ROU = | silver_ROU = | bronze_ROU = | gold_RSA = | silver_RSA = | bronze_RSA = | gold_RUS = | silver_RUS = | bronze_RUS = | gold_RWA = | silver_RWA = | bronze_RWA = | gold_SAM = | silver_SAM = | bronze_SAM = | gold_SEN = | silver_SEN = | bronze_SEN = | gold_SEY = | silver_SEY = | bronze_SEY = | gold_SGP = | silver_SGP = | bronze_SGP = | gold_SKN = | silver_SKN = | bronze_SKN = | gold_SLE = | silver_SLE = | bronze_SLE = | gold_SLO = | silver_SLO = | bronze_SLO = | gold_SMR = | silver_SMR = | bronze_SMR = | gold_SOL = | silver_SOL = | bronze_SOL = | gold_SOM = | silver_SOM = | bronze_SOM = | gold_SRB = | silver_SRB = | bronze_SRB = | gold_SRI = | silver_SRI = | bronze_SRI = | gold_SSD = | silver_SSD = | bronze_SSD = | gold_STP = | silver_STP = | bronze_STP = | gold_SUD = | silver_SUD = | bronze_SUD = | gold_SUI = | silver_SUI = | bronze_SUI = | gold_SUR = | silver_SUR = | bronze_SUR = | gold_SVK = | silver_SVK = | bronze_SVK = | gold_SWE = | silver_SWE = | bronze_SWE = | gold_SWZ = | silver_SWZ = | bronze_SWZ = | gold_SYR = | silver_SYR = | bronze_SYR = | gold_TAN = | silver_TAN = | bronze_TAN = | gold_TGA = | silver_TGA = | bronze_TGA = | gold_THA = | silver_THA = | bronze_THA = | gold_TJK = | silver_TJK = | bronze_TJK = | gold_TKM = | silver_TKM = | bronze_TKM = | gold_TLS = | silver_TLS = | bronze_TLS = | gold_TOG = | silver_TOG = | bronze_TOG = | gold_TPE = | silver_TPE = | bronze_TPE = | gold_TTO = | silver_TTO = | bronze_TTO = | gold_TUN = | silver_TUN = | bronze_TUN = | gold_TUR = | silver_TUR = | bronze_TUR = | gold_TUV = | silver_TUV = | bronze_TUV = | gold_UAE = | silver_UAE = | bronze_UAE = | gold_UGA = | silver_UGA = | bronze_UGA = | gold_UKR = | silver_UKR = | bronze_UKR = | gold_URU = | silver_URU = | bronze_URU = | gold_USA = | silver_USA = | bronze_USA = | gold_UZB = | silver_UZB = | bronze_UZB = | gold_VAN = | silver_VAN = | bronze_VAN = | gold_VEN = | silver_VEN = | bronze_VEN = | gold_VIE = | silver_VIE = | bronze_VIE = | gold_VIN = | silver_VIN = | bronze_VIN = | gold_YEM = | silver_YEM = | bronze_YEM = | gold_ZAM = | silver_ZAM = | bronze_ZAM = | gold_ZIM = | silver_ZIM = | bronze_ZIM = }} |
旗帜模板
如果{{{event}}}和{{{flag_template}}}均已给定,则每一行的队伍列将会自动生成代码:{{<flag_template>|<IOC>|<event>}}
。
示例如下:
{{Medals table | event = 2018年冬季 | flag_template = FlagIOCteam | nation1 = USA | nation2 = CAN }}
上述代码所列出的两个国家分别显示为 美国(USA)和 加拿大(CAN)。
示例1
{{Medals table | caption = | host = | show_limit = | remaining_text = | flag_template = | event = | gold_FRA = 7 | silver_FRA = 4 | bronze_FRA = 4 | gold_GBR = 5 | silver_GBR = 5 | bronze_GBR = 5 | gold_USA = 5 | silver_USA = 3 | bronze_USA = 2 | gold_AUS = 3 | silver_AUS = 5 | bronze_AUS = 7 | gold_RSA = 3 | silver_RSA = 4 | bronze_RSA = 3 | gold_GER = 1 | silver_GER = 3 | bronze_GER = 3 }}
排名 | 国家 / 地区 | 金牌 | 銀牌 | 銅牌 | 总计 |
---|---|---|---|---|---|
1 | 法國(FRA) | 7 | 4 | 4 | 15 |
2 | 英國(GBR) | 5 | 5 | 5 | 15 |
3 | 美国(USA) | 5 | 3 | 2 | 10 |
4 | 澳大利亞(AUS) | 3 | 5 | 7 | 15 |
5 | 南非(RSA) | 3 | 4 | 3 | 10 |
6 | 德国(GER) | 1 | 3 | 3 | 7 |
总计(共6个国家 / 地区) | 24 | 24 | 24 | 72 |
示例2
{{Medals table | caption = 2015年冬季世界大学生运动会奖牌榜 | host = SVK | host_note = <ref>[http://wuni15.sportresult.com/HIDE/en/MedalTally?sport=00&medalKind=DefaultSports Medal Tally]</ref> | flag_template = flagIOC2 | event = 2015年冬季世界大學運動會 | team = | gold_RUS = 9 | silver_RUS = 9 | bronze_RUS = 9 | gold_KOR = 5 | silver_KOR = 5 | bronze_KOR = 5 | gold_ITA = 4 | silver_ITA = 4 | bronze_ITA = 4 | gold_1 = 1 | silver_1 = 1 | bronze_1 = 0 | name_1 = 独立运动员 | skip_1 = yes | note_1 = <ref>这是一个注释</ref> | gold_SVK = 0 | silver_SVK = 0 | bronze_SVK = 1 | host_SVK = yes }}
排名 | 国家 / 地区 | 金牌 | 銀牌 | 銅牌 | 总计 |
---|---|---|---|---|---|
1 | 俄罗斯 | 9 | 9 | 9 | 27 |
2 | 韩国 | 5 | 5 | 5 | 15 |
3 | 意大利 | 4 | 4 | 4 | 12 |
– | 独立运动员[2] | 1 | 1 | 0 | 2 |
4 | 斯洛伐克* | 0 | 0 | 1 | 1 |
总计(共4个国家 / 地区) | 19 | 19 | 19 | 57 |
- ^ Medal Tally
- ^ 这是一个注释