Difference between revisions of "Template:League infobox"

From LFS Manual
Jump to navigationJump to search
(Added an example infobox)
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<!-- EDIT ONLY IF YOU KNOW WHAT YOU ARE DOING -->
 
<!-- EDIT ONLY IF YOU KNOW WHAT YOU ARE DOING -->
{| width="250" align="right" cellspacing="5" style="border: 1px solid #000000; background-color: #FAFAFA;"
+
{| width="250" align="right" cellspacing="5" style="border: 1px solid #000000; background-color: #FAFAFA; margin:7px"
 
! colspan="2" style="background-color: #DFDFDF;" | <div style="text-align: center; position: relative; font-size:15px;">{{{name}}}<div style="position: absolute; right: 0; top: 0; margin: 0 2px; font-size:8px;">[[Template:League infobox|v]]</div></div>
 
! colspan="2" style="background-color: #DFDFDF;" | <div style="text-align: center; position: relative; font-size:15px;">{{{name}}}<div style="position: absolute; right: 0; top: 0; margin: 0 2px; font-size:8px;">[[Template:League infobox|v]]</div></div>
 
|-
 
|-
| colspan="2" align="center" | [[Image:{{{logo}}}|235px]]
+
| colspan="2" align="center" | [[Image:{{{logo}}}|{{#if:{{{logosize|}}}|{{{logosize}}}|235}}px]]
 
|-  
 
|-  
 
| style="vertical-align: top;" | '''League type'''
 
| style="vertical-align: top;" | '''League type'''
 
| {{{type}}}
 
| {{{type}}}
 
|-  
 
|-  
| {{#if:{{{firstseason|}}}|'''First season'''| }}
+
| style="vertical-align: top;" | '''Signup'''
| {{#if:{{{firstseason|}}}|{{{firstseason}}}| }}
+
| {{#ifeq:{{{signup}}}|yes|Required|}}{{#ifeq:{{{signup}}}|no|Not required|}}
 
|-  
 
|-  
| {{#if:{{{seasons|}}}|'''Seasons'''| }}
+
| style="vertical-align: top;" | {{#if:{{{license|}}}|'''License'''|}}
| {{#if:{{{seasons|}}}|{{{seasons}}} seasons| }}
+
| {{#ifeq:{{{license}}}|Demo|Demo|}}{{#ifeq:{{{license}}}|S1|S1|}}{{#ifeq:{{{license}}}|S2|S2|}}{{#ifeq:{{{license}}}|S3|S3|}}{{#ifeq:{{{license}}}|Various|Various|}}
 +
|-
 +
| style="vertical-align: top;" | {{#if:{{{prizepoolcurrency|}}}| |}}{{#if:{{{prizepoolcurrency}}}| |}}{{#if:{{{prizepool|}}}|'''Prize pool'''|}}
 +
| {{#ifeq:{{{prizepoolcurrency}}}|eur|€{{{prizepool}}} EUR}}{{#ifeq:{{{prizepoolcurrency}}}|usd|${{{prizepool}}} USD|}}{{#ifeq:{{{prizepoolcurrency}}}||{{{prizepool}}}|}}
 +
|-
 +
| style="vertical-align: top;" | {{#if:{{{firstseason|}}}|'''First season'''|}}
 +
| {{#if:{{{firstseason|}}}|{{{firstseason}}}|}}
 +
|-
 +
| style="vertical-align: top;" | {{#if:{{{yearsactive|}}}|'''Years active'''|}}
 +
| {{#if:{{{yearsactive|}}}|{{{yearsactive}}}|}}
 +
|-
 +
| style="vertical-align: top;" | {{#if:{{{seasons|}}}|'''Seasons'''|}}
 +
| {{#if:{{{seasons|}}}|{{{seasons}}} seasons|}}
 
|-
 
|-
| {{#if:{{{admins|}}}|'''Administrators'''| }}
+
| style="vertical-align: top;" | {{#if:{{{orgs|}}}|'''Organizers'''|}}
| {{#if:{{{admins|}}}|{{{admins}}}| }}
+
| {{#if:{{{orgs|}}}|{{{orgs}}}|}}
 
|-
 
|-
 
! colspan="2" style="background-color: #DFDFDF;" | <div style="text-align: center; position: relative;">[{{{website}}} Official website]</div>
 
! colspan="2" style="background-color: #DFDFDF;" | <div style="text-align: center; position: relative;">[{{{website}}} Official website]</div>
Line 24: Line 36:
 
* '''name:''' name of the league
 
* '''name:''' name of the league
 
* '''logo:''' a picture from the shared repository. Format: BestLeagueLogo.jpg
 
* '''logo:''' a picture from the shared repository. Format: BestLeagueLogo.jpg
* '''type:''' the type of the league (for example Endurance League, Single Seater League, Mixed Classes League, GTR League, Drift League, 24h Race, Single Event)
+
* '''type:''' the type of the league (for example Endurance league, Single seater league, Mixed classes league, GTR league, Drift league, 24h Race, Single event series)
* '''website:''' website of the league. Format: http://bestleague.org
+
* '''signup:''' is there a signup requirement or not? You have to input one of the following: yes / no
 +
* '''license:''' the minimum required license to participate in the league, you have to input one of the following: Demo / S1 / S2 / S3 / Various
 +
* '''website:''' website or forum of the league. Format: http://bestleague.org
 +
 
 
=== Optional parameters ===
 
=== Optional parameters ===
* '''firstseason:''' a year, when the first season of the league was concluded
+
* '''logosize:''' the width of the displayed logo, in pixels. You shouldn't need to use this, as if it's not given, the default value will be used (235). Format: 220
* '''seasons:''' a number of seasons
+
* '''prizepoolcurrency:''' if there is a prize pool, choose currency. When used, prizepool is required. Currently supported currencies: $ USD and € EUR. Format: usd
* '''admins:''' list of the admins. Format: StrictAdmin1, KindAdmin2, AFKAdmin3
+
** '''prizepool:''' if there is a prize pool, input number only. Format: 1000
 +
* '''firstseason:''' a year, when the first season of the league was concluded. Format: 2010
 +
* '''yearsactive:''' a period when the league was active. Format: 2001–2006
 +
* '''seasons:''' a number of seasons. Format: 4
 +
* '''orgs:''' list of the organizers. Format: StrictOrganizer1, KindAdmin2, AFKAdmin3
 
=== Copy-paste format ===
 
=== Copy-paste format ===
 
<pre>
 
<pre>
Line 35: Line 54:
 
| name        =  
 
| name        =  
 
| logo        =  
 
| logo        =  
 +
| logosize    =
 
| type        =  
 
| type        =  
 +
| signup      =
 +
| license    =
 +
| prizepoolcurrency =
 +
| prizepool  =
 
| firstseason =  
 
| firstseason =  
 +
| yearsactive =
 
| seasons    =  
 
| seasons    =  
| admins      =  
+
| orgs        =  
 
| website    =  
 
| website    =  
 
}}
 
}}
 
</pre>
 
</pre>
 +
 
=== Example ===
 
=== Example ===
 
{{League infobox
 
{{League infobox
Line 47: Line 73:
 
| logo        = BL1.jpg
 
| logo        = BL1.jpg
 
| type        = Endurance League
 
| type        = Endurance League
| firstseason = 1945
+
| signup      = yes
| seasons    = 52
+
| license    = S2
| admins      = StrictAdmin1, AFKAdmin3
+
| prizepoolcurrency = usd
 +
| prizepool  = 1000
 +
| firstseason = 1542
 +
| yearsactive = 1542–1583
 +
| seasons    = 14
 +
| orgs        = StrictAdmin1, AFKAdmin3
 
| website    = http://lfsmanual.net
 
| website    = http://lfsmanual.net
 
}}
 
}}
</noinclude>
+
[[Category:Infobox templates]]</noinclude>

Revision as of 15:05, 11 April 2020

{{{name}}}
[[Image:{{{logo}}}|235px]]
League type {{{type}}}
Signup
[{{{website}}} Official website]

This template is used on pages of LFS leagues. Some parameters are REQUIRED (to avoid showing odd things in the infobox) and there are also optional parameters like season number and administrators of a league.

Template documentation

Required parameters

  • name: name of the league
  • logo: a picture from the shared repository. Format: BestLeagueLogo.jpg
  • type: the type of the league (for example Endurance league, Single seater league, Mixed classes league, GTR league, Drift league, 24h Race, Single event series)
  • signup: is there a signup requirement or not? You have to input one of the following: yes / no
  • license: the minimum required license to participate in the league, you have to input one of the following: Demo / S1 / S2 / S3 / Various
  • website: website or forum of the league. Format: http://bestleague.org

Optional parameters

  • logosize: the width of the displayed logo, in pixels. You shouldn't need to use this, as if it's not given, the default value will be used (235). Format: 220
  • prizepoolcurrency: if there is a prize pool, choose currency. When used, prizepool is required. Currently supported currencies: $ USD and € EUR. Format: usd
    • prizepool: if there is a prize pool, input number only. Format: 1000
  • firstseason: a year, when the first season of the league was concluded. Format: 2010
  • yearsactive: a period when the league was active. Format: 2001–2006
  • seasons: a number of seasons. Format: 4
  • orgs: list of the organizers. Format: StrictOrganizer1, KindAdmin2, AFKAdmin3

Copy-paste format

{{League infobox
| name        = 
| logo        = 
| logosize    = 
| type        = 
| signup      = 
| license     = 
| prizepoolcurrency = 
| prizepool   = 
| firstseason = 
| yearsactive =
| seasons     = 
| orgs        = 
| website     = 
}}

Example

Example League
BL1.jpg
League type Endurance League
Signup Required
License S2
Prize pool $1000 USD
First season 1542
Years active 1542–1583
Seasons 14 seasons
Organizers StrictAdmin1, AFKAdmin3