Pojdi na vsebino

Predloga:MedalCompetition

Iz Wikipedije, proste enciklopedije
Redakcija dne 14:35, 24. december 2014 od Pinky sl (pogovor | prispevki) (Kategorija:Predloge za infopolje medalje)
(razl) ← Starejša redakcija | prikaži trenutno redakcijo (razl) | Novejša redakcija → (razl)
{{{1}}}



Purpose

[uredi kodo]

Allows a medal list to include multiple competitions, e.g. Olympic Games, Commonwealth Games, World Championships, National Titles, Goodwill Games, Paralympic Games, etc.

Usage Example

[uredi kodo]
MedalCompetition
Seznam medalj
Athletics
Olympic Games
Zlato 2000 Sydney 400 m
Commonwealth Games
Bron 2006 Melbourne 400 m

The table on the right is produced with the code below:

{{MedalTableTop}}
{{MedalSport | [[Athletics (track and field)|]]}}
{{MedalCompetition|[[Olympic Games]]}}
{{Zlata medalja  | [[2000 Summer Olympics|2000 Sydney]] | 400 m }}
{{MedalCompetition|[[Commonwealth Games]]}}
{{Bronasta medalja | [[2006 Commonwealth Games|2006 Melbourne]] | 400 m }}
{{MedalBottom}}
[uredi kodo]

Serija predlog Infopolje medalje dovoljuje urejevalcem sestaviti seznam osnovnih medalj športnika na vrhu biografskega članka.

Uporaba

[uredi kodo]

Infopolje medalje se sestoji iz dveh predlog:

  • {{MedalTableTop}} – za začetek tabele (neobvezna slika)
  • {{Medalja}} – za več elementov znotraj tabele

Predloga ({{MedalBox}}) se uporablja za seznam medalj v sredini besedila članka.

Parametri

[uredi kodo]

MedalTableTop

[uredi kodo]
Michael Johnson
Alt text za sliko
Johnson na London Olympic Stadium
Seznam medalj
Moška atletika
Predstavnik ZDA
Osnovna uporaba
{{MedalTableTop|image=|imagesize=|alt=|caption=|name=|sport=|country_code=|medals=}}
  • image This give you the option to place a headline image in the infobox. Use just the file name and extension, excluding the namespace prefix, for example: MyImage.jpg not File:MyImage.jpg.
  • imagesize This adjusts the size of the image and must consist of a number followed by "px" (e.g. 150px). The default is 100px. Sizes over 200px are no recommended for typical usage.
  • alt This provides a description of the image for accessibility users or those using weak connections
  • caption This adds a short description to describe the image. Try to be brief, using just a few words.
  • name This option adjusts the title that appears at the top of the box. This should typically be the athlete's common name. By default it will display the article title without the disambiguator, for example on Michael Johnson (sprinter) "Michael Johnson" will appear by default. To deactivate the title enter no in the field.
  • header This optional field can be used to change the text in the opening "Medal record" section. This is useful when the template appears in a section of an article. See Michael Phelps for a working example.
  • sport This option includes the athlete's sport (e.g. Men's swimming) in the first line of the medal record. This replaces the need for {{Medal|Sport}} when an athlete has medalled in only one sport. In cases where an athlete has competed in multiple sports, it is still possible to use the {{Medal|Sport}} template usage to list the different sports.
  • country_code This option uses the country code (e.g. USA = United States, CHN = China, GBR2 = Great Britain) to generate the country that the athlete represents in the second line of the medal record. This replaces the need for {{Medal|Country}} when an athlete has competed for only one country. In cases where an athlete has represented multiple countries, it is still possible to use the {{Medal|Country}} template usage to list the different countries.
  • medals This is the only compulsory field as this is used to place medals and descriptions within the infobox through the {{Medal}} template. To work correctly it must be the last field in the main template.

Medalja

[uredi kodo]
Seznam medalj
Moška atletika
Predstavnik ZDA
Olimpijske igre
Zlato 2012 TEST 100 m
Srebro 2012 TEST 100 m
Bron 2012 TEST 100 m
Zmaga 2012 TEST 100 m
Drugi 2012 TEST 100 m
Drugi 2012 TEST 100 m
Tretji 2012 TEST 100 m
Playoffs 2012 TEST 100 m
Diskv. 2012 TEST 100 m
Moški bob
Predstavnik države Zastava Jamajke Jamajka
World Bobsled Championships
Diskv. 2013 TEST Bob

