TheNAF / naflm

NAFLM - NAF League Manager
Other
35 stars 34 forks source link

Add TD Diff to Standings Pages #197

Open duke-68 opened 7 years ago

duke-68 commented 7 years ago

Hello guys, this is more a change request than a real issue. It would be nice to have the goal difference displayed by the standings pages, I know that this value could be easily calculated using a spreadsheet but since the sdiff value is already present as a field in the db tables it should not be a great effort to insert it between the other stats. Best regards

thefloppy1 commented 7 years ago

You can add this in if you adjust the local_settings# file. Later I will post how this is done.

On Wed, Feb 1, 2017 at 12:39 AM, duke-68 notifications@github.com wrote:

Hello guys, this is more a change request than a real issue. It would be nice to have the goal difference displayed by the standings pages, I know that this value could be easily calculated using a spreadsheet but since the sdiff value is already present as a field in the db tables it should not be a great effort to insert it between the other stats. Best regards

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TheNAF/naflm/issues/197, or mute the thread https://github.com/notifications/unsubscribe-auth/APXWhmLbvpHhLBfHmi2LwzC62iGnnQd0ks5rXzmBgaJpZM4LyouC .

thefloppy1 commented 7 years ago

I shouldn't do this as I wrote the Admin Guide for a reason it has all these answers in it on what you can do and how to do it.

in your settings_#.php

'fields' => array('Name' => 'name', 'PTS' => 'pts', 'TV' => 'tv', 'CAS' => 'cas', 'W' => 'won', 'L' => 'lost', 'D' => 'draw', 'GF' => 'gf', 'GA' => 'ga',), This string is what is displayed in the Standings.

if you add to the end of this string. 'TD Dif' => 'sdiff'

As per this example below

'fields' => array('Name' => 'name', 'PTS' => 'pts', 'TV' => 'tv', 'CAS' => 'cas', 'W' => 'won', 'L' => 'lost', 'D' => 'draw', 'GF' => 'gf', 'GA' => 'ga', 'TD Dif' => 'sdiff',),

This will display your goal difference. Everything you can put in this is in the NAF OBBLM ADMIN GUIDE in the Glossary it has all the fields you could ever want to add.

On Wed, Feb 1, 2017 at 8:07 AM, Scott Bartel scott.bartel@gmail.com wrote:

You can add this in if you adjust the local_settings# file. Later I will post how this is done.

On Wed, Feb 1, 2017 at 12:39 AM, duke-68 notifications@github.com wrote:

Hello guys, this is more a change request than a real issue. It would be nice to have the goal difference displayed by the standings pages, I know that this value could be easily calculated using a spreadsheet but since the sdiff value is already present as a field in the db tables it should not be a great effort to insert it between the other stats. Best regards

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TheNAF/naflm/issues/197, or mute the thread https://github.com/notifications/unsubscribe-auth/APXWhmLbvpHhLBfHmi2LwzC62iGnnQd0ks5rXzmBgaJpZM4LyouC .

duke-68 commented 7 years ago

Thank you for the answer and for the patience with me but in settings_x.php the fields array is referred to the front page standing box. In my request I was talking about the standing pages (Team, Player, Coach, Race and so on) under the Statistics tab of the menu. I confess that i tried to understand how the sw works and I've tried to alter the fields array under _getDefFields function in class_htmlout.php adding a row with the sdiff fields between the others hoping that was enough but it didn't work :-(

mfranchetti commented 6 years ago

TD Diff is missing from the Standings pages and could be beneficial. Worth adding to the function when feasible.