Difference between revisions of "Template:Infobox league"
m |
m |
||
Line 330: | Line 330: | ||
Categories | Categories | ||
+ | <!-- | ||
+ | |||
+ | SMW | ||
+ | |||
+ | -->{{#vardefine:earliest|{{#ask:[[Has tournament::{{{firstmatch|{{PAGENAME}}}}}]] [[Has map date::+]] | ||
+ | |?# | ||
+ | |?Has map date | ||
+ | |format=earliest | ||
+ | }}}}<!-- | ||
+ | -->{{#if:{{{sdate|{{{date|}}}}}}|{{#set: | ||
+ | |has first match date={{#var:earliest|{{{sdate|{{{date|}}}}}} 0:00}} | ||
+ | }}}}<!-- | ||
+ | -->{{#set: | ||
+ | |has name={{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}} | ||
+ | |has tournament name={{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}} | ||
+ | |has tournament server={{{server|}}} | ||
+ | |has tournament series={{{series|}}} | ||
+ | |has image={{#if:{{{image|}}}|File:{{{image}}}}} | ||
+ | |has image caption={{{caption|}}} | ||
+ | |has number={{{number|}}} | ||
+ | |has tournament type={{{type|}}} | ||
+ | |has tournament location={{{country|}}} | ||
+ | |has tournament format={{{format|}}} | ||
+ | |has city={{{city|{{{type|}}} }}} | ||
+ | |has country2={{{country2|}}} | ||
+ | |has city2={{{city2|}}} | ||
+ | |has country3={{{country3|}}} | ||
+ | |has city3={{{city3|}}} | ||
+ | <!--|has abbreviation={{{abbreviation|{{#show: {{{series|}}}| ?has abbreviation |default= }} }}}--> | ||
|has start date={{#if:{{{sdate|}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}} | |has start date={{#if:{{{sdate|}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}} | ||
|has date={{#if:{{{date|}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}}} | |has date={{#if:{{{date|}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}}} | ||
|has end date={{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}} | |has end date={{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}} | ||
+ | |has month and day={{#sub:{{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{#time:Y-m-d|{{{edate|}}}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{#time:Y-m-d|{{{date|}}}}}|-XX|}}|-??|}}}}}}|5|5}} | ||
+ | |||
+ | |||
+ | |has organizer={{{organizer|}}} | ||
+ | |has organizer2={{{organizer2|}}} | ||
+ | |has organizer3={{{organizer3|}}} | ||
+ | |has organizer4={{{organizer4|}}} | ||
+ | |has sponsor={{{sponsor|}}} | ||
+ | |has tournament type={{{type|}}} | ||
+ | |has tlpd={{{tlpd|}}} | ||
+ | |has edition={{{edition|}}} | ||
+ | |has prizepool={{{prizepool|}}} | ||
+ | |has prizepool in usd={{{prizepoolusd|{{{prizepool|}}}}}} | ||
+ | |has site={{{web|}}} | ||
+ | |has liquipedia tier={{{liquipediatier|}}} | ||
+ | |has liquipedia tear team={{{liquipediatierteam|}}} | ||
+ | |has stream={{{stream|}}} | ||
+ | |has player number={{{player_number|}}} | ||
+ | |has protoss number={{{protoss_number|}}} | ||
+ | |has terran number={{{terran_number|}}} | ||
+ | |has zerg number={{{zerg_number|}}} | ||
+ | |has random number={{{random_number|}}} | ||
+ | |has ticker name={{#if:{{{tickername|}}}|{{{tickername}}}|{{{name|}}}}} | ||
+ | |||
+ | |has first place player page={{#titleparts: {{#replace:{{{idfirst|}}}|{{!}}|/}} | 1}} | ||
+ | |has first place player id={{#titleparts: {{#replace:{{{idfirst|}}}|{{!}}|/}} || -1}} | ||
+ | |has first place player race={{{racefirst|}}} | ||
+ | |has first place player flag={{{flagfirst|}}} | ||
+ | |has second place player page={{#titleparts: {{#replace:{{{idsecond|}}}|{{!}}|/}} | 1}} | ||
+ | |has second place player id={{#titleparts: {{#replace:{{{idsecond|}}}|{{!}}|/}} || -1}} | ||
+ | |has second place player race={{{racesecond|}}} | ||
+ | |has second place player flag={{{flagsecond|}}} | ||
+ | |has third place player page={{#titleparts: {{#replace:{{{idthird|}}}|{{!}}|/}} | 1}} | ||
+ | |has third place player id={{#titleparts: {{#replace:{{{idthird|}}}|{{!}}|/}} || -1}} | ||
+ | |has third place player race={{{racethird|}}} | ||
+ | |has third place player flag={{{flagthird|}}} | ||
+ | |has third2 place player page={{#titleparts: {{#replace:{{{idthird2|}}}|{{!}}|/}} | 1}} | ||
+ | |has third2 place player id={{#titleparts: {{#replace:{{{idthird2|}}}|{{!}}|/}} || -1}} | ||
+ | |has third2 place player race={{{racethird2|}}} | ||
+ | |has third2 place player flag={{{flagthird2|}}} | ||
+ | |has team participants={{{team_number|}}} | ||
+ | |has first place team={{{team1|}}} | ||
+ | |has second place team={{{team2|}}} | ||
+ | |has third place team={{{team3|}}} | ||
+ | |has fourth place team={{{team4|}}} | ||
+ | |||
+ | |has map 1={{#explode:{{{map1|}}}|{{!}}|0}} | ||
+ | |has map 2={{#explode:{{{map2|}}}|{{!}}|0}} | ||
+ | |has map 3={{#explode:{{{map3|}}}|{{!}}|0}} | ||
+ | |has map 4={{#explode:{{{map4|}}}|{{!}}|0}} | ||
+ | |has map 5={{#explode:{{{map5|}}}|{{!}}|0}} | ||
+ | |has map 6={{#explode:{{{map6|}}}|{{!}}|0}} | ||
+ | |has map 7={{#explode:{{{map7|}}}|{{!}}|0}} | ||
+ | |has map 8={{#explode:{{{map8|}}}|{{!}}|0}} | ||
+ | |has map 9={{#explode:{{{map9|}}}|{{!}}|0}} | ||
+ | }}<!-- | ||
− | {{#vardefine:tournament_date|{{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}}}} | + | ----- VARIABLES (used within the prize pool templates) ----- |
− | {{#vardefine:date|{{#if:{{{date|}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}}}} | + | -->{{#vardefine:tournament_name|{{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}}}}<!-- |
− | {{#vardefine:sdate|{{#if:{{{sdate|}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}}}}} | + | -->{{#vardefine:tournament_series|{{{series|}}}}}<!-- |
− | {{#vardefine:edate|{{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}}}}} | + | -->{{#vardefine:tournament_tier|{{{liquipediatier|}}}}}<!-- |
+ | -->{{#vardefine:tournament_date|{{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}}}}<!-- | ||
+ | -->{{#vardefine:date|{{#if:{{{date|}}}|{{#ifeq:{{lc:{{{date|}}}}}|tba||{{#replace:{{#replace:{{{date|}}}|-XX|}}|-??|}}}}}}}}<!-- | ||
+ | -->{{#vardefine:sdate|{{#if:{{{sdate|}}}|{{#ifeq:{{lc:{{{sdate|}}}}}|tba||{{#replace:{{#replace:{{{sdate|}}}|-XX|}}|-??|}}}}}}}}<!-- | ||
+ | -->{{#vardefine:edate|{{#if:{{{edate|}}}|{{#ifeq:{{lc:{{{edate|}}}}}|tba||{{#replace:{{#replace:{{{edate|}}}|-XX|}}|-??|}}}}}}}} | ||
+ | }} | ||
--></includeonly><noinclude>[[Category:Infoboxes]] [[Category:Leagues]]{{documentation}}</noinclude> | --></includeonly><noinclude>[[Category:Infoboxes]] [[Category:Leagues]]{{documentation}}</noinclude> |
Revision as of 18:15, 19 September 2017
Documentation (view - edit)
Single-Elimination Bracket (Bo3)
(≃ $599,911.23 USD)
}}
--> An Infobox is one of the standard features of any QWiki page and it's no different for tournaments and leagues. The {{Infobox league}}-template should come before the article text start.
Code Explanation
{{Infobox league
- This brings out the template you will be using.
|name=DreamHack Winter 2025
|year=2023
- Set year to get categorization right
|image=no_img.png
|organizer=DreamHack
|admin=
|founder=
- You can add up to 4 organizers and 5 admins, 1 founder. Like this: organizer2 - admin4 etc. Please use the player template with flags, like this {{player|ocoini|flag=no}}.
|sponsor= [http://www.madeupsite.com/ madeupsite]
|type=Online
- Either Offline, Online or Hybrid.
|country=Sweden
- The country or continent in which the event takes place.
|city=Jönköping
- For offline events, the city in which the event takes place. If both the city and country fields are filled, the city will appear next to the country flag in one single line named Location (as in the example infobox).
|venue=[http://www.elmia.se Elmia]
- For offline events, the venue in which the event takes place.
|format=Group Stage ({{Abbr/Bo1}})<br /> Single-Elimination Bracket ({{Abbr/Bo3}})
- The format variable should be a short description of the match format and the tournament format (like: "Round Robin"/"Group Stage"/"GSL Groups", "Single-Elimination Bracket" or "Double-Elimination Bracket"). Every stage format should be separated by a line-break (<br />)
List of some possible formats:
Group Stage/Round-Robin/GSL Groups:
|format=GSL Groups ({{Abbr/Bo1}}) |format=GSL Groups ({{Abbr/Bo3}})
Tournament Example:
This example is provided for a tournament with a GSL Group (Bo1) stage and a Double-Elimination Bracket (Bo3+Bo5)
|format=GSL Groups ({{Abbr/Bo1}})<br /> Double-Elimination Bracket ({{Abbr/Bo3}} + {{Abbr/Bo5}})
|prizepool=6,000
- The size of the prize pool for the tournament and. Add currency after value.
|prizepoolusd=5,000
- The size of the prize pool for the tournament in USD if the tournament prize pool is not in USD.
|date= ''2010-10-10''
|sdate= ''2010-10-10''
|edate= ''2010-10-17''
- Date of event or if it spans multiple days, you can instead add start and end date. Please try to use the ISO 8601 date standard (YYYY-MM-DD) with the normal "hyphen-minus" (-) as a seperator.
|website=www.quakeworld.nu
- Make a website link for the tournament. Can list multiple with website1 etc. For multiple links, use |website2=, |website3=, |website4=.
|discord=discord.quake.world
- Make a link to tournament Discord.
|twitch=qwiki
- Make a Twitch link for the tournament. Note that only the part after twitch.tv/ should be in the field. For multiple links, use |twitch2=, |twitch3=, |twitch4=.
|youtube=qwiki
- Make a Youtube link for the tournament. Note that only the part after youtube.com/ should be in the field. For multiple links, user |youtube2=, |youtube3=, |youtube4=.
|facebook=qwiki
- Make a Facebook link for the tournament. Note that only the part after facebook.com/ should be in the field.
|twitter=qwiki
- Make a Twitter link for the tournament. Note that only the part after twitter.com/ should be in the field.
|teamfirst=
|teamsecond=
|teamthird=
- These are the team placings in the tournament, just like with the ids there's teamthird2 and teamfourth variables. And just like for organizers these will link automatically to a page with the same name as you've entered if there is one.
|team_number=
- Used to provide information of how many team slots are available for the tournament, often used in qualifiers that are not filled.
|teamX=
- These are to be used for team tournaments team_number sets the number of teams playing in the league. team1 - team16 lists up to 16 possible teams, for a league with more teams than this just leave these fields blank and make a list on the page.
|mapX=
- These are to be used for maps in the torunaments map poool, mapX sets the number of maps available for the league. map1 - map10 lists up to 10 possible maps.
|previous=
|next=
- Links to the previous and next editions of the serie/tournament.
}}
- Ends the use of the template, without this the template will not work.
Adapted from Liquipedia