The Medal template is a multi-purpose one which allows for all varieties of entries within the medal table.

Basic usage
{{Medal|TYPE|FIELD1|FIELD2}}

There are four major types:

  • Competition This states the general competition at which the following medals were achieved (e.g. Olimpijske igre, Pan Pacific Swimming Championships)
  • Medal performances: There are ten types of medal performances. These contain two separate fields for the year of the competition and its location (e.g. 2008 Beijing, 2010 Delhi) and the medalling event or category (e.g. pole vault, 56 kg, 50 m freestyle). The medal types are (with shortcut in brackets):
    • Gold (G)
    • Silver (S)
    • Bronze (B)
    • Winner (W)
    • Runnerup (RU)
    • Second (2nd)
    • Third (3rd)
    • Playoffs (PO)
    • Disqualified (DQ)
Seznam medalj
Medalja Pierra de Coubertina 2012

The final type (TrueSpirit) is used for the Medalja Pierra de Coubertina. This has only one extra field for the year it was awarded.

Seznam medalj
Diskv. 2012 TEST 100 m[1]

For the disqualified medal template, it is possible to create a reference directly after the template to explain the reason for disqualification. This can be particularly useful in the case of relay runners disqualified through no fault of their own, due to doping by team mates for example.

  1. Reason for disqualification
Multiple countries/sports

