Difference between revisions of "Template:Fb overview"

From blackwiki
Jump to navigation Jump to search
imported>Galobtter
imported>Frietjes
(using new lua version by User:Plastikspork, saving old version in sandbox for comparison in case something goes wrong)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="text-align:center"
+
{{#invoke:Sports overview|main}}<noinclude>
|-
+
{{documentation}}<!-- Add categories to the /doc subpage, not here! -->
! rowspan="2" | Competition
 
! colspan="8" | Record
 
|-
 
! {{Abbr|Pld|Games played}}
 
! {{Abbr|W|Games won}}
 
! {{Abbr|D|Games drawn}}
 
! {{Abbr|L|Games lost}}
 
! {{Abbr|GF|Goals for}}
 
! {{Abbr|GA|Goals against}}
 
! {{Abbr|GD|Goal difference}}
 
! {{Abbr|Win %|Winning percentage}}
 
|-
 
| {{{c1}}}
 
{{WDL|{{#expr:{{{w1}}}+{{{d1}}}+{{{l1}}}}}|{{{w1}}}|{{{d1}}}|{{{l1}}}|for={{{f1}}}|against={{{a1}}}|diff=yes}}
 
|- style="background:#EEEEEE"
 
| {{{c2}}}
 
{{WDL|{{#expr:{{{w2}}}+{{{d2}}}+{{{l2}}}}}|{{{w2}}}|{{{d2}}}|{{{l2}}}|for={{{f2}}}|against={{{a2}}}|diff=yes}}
 
|-
 
{{#ifexpr:{{{c}}}>2|{{!}} {{{c3}}}
 
{{WDL|{{#expr:{{{w3}}}+{{{d3}}}+{{{l3}}}}}|{{{w3}}}|{{{d3}}}|{{{l3}}}|for={{{f3}}}|against={{{a3}}}|diff=yes}}
 
{{!-}} style="background:#EEEEEE"| }}
 
{{#ifexpr:{{{c}}}>3|{{!}} {{{c4}}}
 
{{WDL|{{#expr:{{{w4}}}+{{{d4}}}+{{{l4}}}}}|{{{w4}}}|{{{d4}}}|{{{l4}}}|for={{{f4}}}|against={{{a4}}}|diff=yes}}
 
{{!-}}| }}
 
{{#ifexpr:{{{c}}}>4|{{!}} {{{c5}}}
 
{{WDL|{{#expr:{{{w5}}}+{{{d5}}}+{{{l5}}}}}|{{{w5}}}|{{{d5}}}|{{{l5}}}|for={{{f5}}}|against={{{a5}}}|diff=yes}}
 
{{!-}} style="background:#EEEEEE"| }}
 
{{#ifexpr:{{{c}}}>5|{{!}} {{{c6}}}
 
{{WDL|{{#expr:{{{w6}}}+{{{d6}}}+{{{l6}}}}}|{{{w6}}}|{{{d6}}}|{{{l6}}}|for={{{f6}}}|against={{{a6}}}|diff=yes}}
 
{{!-}}| }}
 
{{#ifexpr:{{{c}}}>6|{{!}} {{{c7}}}
 
{{WDL|{{#expr:{{{w7}}}+{{{d7}}}+{{{l7}}}}}|{{{w7}}}|{{{d7}}}|{{{l7}}}|for={{{f7}}}|against={{{a7}}}|diff=yes}}
 
{{!-}} style="background:#EEEEEE"| }}
 
{{#ifexpr:{{{c}}}>7|{{!}} {{{c8}}}
 
{{WDL|{{#expr:{{{w8}}}+{{{d8}}}+{{{l8}}}}}|{{{w8}}}|{{{d8}}}|{{{l8}}}|for={{{f8}}}|against={{{a8}}}|diff=yes}}
 
{{!-}}| }}
 
{{#ifexpr:{{{c}}}>8|{{!}} {{{c9}}}
 
{{WDL|{{#expr:{{{w9}}}+{{{d9}}}+{{{l9}}}}}|{{{w9}}}|{{{d9}}}|{{{l9}}}|for={{{f9}}}|against={{{a9}}}|diff=yes}}
 
{{!-}} style="background:#EEEEEE"| }}
 
{{#ifexpr:{{{c}}}>9|{{!}} {{{c10}}}
 
{{WDL|{{#expr:{{{w10}}}+{{{d10}}}+{{{l10}}}}}|{{{w10}}}|{{{d10}}}|{{{l10}}}|for={{{f10}}}|against={{{a10}}}|diff=yes}}
 
{{!-}}| }}
 
! Total
 
{{WDLtot|{{#expr:{{{w1}}}+{{{d1}}}+{{{l1}}}+{{{w2}}}+{{{d2}}}+{{{l2}}}+{{#ifexpr:{{{c}}}>2|{{{w3}}}+{{{d3}}}+{{{l3}}}|0}}+{{#ifexpr:{{{c}}}>3|{{{w4}}}+{{{d4}}}+{{{l4}}}|0}}+{{#ifexpr:{{{c}}}>4|{{{w5}}}+{{{d5}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:{{{c}}}>7|{{{l8}}}|0}}+{{#ifexpr:{{{c}}}>8|{{{l9}}}|0}}+{{#ifexpr:{{{c}}}>9|{{{l10}}}|0}}}}|for={{#expr:{{{f1}}}+{{{f2}}}+{{#ifexpr:{{{c}}}>2|{{{f3}}}|0}}+{{#ifexpr:{{{c}}}>3|{{{f4}}}|0}}+{{#ifexpr:{{{c}}}>4|{{{f5}}}|0}}+{{#ifexpr:{{{c}}}>5|{{{f6}}}|0}}+{{#ifexpr:{{{c}}}>6|{{{f7}}}|0}}+{{#ifexpr:{{{c}}}>7|{{{f8}}}|0}}+{{#ifexpr:{{{c}}}>8|{{{f9}}}|0}}+{{#ifexpr:{{{c}}}>9|{{{f10}}}|0}}}}|against={{#expr:{{{a1}}}+{{{a2}}}+{{#ifexpr:{{{c}}}>2|{{{a3}}}|0}}+{{#ifexpr:{{{c}}}>3|{{{a4}}}|0}}+{{#ifexpr:{{{c}}}>4|{{{a5}}}|0}}+{{#ifexpr:{{{c}}}>5|{{{a6}}}|0}}+{{#ifexpr:{{{c}}}>6|{{{a7}}}|0}}+{{#ifexpr:{{{c}}}>7|{{{a8}}}|0}}+{{#ifexpr:{{{c}}}>8|{{{a9}}}|0}}+{{#ifexpr:{{{c}}}>9|{{{a10}}}|0}}}}|diff=yes}}
 
|}
 
<small><!--
 
-->{{#if:{{{u|}}}|Last updated: {{{u}}}<br>}}<!--
 
-->Source: [[#Competitions|Competitions]]</small><!--
 
--></includeonly><noinclude>
 
{{documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
 
</noinclude>
 
</noinclude>

Revision as of 17:43, 7 January 2019

Script error: No such module "Sports overview".

Template documentation[view] [edit] [history] [purge]

Usage

This template is meant to be used with club football seasons to give an overview of all of the competitions. This template displays the competition name, the total number of games, wins, draws, losses, goals for, goals against, the goal difference, and winning percentage. Then all of it is totaled. There must be a minimum of two competitions. Up to ten competitions may be added. When adding competitions, start out with the parameters containing "1", and continue to move up until all competitions have been added.

Parameters

Whenever "#" is used, a value from 1 to 25 can be substituted. The highest value of "#" used should be equal to c.

  • c: The total number of competitions (between 1 and 25)
  • c#: Competition name (with link)
  • w#: Number of wins
  • d#: Number of draws
  • l#: Number of loses
  • f#: Number of goals for
  • a#: Number of goals against
  • u: Last time updated

Optional parameters

  • fm#: Date of first match and lm#: Date of last match OR dm#: Date of match (single fixture)
  • sr#: Started round
  • fp#: Final round/position
  • s: Source reference

Blank templates

Basic usage

{{Fb overview
|c=
|c1= |w1= |d1= |l1= |f1= |a1=
|c2= |w2= |d2= |l2= |f2= |a2=
|c3= |w3= |d3= |l3= |f3= |a3=
|c4= |w4= |d4= |l4= |f4= |a4=
|c5= |w5= |d5= |l5= |f5= |a5=
|c6= |w6= |d6= |l6= |f6= |a6=
|c7= |w7= |d7= |l7= |f7= |a7=
|c8= |w8= |d8= |l8= |f8= |a8=
|c9= |w9= |d9= |l9= |f9= |a9=
|c10= |w10= |d10= |l10= |f10= |a10=
|u=
}}

Extended usage

{{Fb overview
|c=
|c1= |fm1= |lm1= |sr1= |fp1= |w1= |d1= |l1= |f1= |a1=
|c2= |fm2= |lm2= |sr2= |fp2= |w2= |d2= |l2= |f2= |a2=
|c3= |fm3= |lm3= |sr3= |fp3= |w3= |d3= |l3= |f3= |a3=
|c4= |fm4= |lm4= |sr4= |fp4= |w4= |d4= |l4= |f4= |a4=
|c5= |fm5= |lm5= |sr5= |fp5= |w5= |d5= |l5= |f5= |a5=
|c6= |fm6= |lm6= |sr6= |fp6= |w6= |d6= |l6= |f6= |a6=
|c7= |fm7= |lm7= |sr7= |fp7= |w7= |d7= |l7= |f7= |a7=
|c8= |fm8= |lm8= |sr8= |fp8= |w8= |d8= |l8= |f8= |a8=
|c9= |fm9= |lm9= |sr9= |fp9= |w9= |d9= |l9= |f9= |a9=
|c10= |fm10= |lm10= |sr10= |fp10= |w10= |d10= |l10= |f10= |a10=
|u=
}}

Examples

Example 1

Code:

{{Fb overview
|c=6
|c1=[[2014–15 La Liga|La Liga]]                        |w1=21 |d1=1 |l1=6 |f1=78 |a1=26
|c2=[[2014–15 Copa del Rey|Copa del Rey]]              |w2=2  |d2=1 |l2=1 |f2=11 |a2=5
|c3=[[2014–15 UEFA Champions League|Champions League]] |w3=7  |d3=0 |l3=1 |f3=21 |a3=5
|c4=[[2014 UEFA Super Cup|UEFA Super Cup]]             |w4=1  |d4=0 |l4=0 |f4=2  |a4=0
|c5=[[2014 FIFA Club World Cup|FIFA Club World Cup]]   |w5=2  |d5=0 |l5=0 |f5=6  |a5=0
|c6=[[2014 Supercopa de España|Supercopa de España]]   |w6=0  |d6=1 |l6=1 |f6=1  |a6=2
|u=22 March 2015
}}

Result: Script error: No such module "Sports overview".

Example 2

Code:

{{Fb overview
|c=4
|c1=[[2016–17 Bundesliga|Bundesliga]] |fm1=26 August 2016 |lm1=20 May 2017 |sr1=[[#Matches|Matchday 1]] |fp1=Winners |w1=25 |d1=7 |l1=2 |f1=89 |a1=22
|c2=[[2016–17 DFB-Pokal|DFB-Pokal]] |fm2=19 August 2016 |lm2=26 April 2017 |sr2=[[2016–17 DFB-Pokal#First round|First round]] |fp2=[[2016–17 DFB-Pokal#Semi-finals|Semi-finals]] |w2=4 |d2=0 |l2=1 |f2=14 |a2=4
|c3=[[2016 DFL-Supercup|DFL-Supercup]] |dm3=14 August 2016 |sr3=[[2016 DFL-Supercup|Final]] |fp3=Winners |w3=1 |d3=0 |l3=0 |f3=2 |a3=0
|c4=[[2016–17 UEFA Champions League|Champions League]] |fm4=13 September 2016 |lm4=18 April 2017 |sr4=[[2016–17 UEFA Champions League group stage|Group stage]] |fp4=[[2016–17 UEFA Champions League knockout phase#Quarter-finals|Quarter-finals]] |w4=6 |d4=0 |l4=4 |f4=27 |a4=14
|u=27 May 2017
}}

Result: Script error: No such module "Sports overview".

Example 3

Code:

{{Fb overview
|c=8
|c1=[[2012–13 Premier League|Premier League]] |fm1=19 August 2012 |lm1=19 May 2013 |sr1=[[#Matches|Matchday 1]] |fp1=[[#League table|3rd]] |w1=22 |d1=9 |l1=7 |f1=75 |a1=39
|c2=[[2012–13 FA Cup|FA Cup]] |fm2=5 January 2013 |lm2=14 April 2013 |sr2=[[2012–13 FA Cup#Third round proper|Third round]] |fp2=[[2012–13 FA Cup#Semi-finals|Semi-finals]] |w2=4 |d2=2 |l2=1 |f2=17 |a2=7
|c3=[[2012–13 Football League Cup|Football League Cup]] |fm3=25 September 2012 |lm3=23 January 2013 |sr3=[[2012–13 Football League Cup#Third round|Third round]] |fp3=[[2012–13 Football League Cup#Semi-finals|Semi-finals]] |w3=3 |d3=1 |l3=1 |f3=16 |a3=7
|c4=[[2012 FA Community Shield|FA Community Shield]] |dm4=12 August 2012 |sr4=[[2012 FA Community Shield|Final]] |fp4=[[2012 FA Community Shield|Runners-up]] |w4=0 |d4=0 |l4=1 |f4=2 |a4=3
|c5=[[2012–13 UEFA Champions League|UEFA Champions League]] |fm5=19 September 2012 |lm5=5 December 2012 |sr5=[[2012–13 UEFA Champions League group stage|Group stage]] |fp5=[[2012–13 UEFA Champions League group stage|Group stage (3rd)]] |w5=3 |d5=1 |l5=2 |f5=16 |a5=10
|c6=[[2012–13 UEFA Europa League|UEFA Europa League]] |fm6=14 February 2013 |lm6=15 May 2013 |sr6=[[2012–13 UEFA Europa League knockout phase#Round of 32|Round of 32]] |fp6=[[2013 UEFA Europa League Final|Winners]] |w6=6 |d6=1 |l6=2 |f6=17 |a6=10
|c7=[[2012 UEFA Super Cup|UEFA Super Cup]] |dm7=31 August 2012 |sr7=[[2012 UEFA Super Cup|Final]] |fp7=[[2012 UEFA Super Cup|Runners-up]] |w7=0 |d7=0 |l7=1 |f7=1 |a7=4
|c8=[[2012 FIFA Club World Cup|FIFA Club World Cup]] |fm8=13 December 2012 |lm8=16 December 2012 |sr8=[[2012 FIFA Club World Cup#Semi-finals|Semi-finals]] |fp8=[[2012 FIFA Club World Cup Final|Runners-up]] |w8=1 |d8=0 |l8=1 |f8=3 |a8=2
|u=19 May 2013
}}

Result: Script error: No such module "Sports overview".

Tracking category