Module talk:Build bracket: Difference between revisions

Content deleted Content added
 
(43 intermediate revisions by 8 users not shown)
Line 29:
 
:Great, thank you! One other question, would it be possible to not bold text inside brackets/parentheses of the team parameter when <code>|boldwinner=high</code> is set? This was {{Diff|Module:Team bracket|1128923970|1106200685|recently implemented}} at [[Module:Team bracket]], so text such as "(a.e.t.)" does not get bolded when included after the name of the winning team. [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 19:21, 22 December 2022 (UTC)
::{{ping|Pbrks}} Sorry, forgot to ping, would this be possible? Thanks, [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 18:43, 4 February 2023 (UTC)
:::{{re|S.A. Julio}} Yes, I'll look into it. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup><span style="font-variant:small-caps">([[User talk:Pbrks#top|t]]&nbsp;•&nbsp;[[Special:Contribs/Pbrks|c]])</span></sup> 19:47, 5 February 2023 (UTC)
{{re|S.A. Julio}} Sorry for the extreme delay. It should be implemented now. Let me know if you see any issues. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup><span style="font-variant:small-caps">([[User talk:Pbrks#top|t]]&nbsp;•&nbsp;[[Special:Contribs/Pbrks|c]])</span></sup> 22:33, 27 June 2023 (UTC)
 
== "Lua error in Module:Build_bracket at line 984: attempt to index field '?' (a nil value)." ==
 
At [[ESL One Cologne 2019#Asian qualifier]] [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 15:05, 31 December 2022 (UTC)
 
== parameter cross ==
 
hi, i found the problem when the -cross parameter is used.
 
{{#invoke:Build bracket|main
| rounds=4
| legs = 2
| aggregate=y
| RD1-legs = 1
| RD4-legs = 1
 
| col1-matches = 3,6
| col2-matches = 3,6,9,12
| col3-matches = 4.5,10.5
| col4-matches = 7.5
 
| col1-col2-paths = 3-6, 6-3
| col1-col2-cross = 4.5
| col2-col3-paths = (3,6)-4.5, (9,12)-10.5
| col3-col4-paths = (4.5,10.5)-7.5
}}
 
[[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 19:32, 8 January 2023 (UTC)
 
== Custom width for legs vs. aggregate ==
 
{{ping|Pbrks}} For the cells containing scores, would there be any way to allow for custom widths for the legs, and a different width for the aggregate? For example see the bracket below, I was wondering if there would be a way to have a small width for each leg, and a larger width for the aggregate score. Any help would be greatly appreciated. Thanks, [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 01:23, 10 February 2024 (UTC)
{{#invoke:Build bracket|main
 
| agg-width = 40px
|score-width= 20px
 
| rounds=3
| RD1-legs = 2
| RD2-legs = 2
| aggregate = y
| col1-matches = 3,6,9,12
| col2-matches = 4.5,10.5
| col3-matches = 7.5
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
| col2-col3-paths = (4.5,10.5)-7.5
}}
:{{re|S.A. Julio}} Done. {{para|score-width}} will still change the aggregate box width, unless {{para|agg-width}} is used. I added {{para|agg-width|50px}} to the above template to demonstrate. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>([[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]])</sup> 01:47, 10 February 2024 (UTC)
::{{re|Pbrks}} Great, thanks! A minor detail, but if some of the rounds are single leg, could there be a way to allow for its score box to match the aggregate width? For example, in the above bracket, could the final score width be set as 40px, while not impacting the width of the legs? Thanks, [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 22:49, 10 February 2024 (UTC)
:::{{re|S.A. Julio}} I see what you mean. I'll look into what the best solution is. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>([[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]])</sup> 03:34, 11 February 2024 (UTC)
 
== Boldwinner in non-numeral matches and exception with seed cell ==
 
Hello! In tennis, some matches can be won by walkover. So, there is no numeral to calculate which cell will be bold. So if this happens, no cells get bold, and I need to do this manually.
Is there any way out for cases like this?
 
Second topic: when a team wins the match in boldwinner, the seed, team and score cells are in bold. Is there a way to create an exception, and the winner's seed cell does not change to bold? [[User:Rafaelfdc|Rafaelfdc]] ([[User talk:Rafaelfdc|talk]]) 22:16, 7 July 2024 (UTC)
 
== Hide the header and its content ==
 
Hi! When inserting e.g. [[Template:8TeamBracket-info]] and setting the "paramstyle=numbered" parameter, a problem occurs that it is impossible to bypass the cells for the fifth place/Lower round 2 when I want to insert teams only in the third place match. Is there any way to improve this, for example to turn off the display of "Lower round 2" and have the content displayed in the third place match field? It works when I add "|" five times, however it is very tedious.[[User:Mateusz.ns|Mateusz.ns]] ([[User talk:Mateusz.ns|talk]]) 12:25, 8 July 2024 (UTC)
 
Example to illustrate (without 10x"|"):
{{8TeamBracket-info |paramstyle=numbered
<!--Date-Place|Team 1|Score 1|Team 2|Score 2 -->
<!--quarter finals -->
| [[8 listopada]] [[2007]]| ESP |4|'''MEX'''|5
| [[8 listopada]] [[2007]]| NGA |1|'''URY'''|3
| [[8 listopada]] [[2007]]|'''BRA'''|10| PRT|7
| [[8 listopada]] [[2007]]| SEN|3|'''FRA'''|6
<!--semi-finals -->
| [[10 listopada]] [[2007]]|'''MEX'''|5| URY|2
| [[10 listopada]] [[2007]]|'''BRA'''|6| FRA|2
<!--finał -->
| [[11 listopada]] [[2007]]| MEX|2|'''BRA'''|8
<!-- mecz o 3 miejsce -->
| [[11 listopada]] [[2007]]|'''URY'''|2 (1)| FRA|2 (0)
}}
<pre>
{{8TeamBracket-info |paramstyle=numbered
<!--Date-Place|Team 1|Score 1|Team 2|Score 2 -->
<!--quarter finals -->
| [[8 listopada]] [[2007]]| ESP |4|'''MEX'''|5
| [[8 listopada]] [[2007]]| NGA |1|'''URY'''|3
| [[8 listopada]] [[2007]]|'''BRA'''|10| PRT|7
| [[8 listopada]] [[2007]]| SEN|3|'''FRA'''|6
<!--semi-finals -->
| [[10 listopada]] [[2007]]|'''MEX'''|5| URY|2
| [[10 listopada]] [[2007]]|'''BRA'''|6| FRA|2
<!--finał -->
| [[11 listopada]] [[2007]]| MEX|2|'''BRA'''|8
<!-- Third place? -->
| [[11 listopada]] [[2007]]|'''URY'''|2 (1)| FRA|2 (0)
}}</pre>
 
Example to illustrate (after adding 5x"|" after semi-finals):
{{8TeamBracket-info |paramstyle=numbered
<!--Date-Place|Team 1|Score 1|Team 2|Score 2 -->
<!--quarter finals -->
| [[8 listopada]] [[2007]]| ESP |4|'''MEX'''|5
| [[8 listopada]] [[2007]]| NGA |1|'''URY'''|3
| [[8 listopada]] [[2007]]|'''BRA'''|10| PRT|7
| [[8 listopada]] [[2007]]| SEN|3|'''FRA'''|6
<!--semi-finals -->
| [[10 listopada]] [[2007]]|'''MEX'''|5| URY|2
| [[10 listopada]] [[2007]]|'''BRA'''|6| FRA|2
|||||
<!--finał -->
| [[11 listopada]] [[2007]]| MEX|2|'''BRA'''|8
<!-- mecz o 3 miejsce -->
| [[11 listopada]] [[2007]]|'''URY'''|2 (1)| FRA|2 (0)
}}
<pre>
{{8TeamBracket-info |paramstyle=numbered
<!--Date-Place|Team 1|Score 1|Team 2|Score 2 -->
<!--quarter finals -->
| [[8 listopada]] [[2007]]| ESP |4|'''MEX'''|5
| [[8 listopada]] [[2007]]| NGA |1|'''URY'''|3
| [[8 listopada]] [[2007]]|'''BRA'''|10| PRT|7
| [[8 listopada]] [[2007]]| SEN|3|'''FRA'''|6
<!--semi-finals -->
| [[10 listopada]] [[2007]]|'''MEX'''|5| URY|2
| [[10 listopada]] [[2007]]|'''BRA'''|6| FRA|2
|||||
<!--finał -->
| [[11 listopada]] [[2007]]| MEX|2|'''BRA'''|8
<!-- mecz o 3 miejsce -->
| [[11 listopada]] [[2007]]|'''URY'''|2 (1)| FRA|2 (0)
}}</pre> [[User:Mateusz.ns|Mateusz.ns]] ([[User talk:Mateusz.ns|talk]]) 12:25, 8 July 2024 (UTC)
:{{re|Mateusz.ns}} No, sorry, the amount of work to add that feature would not be worth the few "|" that can just be put in, and I do not have time to invest in it at the moment. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup>
:{{re|Mateusz.ns}} Also, you should be aware that changes to underlying templates can significantly change "numbered" brackets. For example, suppose the 5th place match ''wasn't'' in the code of {{tl|8TeamBracket-info}}, and you created a "numbered" style bracket with a 3rd place match. Then, if a 5th place match is added into the code, ''all'' of the "numbered" style brackets would have the 3rd place match moved to the 5th place match. For that reason, its best to use the <code>|RD1-team1=</code> format. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 03:46, 9 July 2024 (UTC)
 
== Additional functions ==
 
A few more questions from me :) because we are trying to implement the module on a large scale in pl.wiki and replace all other templates with it.
# Is it possible to selectively use the "aggregate" parameter? There are situations when it is needed to be used in a specific round or only in the match for 3rd place. At this point, the field with the collective result appears in all cells or in none of them.
# How to change the color of the "aggregate" field? Alternatively, how to thicken the left border? I'm asking because at the moment this field is very poorly distinguished from the others.
Thank you very much for the previous answers! [[User:Mateusz.ns|Mateusz.ns]] ([[User talk:Mateusz.ns|talk]]) 13:57, 11 July 2024 (UTC)
 
== Home and away teams? ==
 
Would there be any way to individually point to the home and away slots? For example, trying to figure out who will play the home finals in the [[2024 AFL season]] is hard/impossible. And most or all other graphs seem to not show it either. [[User:MarkiPoli|MarkiPoli]] ([[User talk:MarkiPoli|talk]]) 14:08, 9 September 2024 (UTC)
 
== Use boldwinner for only the aggregate score? ==
 
{{ping|Pbrks}} I was wondering, if the aggregate parameter is present for a given round, is there a way that the automatic bolding provided by {{para|boldwinner}} could only be applied to the aggregate score (with the leg scores not bolded)? See the below example. Would appreciate any help! Thanks, [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 16:04, 14 November 2024 (UTC)
 
'''Current output'''
{{#invoke:Build bracket|main|paramstyle=numbered|boldwinner=y
| rounds = 3
| nowrap = y
| RD1-legs = 2
| aggregate = y
| agg-width = 40
| score-width= 20
| team-width = 170
| col-spacing = 17.5
 
| col1-headers = 1
| col2-headers = 1
| col3-headers = 1,11
 
| col1-matches = 3,6,9,12
| col2-matches = 4.5,10.5
| col3-matches = 7.5,13
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
| col2-col3-paths = (4.5,10.5)-7.5
 
| RD1 = [[#Quarter-finals|Quarter-finals]]
| RD2 = [[#Semi-finals|Semi-finals]]
| RD3 = [[#Final|Final]]
| RD3b = [[#Third place play-off|Third place play-off]]
 
||Team 1|3|1|4|Team 2|0|5|5
|||||||||
|||||||||
|||||||||
 
||Team 2|3|Team 4|1
|||||
 
|||||
|||||
}}
 
'''Desired output'''
{{#invoke:Build bracket|main|paramstyle=numbered
| rounds = 3
| nowrap = y
| RD1-legs = 2
| aggregate = y
| agg-width = 40
| score-width= 20
| team-width = 170
| col-spacing = 17.5
 
| col1-headers = 1
| col2-headers = 1
| col3-headers = 1,11
 
| col1-matches = 3,6,9,12
| col2-matches = 4.5,10.5
| col3-matches = 7.5,13
 
| col1-col2-paths = (3,6)-4.5, (9,12)-10.5
| col2-col3-paths = (4.5,10.5)-7.5
 
| RD1 = [[#Quarter-finals|Quarter-finals]]
| RD2 = [[#Semi-finals|Semi-finals]]
| RD3 = [[#Final|Final]]
| RD3b = [[#Third place play-off|Third place play-off]]
 
||Team 1|3|1|4|'''Team 2'''|0|5|'''5'''
|||||||||
|||||||||
|||||||||
 
||'''Team 2'''|'''3'''|Team 4|1
|||||
 
|||||
|||||
}}
:{{re|S.A. Julio}} This feature now works with <code>|boldwinner=aggregate</code>. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 01:01, 12 August 2025 (UTC)
 
== Dark mode ==
 
Would it be possible for an experienced editor to add the dark mode theme used in [[:Module:Team bracket]] to match that template? [[User:Bbb2007|Bbb2007]] ([[User talk:Bbb2007|talk]]) 23:53, 29 December 2024 (UTC)
 
:{{ping|Pbrks}} Hi, in dark mode aggregate blends with partial results. [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 19:10, 20 August 2025 (UTC)
::{{re|Quri.inka}} Can you be more clear? What do you mean "with partial results"? –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 19:11, 20 August 2025 (UTC)
:::{{ping|Pbrks}} legs (sry translate google). The line between legs and aggregate is barely visible in dark mode. Of course, this could be due to my poor eyesight :) [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 19:22, 20 August 2025 (UTC)
 
== colors for legs ==
 
{{ping|Pbrks}} Hello! Could you please implement the use of colors for legs? [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 17:05, 11 August 2025 (UTC)
:{{re|Quri.inka}} Hello. Where and why would this be used? I have concerns, in particular relating to [[MOS:COLOR]]. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 17:31, 11 August 2025 (UTC)
::{{ping|Pbrks}} For aggregate score, one user wasn't satisfied with the bold line. I added it myself, along with the ability to colorize the remaining legs (plwiki, overwritten by the new version) [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 17:48, 11 August 2025 (UTC)
 
== problem with manual bolding ==
 
{{ping|Pbrks}} Hi, <code>| aggregate = sets</code> does not work when used <code><nowiki>'''</nowiki></code>.
 
{{#invoke:Build bracket|main
| rounds=2
| legs = 2
| RD1-legs = 3
| aggregate = sets
 
| col1-matches = 3,6
| col2-matches = 4.5
| col3-matches = 7.5
 
| col1-col2-paths = (3,6)-4.5
 
| RD1-seed1=1
| RD1-team1={{flagicon|POL}} [[Iga Świątek]]
| RD1-score1-1=2
| RD1-score1-2=4
| RD1-score1-3=
| RD1-seed2=6
| RD1-team2='''{{flagicon|USA}} [[Jessica Pegula]]'''
| RD1-score2-1=6
| RD1-score2-2=6
| RD1-score2-3=
 
| RD1-seed3=22
| RD1-team3={{flagicon|BRA}} [[Beatriz Haddad Maia]]
| RD1-score3-1=1
| RD1-score3-2=4<sup>6</sup>
| RD1-score3-3=
| RD1-seed4=
| RD1-team4='''{{flagicon|CZE}} [[Karolína Muchová]]'''
| RD1-score4-1='''6'''
| RD1-score4-2='''7'''<sup>8</sup>
| RD1-score4-3=
 
| RD2-seed1=6
| RD2-team1='''{{flagicon|USA}} [[Jessica Pegula]]'''
| RD2-score1-1=1
| RD2-score1-2='''6'''
| RD2-seed2=
| RD2-team2={{flagicon|CZE}} [[Karolína Muchová]]
| RD2-score2-1='''6'''
| RD2-score2-2=4
 
}}
{{ping|Pbrks}} and <code><nowiki><sup></nowiki></code>
 
[[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 14:08, 18 August 2025 (UTC)
:{{re|Quri.inka}} Thanks for pointing that out. It should be working now. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 14:32, 18 August 2025 (UTC)
::{{re|Quri.inka}} Also, consider using <code>| boldwinner = high</code> for automatic markup. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 14:33, 18 August 2025 (UTC)
 
== bold for chess scoring ==
 
{{ping|Pbrks}} Hi
{{4TeamBracket-info |paramstyle=numbered|boldwinner=high
<!--Date-Place|Team 1|Score 1|Team 2|Score 2 -->
<!--quarter finals -->
| [[8 listopada]] [[2007]]| ESP |½|MEX|1½
| [[8 listopada]] [[2007]]| NGA |1|URY|1½
| [[8 listopada]] [[2007]]|BRA|2 (3)| PRT|2 (4)
}} [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 09:04, 23 August 2025 (UTC)
{{re|Quri.inka}} {{done}} –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 21:22, 23 August 2025 (UTC)
 
:Thank you. [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 05:29, 24 August 2025 (UTC)
{{ping|Pbrks}} Hi it's broken <code>2 (3)</code> [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 12:33, 24 August 2025 (UTC)
 
== RD-hide ==
{{ping|Pbrks}} Hi,
Hiding headers doesn't work? First column is empty, second not.
 
{{#invoke:Build bracket|main
|paramstyle=numbered
|boldwinner=y
|rounds=5
 
|RD1 = Pierwsza runda
|RD2 = Druga runda
|RD3 = Ćwierćfinały
|RD4 = Półfinały
|RD5 = O brązowy medal
 
|RD1-hide=yes
|RD2a-hide=yes
|RD3-hide=yes
|RD4a-hide=yes
|RD5-hide=yes
 
|col1-matches = 5
|col2-matches = 4,7
|col3-matches = 3,6
|col4-matches = 4.5
|col5-matches = 3
 
|col1-col2-paths = 5-4
|col2-col3-paths = 4-3,7-6
|col3-col4-paths = (3,6)-4.5
|col4-col5-paths = 4.5-3
 
|||||
||WWW|100|VVV|000
||EEE|101|BBB|000
||RRR|012|NNN|000
||RRR|010|MMM|000
}} [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 13:23, 24 August 2025 (UTC)
:{{re|Quri.inka}} {{done}} –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 02:15, 26 August 2025 (UTC)
 
== automatic markup 2 (3) ==
 
{{ping|Pbrks}} Hi,
Thank you for the RD-hide parameter. While implementing new features, we lost the automatic markup of <code>2 (3)</code> (example in section ''bold for chess scoring''). [[User:Quri.inka|Quri.inka]] ([[User talk:Quri.inka|talk]]) 05:38, 26 August 2025 (UTC)
 
== Color parameter ==
 
Please add the color parameter as it is in the Module:RoundN. Here is one small example:<br>
This code creates the following bracket:
{{demo|<nowiki>{{Round4-with third
|bold_winner=high
|color=yes
 
|1 January|{{fb|GER}}|2|{{fb|ITA}}|1
|1 January|{{fb|ESP}}|1|{{fb|POR}}|2
 
|2 January|{{fb|GER}}|2|{{fb|POR}}|1
 
|2 January|{{fb|ITA}}|1|{{fb|ESP}}|2
}}</nowiki>}}
Thanks, [[User:Maiō T.|Maiō T.]] ([[User talk:Maiō T.|talk]]) 20:22, 27 August 2025 (UTC)
:{{re|Maiō T.}} Sorry, I will not be making this change. The colors do not comply with the WCAG 2.0 AA standard for color contrast, let alone the AAA level. You can see my concerns that I, and other editors, have discussed at [[Module talk:RoundN#Medal colors for gold/silver/bronze]]. –&nbsp;[[User:Pbrks|Pbrks]]&nbsp;<sup>(<span style="font-variant: small-caps;">[[User talk:Pbrks#top|t]]·[[Special:Contribs/Pbrks|c]]</span>)</sup> 12:17, 29 August 2025 (UTC)