Where an athlete has competed for multiple countries or in multiple sports it will be necessary to use the Country or Sport Medal types, in addition to the main sport and country_code listings in the MedalTableTop template

  • Country This is usually the first section showing the person's relevant country (or team). Enter the country's three letter code in curly brackets (e.g. {{CHN}} ), including "the" where appropriate (e.g. the {{USA}} ). In rare cases the correct input may be something else (e.g. a team name). Independent is used for independent athletes.
  • Sport This states the sport that the athlete is competing in (e.g. Women's swimming)

MedalBox

[uredi kodo]
Mednarodne medalje
Moški hokej na ledu
Predstavnik države  Kanada
Svetovno prvenstvo
Srebro 1989 Sweden Hokej na ledu

The MedalBox template has a similar output to the MedalTableTop template, but it is specifically designed for non-infobox usages (i.e. mid-article boxes).

Basic usage
{{MedalBox|color=|title=|sport=|country=|medals=}}
  • color This option changes the color of the box header. If omitted, the default is light grey.
  • title This parameter allows you to customise the box title. If omitted, the default is "Medal record".
  • sport This displays the athlete's primary sport (e.g. "Moški hokej na ledu"). This option supersedes the "Medal|Sport" template function.
  • country This displays the athlete's primary country or team (e.g. "{{CAN}}"). This option supersedes the "Medal|Country" template function.
  • medals This is the only compulsory field as this is used to place medals and descriptions within the box through the {{Medal}} template. To work correctly it must be the last field in the main template.

Primeri

[uredi kodo]

Za tekmovalce, ki so tekmovali v enem športu za eno državo, mora biti predloga sestavljena v sledečem vrstnem redu: Sport, Country, Competition1, Award, Competition2, Award and so on.

{{MedalTableTop|image=Example-serious.jpg|imagesize=150px|alt=Alt text za sliko|name=Ime športnika
|sport=Moška [[atletika]]|country_code=AUS|medals=
{{Medal|Competition|[[Olimpijske igre]]}}
{{Medal|Gold|[[Poletne olimpijske igre 2000|Sydney 2000| [[Atletika na Poletnih olimpijskih igrah 2000|100 m]] }}
{{Medal|Competition|[[Igre Commonwealtha]]}}
{{Medal|Silver|[[Igre Commonwealtha 2006|Melbourne 2006]] | 200 m }}
{{Medal|Bronze|2006 Melbourne | 400 m }}
}}

{{MedalTableTop|image=Example-serious.jpg|imagesize=150px|alt=Alt text za sliko|name=Ime športnika|sport=Moška atletika|country_code=AUS|medals=

|- style="text-align:center;vertical-align:middle;background-color:#cccccc;" |colspan ="3"| Olimpijske igre {{Medal|Gold | [[Poletne olimpijske igre 2000|Sydney 2000| 100 m }}

|- style="text-align:center;vertical-align:middle;background-color:#cccccc;" |colspan ="3"| Igre Commonwealtha

|- style="text-align:center;vertical-align:middle;background-color:white;" |style="background-color:silver" | Srebro|| Igre Commonwealtha 2006|| Melbourne 2006]]

|- style="text-align:center;vertical-align:middle;background-color:white;" |style="background-color:#cc9966" | Bron|| 2006 Melbourne || 400 m }}

Primer: Tekmovalec, ki je prejel medalje v različnih športih in tekmoval za eno državo
MedalCompetition
Seznam medalj
Predstavnik  Združeno kraljestvo
Žensko veslanje
Olimpijske igre
Srebro Atene 2004 Dvojni četverec
Žensko dirkališčno kolesarstvo
Olimpijske igre
Zlato Peking 2008 Zasledovalna vožnja - posamezniki

Za tekmovalce, ki so prejeli medalje v različnih športih in tekmovali za eno državo. Prikazan primer temelji na Rebecca Romero.

Primer: Tekmovalec, ki je prejel medalje v enem športu, tekmoval pa za različne države
MedalCompetition
Seznam medalj
Ženski badminton
Olimpijske igre
Predstavnik države Zastava Indonezije Indonezija
Srebro Atlanta 1996 Posamezno
Predstavnik države Zastava Nizozemske Nizozemska
Srebro Atene 2004 Posamezno

For competitors who have won medals in the same sport at the same competition, competing for different countries, the templates should be ordered Sport, Competition, Country1, Award, Country2, Award itd. Prikazan primer temelji na Mia Audina.

MedalCompetition
Seznam medalj
Ženski badminton
Predstavnik države Zastava Danske Danska
Olimpijske igre
Srebro Atlanta 1996 Posamezno
Evropska prvenstva
Bron Malmö 2002 Posamezno
Predstavnik države Zastava Švedske Švedska
Olimpijske igre
Srebro Atene 2004 Posamezno

Za tekmovalce, ki so osvojili več medalj v enem športu na različnih tekmovanjih, za različne države, mora biti predloga sestavljena v sledečem vrstnem redu: Sport, Country1, Competition1, Award, Competition2, Award, Country2, Competition1, Award and so on.

Medalbox

[uredi kodo]

Osnovni prikaz uporabe predloge MedalBoxe:

{{MedalBox|title=Mednarodne medalje|sport=Moški [[hokej na ledu]]|country={{ih|CAN}}|medals=
{{Medal|Competition|[[World Junior Ice Hockey Championships|World Junior Championships]]}}
{{Medal|Gold|[[2005 World Junior Ice Hockey Championships|2005 Grand Forks]]|}}
{{Medal|Silver|[[2004 World Junior Ice Hockey Championships|2004 Helsinki]]|}}
{{Medal|Competition|[[IIHF World U18 Championships|World Junior U18 Championships]]}}
{{Medal|Gold|[[2003 IIHF World U18 Championships|2003 Yaroslavl]]|}}
{{Medal|Competition|[[Ivan Hlinka Memorial Tournament|Eight Nations Cup]]}}
{{Medal|Gold|[[2002 Ivan Hlinka Memorial Tournament|2002 Slovakia]]|}}
}}
Mednarodne medalje
Moški hokej na ledu
Predstavnik države  Kanada
World Junior Championships
Zlato 2005 Grand Forks
Srebro 2004 Helsinki
World Junior U18 Championships
Zlato 2003 Yaroslavl
Eight Nations Cup
Zlato 2002 Slovakia


Pretekle predloge

[uredi kodo]
Deprecated TableTop templates
{{MedalTop}} in {{MedalTopPic}} – use {{MedalTableTop}} with {{Medal|Competition|Olimpijske igre}}
{{MedalTop3}} – (for Paralympic Games) use {{MedalTableTop}}
{{MedalTableTopPic}} – uporabite {{MedalTableTop}} z istimi parametri
Deprecated Competition templates
{{MedalOlympic}} – use {{Medal|Competition|Olimpijske igre}}
{{MedalParalympic}} – use {{Medal|Competition|[Paraolimpiske igre]]}}
{{MedalWorldChampionships}} – use {{Medal|Competition|Svetovno prvenstvo}}
{{MedalEuropeanChampionships}} – use {{Medal|Competition|Evropsko prvenstvo}}
Deprecated Medal templates

{{MedalGold}}
{{MedalSilver}}
{{MedalBronze}}

Za tekmovanja, ki ne uporabljajo terminologije Gold, Silver in Bronze {{MedalW}}
{{MedalRU}}

Nezaželene predloge za zaključevanje infopolja

{{MedalBottom}} - tabela se sedaj zaključi avtomatsko z uporabo parametra |medals= in s prestavitvijo dveh zavitih oklepajev na dno predloge.