Template talk:Win draw lose
Category note
[edit]I think it should be noted that if the sum of the wins, draws and losses is incorrect, [[Category:WDL error]] appears. - Dudesleeper talk 22:27, 31 October 2010 (UTC)
Adding numbers from a column
[edit]Is there a way to automatically add every number from a column? Strawberry on Vanilla (talk) 13:04, 24 July 2011 (UTC)
Add Pts%
[edit]I've attempted a similar template: Template:WDLpts that has additional its column and pts% column, so we can see the percentage of points taken out of the total available, which I find much more insightful. However, the template I made isn't perfect, and it'd probably be better to just implement maybe optional columns into this one. If anyone can do it, it'd be greatly appreciated! --Adam (talk) 07:36, 31 August 2011 (UTC)
Deletion discussion
[edit]There is an ongoing deletion discussion that is directly relevant to this template. Please comment this template's error category at Wikipedia:Categories for discussion/Log/2013 September 24#Category:WDL error. Thanks, Ego White Tray (talk) 02:46, 25 September 2013 (UTC)
Minus sign
[edit]I have made changes to Module:WDL/sandbox to get the correct minus sign (same as done at Module:Sports table/WDL). I thought I should take it here before implementing. It is working where I have tested it. Qed237 (talk) 17:29, 2 August 2015 (UTC)
- @Jackmcbarn and Frietjes: I ping you most recent editors (and creator of the module). Qed237 (talk) 17:31, 2 August 2015 (UTC)
- @Qed237: I cleaned up the code a bit. It looks good now. Jackmcbarn (talk) 17:48, 2 August 2015 (UTC)
- @Jackmcbarn: Okay, great. Not sure how that works but as long as it does I am happy. Do we need consensus to edit the module? Qed237 (talk) 22:57, 2 August 2015 (UTC)
- @Qed237: I cleaned up the code a bit. It looks good now. Jackmcbarn (talk) 17:48, 2 August 2015 (UTC)
I was just looking at the Quique Flores article and it seems this template has a bit of an issue distinguishing between positive and negative numbers. A few times, it's displaying a negative goal difference when it should be positive and vice-versa. Any ideas? – PeeJay 20:12, 7 August 2015 (UTC)
- @PeeJay2K3: Thanks for noticing. Should be fixed now. If any pages still look broken, WP:PURGE them. Jackmcbarn (talk) 00:27, 8 August 2015 (UTC)
Total games
[edit]Wouldn't it be possible to generate the total number of games played as the arithmetic sum of the numbers of wins, draws and losses? Seems like we're adding an extra parameter to the template for no reason... – PeeJay 10:17, 7 October 2017 (UTC)
- PeeJay2K3 if you leave the total blank, it is auto generated (may not be mentioned in the documentation). however, if the numbers don't add up, the page appears in Category:WDL error (checksum). Frietjes (talk) 15:49, 7 October 2017 (UTC)
- Isn't the total the first parameter? Seems a bit weird to leave the first one blank, that's all. – PeeJay 22:26, 7 October 2017 (UTC)
- PeeJay2K3, yes, but changing the syntax would require changing all the articles, or making a new template. Frietjes (talk) 14:54, 8 October 2017 (UTC)
- Oh yeah, I understand that, I just think it's a shame it wasn't realised that the total column could be filled in using an arithmetic operation when the template was first put together. – PeeJay 08:44, 9 October 2017 (UTC)
- PeeJay2K3, yes, but changing the syntax would require changing all the articles, or making a new template. Frietjes (talk) 14:54, 8 October 2017 (UTC)
- Isn't the total the first parameter? Seems a bit weird to leave the first one blank, that's all. – PeeJay 22:26, 7 October 2017 (UTC)
Win %
[edit]The current winning percentage for this template is calculated by dividing the total wins by the total games played. However, isn't it standard to factor in half of the draws into winning percentage? I believe the full credit should be:
(wins + (draws/2))/total games played = winning percentage
In "Module:WDL," it think it would look something like this:
return displayWinPercent(frame, 100 * (won or 0) + ((drawn or 0) / 2) / (((won or 0) + (drawn or 0) + (lost or 0)) or 1), decimals)
elseif tonumber(played) <= 0 then
return '
– — Preceding —'
else
return displayWinPercent(frame, 100 * (won or 0) + ((drawn or 0) / 2) / played, decimals)
end
unsigned comment added by Adamng87 (talk • contribs) 20:02, 6 May 2024 (UTC)
- Can you provide any examples of sources that treat draws as half a win for the purposes of calculating win percentages? Most sources I have come across do not do that. – PeeJay 22:24, 6 May 2024 (UTC)
- Wikipedia's own page on winning percentage states that "a draw counts as a 1/2 win." There is a carve out for association football managers, but there is no citation given. It just links to the association football page, which has no reference to calculating winning percentage. – Adamng87(talk) 15:10, 8 May 2024 (UTC)
- Wikipedia cannot act as a source for itself. I have no doubt that in some circumstances draws are treated as half-wins, but that is a very American thing. Perhaps we should find a way of incorporating both calculations into this template (assuming that's not already been done). – PeeJay 13:40, 10 May 2024 (UTC)
- Wikipedia's own page on winning percentage states that "a draw counts as a 1/2 win." There is a carve out for association football managers, but there is no citation given. It just links to the association football page, which has no reference to calculating winning percentage. – Adamng87(talk) 15:10, 8 May 2024 (UTC)
Template-protected edit request on 13 March 2025
[edit]![]() | This edit request to Module:WDL has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
change colour in line 52 from "efefef" to "eaecf0". This would match default styling of table headers where this is used to create a total row on a table, e.g. at Jürgen Klopp#Managerial statistics. Microwave Anarchist (talk) 21:14, 13 March 2025 (UTC)
- I'm not sure what's going on with this, editor Microwave Anarchist. First I changed the color in the module sandbox to your suggested color, that is, from to . I checked the Jürgen Klopp#Managerial statistics in preview and could not see a difference. I then tried to test a green color, , for the background and still do not see a difference. With the template sandbox at Template:WDL/sandbox set to invoke the module sandbox, I can't see why no difference in background color is shown. Any ideas? I must be missing something? P.I. Ellsworth , ed. put'er there 06:06, 14 March 2025 (UTC)
- @Paine Ellsworth: Honestly I'm really not sure why that didn't work - it quite clearly seems to be the part responsible for the colour of the total cells. I've got very little idea how this works otherwise unfortunately so don't know what to do from here. Microwave Anarchist (talk) 05:08, 15 March 2025 (UTC)
- I suggest that we leave this open, then. A lua programmer will come along and be able to resolve it. P.I. Ellsworth , ed. put'er there 17:33, 15 March 2025 (UTC)
- If I change Jürgen_Klopp to use {{WDLtot/sandbox}} rather than {{WDLtot}} and preview then I see the green color. I'm not sure why Paine Ellsworth's testing wasn't working. * Pppery * it has begun... 17:24, 18 March 2025 (UTC)
- I suggest that we leave this open, then. A lua programmer will come along and be able to resolve it. P.I. Ellsworth , ed. put'er there 17:33, 15 March 2025 (UTC)
- @Paine Ellsworth: Honestly I'm really not sure why that didn't work - it quite clearly seems to be the part responsible for the colour of the total cells. I've got very little idea how this works otherwise unfortunately so don't know what to do from here. Microwave Anarchist (talk) 05:08, 15 March 2025 (UTC)
- I wonder if there's a reason why the background color is the way that it is. It distinguishes the background, so that might be useful? SWinxy (talk) 00:19, 22 March 2025 (UTC)
- To editor Microwave Anarchist: please take a look at the [test cases page] – is that what you expect as a result of your edit? P.I. Ellsworth , ed. put'er there 04:25, 28 March 2025 (UTC)
@Paine Ellsworth: no, the requested edit is for the background colour to be changed where it forms a total row i.e. where {{WDLtot}} is used - it is inconsistent with default table styling. Where {{WDL}} is used it should still render a standard row rather than a header row. Sorry if this was unclear. Microwave Anarchist (talk) 21:04, 30 March 2025 (UTC)
- To editor Microwave Anarchist: is this better? See [WDL test cases] or [WDL totals test cases]. P.I. Ellsworth , ed. put'er there 21:58, 30 March 2025 (UTC)
- Yes, thank you :) Microwave Anarchist (talk) 22:02, 30 March 2025 (UTC)
Completed and Happy to help! Paine 22:11, 30 March 2025 (UTC)
- Yes, thank you :) Microwave Anarchist (talk) 22:02, 30 March 2025 (UTC)