Template:Ranking: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude><!--</noinclude>{| class="wikitable" style="float:left"
<includeonly>{| class="wikitable" style="float:left;margin-right:1em"
{{#if:{{{head|}}}|
{{#if:{{{head|}}}|
!colspan={{#if:{{{country1|}}}|4|3}}{{!}}{{{head}}}
!colspan="100%"{{!}}{{{head}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}
|-
|-
|'''1st||{{{player1|}}}{{#if:{{{country1|}}}|{{!}}{{!}}[[File:Flag of {{{country1}}}.png|25px|link=wikipedia:{{{country1}}}]]}}||{{{score1|}}}
|'''1st'''||{{{player1|}}}{{#if:{{{country1|}}}|{{!}}{{!}}[[File:Flag of {{{country1}}}.png|25px|link=wikipedia:{{{country1}}}]]}}||{{{score1|}}}
|style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"|
|-
|-
|'''{{#ifexpr:{{{score1}}}={{{score2}}}|1st|2nd}}||{{{player2|}}}{{#if:{{{country2|}}}|{{!}}{{!}}[[File:Flag of {{{country2}}}.png|25px|link=wikipedia:{{{country2}}}]]}}||{{{score2|}}}
|'''{{#ifexpr:{{{score1}}}={{{score2}}}|1st|2nd}}'''||{{{player2|}}}{{#if:{{{country2|}}}|{{!}}{{!}}[[File:Flag of {{{country2}}}.png|25px|link=wikipedia:{{{country2}}}]]}}||{{{score2|}}}
|style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"|
|-
|-
|'''{{#ifexpr:{{{score2}}}={{{score3}}}|2nd|3rd}}||{{{player3|}}}{{#if:{{{country3|}}}|{{!}}{{!}}[[File:Flag of {{{country3}}}.png|25px|link=wikipedia:{{{country3}}}]]}}||{{{score3|}}}
|'''{{#ifexpr:{{{score2}}}={{{score3}}}|2nd|3rd}}'''||{{{player3|}}}{{#if:{{{country3|}}}|{{!}}{{!}}[[File:Flag of {{{country3}}}.png|25px|link=wikipedia:{{{country3}}}]]}}||{{{score3|}}}
|style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"|
{{#if:{{{player4|}}}|{{!-}}
{{#if:{{{player4|}}}|
{{!}}'''{{#ifexpr:{{{score3}}}={{{score4}}}|3rd|4th}}'''{{!}}{{!}}{{{player4|}}}{{#if:{{{country4|}}}|{{!}}{{!}}[[File:Flag of {{{country4}}}.png|25px|link=wikipedia:{{{country4}}}]]}}{{!}}{{!}}{{{score4|}}}
}}{{#if:{{{player5|}}}|<nowiki/>
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score3}}}={{{score4}}}|3th|4th}}{{!}}{{!}}{{{player4|}}}{{#if:{{{country4|}}}|{{!}}{{!}}[[File:Flag of {{{country4}}}.png|25px|link=wikipedia:{{{country4}}}]]}}{{!}}{{!}}{{{score4|}}}
{{!}}'''{{#ifexpr:{{{score4}}}={{{score5}}}|4th|5th}}'''{{!}}{{!}}{{{player5|}}}{{#if:{{{country5|}}}|{{!}}{{!}}[[File:Flag of {{{country5}}}.png|25px|link=wikipedia:{{{country5}}}]]}}{{!}}{{!}}{{{score5|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player6|}}}|<nowiki/>
{{#if:{{{player5|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score4}}}={{{score5}}}|4th|5th}}{{!}}{{!}}{{{player5|}}}{{#if:{{{country5|}}}|{{!}}{{!}}[[File:Flag of {{{country5}}}.png|25px|link=wikipedia:{{{country5}}}]]}}{{!}}{{!}}{{{score5|}}}
{{!}}'''{{#ifexpr:{{{score5}}}={{{score6}}}|5th|6th}}'''{{!}}{{!}}{{{player6|}}}{{#if:{{{country6|}}}|{{!}}{{!}}[[File:Flag of {{{country6}}}.png|25px|link=wikipedia:{{{country6}}}]]}}{{!}}{{!}}{{{score6|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player7|}}}|<nowiki/>
{{#if:{{{player6|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score5}}}={{{score6}}}|5th|6th}}{{!}}{{!}}{{{player6|}}}{{#if:{{{country6|}}}|{{!}}{{!}}[[File:Flag of {{{country6}}}.png|25px|link=wikipedia:{{{country6}}}]]}}{{!}}{{!}}{{{score6|}}}
{{!}}'''{{#ifexpr:{{{score6}}}={{{score7}}}|6th|7th}}'''{{!}}{{!}}{{{player7|}}}{{#if:{{{country7|}}}|{{!}}{{!}}[[File:Flag of {{{country7}}}.png|25px|link=wikipedia:{{{country7}}}]]}}{{!}}{{!}}{{{score7|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player8|}}}|<nowiki/>
{{#if:{{{player7|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score6}}}={{{score7}}}|6th|7th}}{{!}}{{!}}{{{player7|}}}{{#if:{{{country7|}}}|{{!}}{{!}}[[File:Flag of {{{country7}}}.png|25px|link=wikipedia:{{{country7}}}]]}}{{!}}{{!}}{{{score7|}}}
{{!}}'''{{#ifexpr:{{{score7}}}={{{score8}}}|7th|8th}}'''{{!}}{{!}}{{{player8|}}}{{#if:{{{country8|}}}|{{!}}{{!}}[[File:Flag of {{{country8}}}.png|25px|link=wikipedia:{{{country8}}}]]}}{{!}}{{!}}{{{score8|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player9|}}}|<nowiki/>
{{#if:{{{player8|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score7}}}={{{score8}}}|7th|8th}}{{!}}{{!}}{{{player8|}}}{{#if:{{{country8|}}}|{{!}}{{!}}[[File:Flag of {{{country8}}}.png|25px|link=wikipedia:{{{country8}}}]]}}{{!}}{{!}}{{{score8|}}}
{{!}}'''{{#ifexpr:{{{score8}}}={{{score9}}}|8th|9th}}'''{{!}}{{!}}{{{player9|}}}{{#if:{{{country9|}}}|{{!}}{{!}}[[File:Flag of {{{country9}}}.png|25px|link=wikipedia:{{{country9}}}]]}}{{!}}{{!}}{{{score9|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player10|}}}|<nowiki/>
{{#if:{{{player9|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score8}}}={{{score9}}}|8th|9th}}{{!}}{{!}}{{{player9|}}}{{#if:{{{country9|}}}|{{!}}{{!}}[[File:Flag of {{{country9}}}.png|25px|link=wikipedia:{{{country9}}}]]}}{{!}}{{!}}{{{score9|}}}
{{!}}'''{{#ifexpr:{{{score9}}}={{{score10}}}|9th|10th}}'''{{!}}{{!}}{{{player10|}}}{{#if:{{{country10|}}}|{{!}}{{!}}[[File:Flag of {{{country10}}}.png|25px|link=wikipedia:{{{country10}}}]]}}{{!}}{{!}}{{{score10|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player11|}}}|<nowiki/>
{{#if:{{{player10|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score9}}}={{{score10}}}|9th|10th}}{{!}}{{!}}{{{player10|}}}{{#if:{{{country10|}}}|{{!}}{{!}}[[File:Flag of {{{country10}}}.png|25px|link=wikipedia:{{{country10}}}]]}}{{!}}{{!}}{{{score10|}}}
{{!}}'''{{#ifexpr:{{{score10}}}={{{score11}}}|10th|11th}}'''{{!}}{{!}}{{{player11|}}}{{#if:{{{country11|}}}|{{!}}{{!}}[[File:Flag of {{{country11}}}.png|25px|link=wikipedia:{{{country11}}}]]}}{{!}}{{!}}{{{score11|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}{{#if:{{{player12|}}}|<nowiki/>
{{#if:{{{player11|}}}|
{{!-}}
{{!-}}
{{!}}'''{{#ifexpr:{{{score10}}}={{{score11}}}|10th|11th}}{{!}}{{!}}{{{player11|}}}{{#if:{{{country11|}}}|{{!}}{{!}}[[File:Flag of {{{country11}}}.png|25px|link=wikipedia:{{{country11}}}]]}}{{!}}{{!}}{{{score11|}}}
{{!}}'''{{#ifexpr:{{{score11}}}={{{score12}}}|11th|12th}}'''{{!}}{{!}}{{{player12|}}}{{#if:{{{country12|}}}|{{!}}{{!}}[[File:Flag of {{{country12}}}.png|25px|link=wikipedia:{{{country12}}}]]}}{{!}}{{!}}{{{score12|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
}}
{{#if:{{{player12|}}}|
|}</includeonly><noinclude>
{{!-}}
{{!}}'''{{#ifexpr:{{{score11}}}={{{score12}}}|11th|12th}}{{!}}{{!}}{{{player12|}}}{{#if:{{{country12|}}}|{{!}}{{!}}[[File:Flag of {{{country12}}}.png|25px|link=wikipedia:{{{country12}}}]]}}{{!}}{{!}}{{{score12|}}}
{{!}}style="background-color:white;border-bottom-color:transparent;border-right-color:transparent;border-top-color:transparent"{{!}}}}
|}<noinclude>-->
{{br}}
==Description==
==Description==
With this template, you can create a ranking chart for players in a competition. The chart is flexible, repositioning itself relative to neighboring charts to fit within your screen or window. The template allows you to add up to 12 players, each listed with their name and score. Optionally, you can enter a country for each player, which returns a flag of that country that links to the country's Wikipedia article. There is also an optional "head" parameter which allows you to type out a header for the entire chart.
With this template, you can create a ranking chart for players in a competition. The chart is flexible, repositioning itself relative to neighboring charts to fit within your screen or window. The template allows you to add up to 12 players, each listed with their name and score. Optionally, you can enter a country for each player, which returns a flag of that country that links to the country's Wikipedia article. There is also an optional "head" parameter which allows you to type out a header for the entire chart.
If two or more players have identical scores, they will share the same ranking (i.e. "1st", "2nd", 3rd" etc.)


==Full syntax==
==Full syntax==
Line 100: Line 85:
==Example==
==Example==
Entering the following values:
Entering the following values:
<pre>
<pre>
{{ranking
{{ranking
Line 110: Line 96:
|player2 = Luigi
|player2 = Luigi
|country2 = USA
|country2 = USA
|score2 = 298
|score2 = 309


|player3 = Peach
|player3 = Peach
|country3 = UK
|country3 = Japan
|score3 = 298
|score3 = 309


|player4 = Bowser
|player4 = Bowser
|country4 = 143
|country4 = Japan
|score4 = UK
|score4 = 302
 
|player5 = Donkey Kong
|country5 = UK
|score5 = 300
}}
}}
</pre>
</pre>
Line 131: Line 121:
|player2=Luigi
|player2=Luigi
|country2=USA
|country2=USA
|score2=298
|score2=309
|player3=Peach
|player3=Peach
|country3=UK
|country3=Japan
|score3=298
|score3=309
|player4=Bowser
|player4=Bowser
|country4=UK
|country4=Japan
|score4=143
|score4=302
|player5=Donkey Kong
|country5=UK
|score5=300
}}
}}


[[Category:Content templates]]
[[Category:Content templates]]</noinclude>
</noinclude>

Latest revision as of 21:00, March 5, 2025

Description

With this template, you can create a ranking chart for players in a competition. The chart is flexible, repositioning itself relative to neighboring charts to fit within your screen or window. The template allows you to add up to 12 players, each listed with their name and score. Optionally, you can enter a country for each player, which returns a flag of that country that links to the country's Wikipedia article. There is also an optional "head" parameter which allows you to type out a header for the entire chart.

Full syntax

{{ranking
|head=
|player1=
|country1=
|score1=
|player2=
|country2=
|score2=
|player3=
|country3=
|score3=
|player4=
|country4=
|score4=
|player5=
|country5=
|score5=
|player6=
|country6=
|score6=
|player7=
|country7=
|score7=
|player8=
|country8=
|score8=
|player9=
|country9=
|score9=
|player10=
|country10=
|score10=
|player11=
|country11=
|score11=
|player12=
|country12=
|score12=
}}

Example

Entering the following values:

{{ranking
|head= March tournament

|player1 = Mario
|country1 = USA
|score1 = 310

|player2 = Luigi
|country2 = USA
|score2 = 309

|player3 = Peach
|country3 = Japan
|score3 = 309

|player4 = Bowser
|country4 = Japan
|score4 = 302

|player5 = Donkey Kong
|country5 = UK
|score5 = 300
}}

returns the following chart:

March tournament
1st Mario USA 310
2nd Luigi USA 309
2nd Peach Japan 309
4th Bowser Japan 302
5th Donkey Kong UK 300