Shoal Summit Solutions › Forums › MSTW League Manager Plugin (& Add-ons) › Adding Goals For Per Game and Goals Against Per Game to Standings Table
- This topic has 4 replies, 2 voices, and was last updated 1 year, 1 month ago by Mark.
-
AuthorPosts
-
November 25, 2023 at 11:08 am #7204
We are working on our autofill standings table and have a request for additional fields. For most sports, Goals For and Goals Against are great, and we plan on using them as is. For other sports (primarily thinking basketball), we would like the options to have fields called Goals For Per Game and Goals Against Per Game.
The simple calculations would be…
Goals Per Game = Total Goals For (gf) / Total Games Played (tGP)
Goals Against Per Game = Total Goals Against (ga) / Total Games Played (tGP)We don’t want to remove the Goals For or Goals Against fields/calculations, but instead add two additional fields which should be useful for all current/future League Manager Addons users.
Is what we’re asking possible?
My team might be able to add the necessary PHP to make this happen, but as we’re less familiar with this specific plugin code (and this particular stat could be useful to others), we wanted to post here first.
URL: https://stg.locosports.info/standings/boys-basketball-standings/
Shortcode:[mstw_league_standings league=catoctin-district-boys-basketball season=2023]
Website Information
———————–
LoCoSports is a hyperlocal news site covering high school sports. We have 17 base high schools track schedules for 323 teams and standings for 187 total teamsURL: stg.locosports.info
WordPress: 6.4.1
PHP: 8.0
Theme: SmartMag 9.3.0
League Manger: 2.10
League Manager Addons: 2.10November 26, 2023 at 6:32 pm #7208Hi Owen,
I took a brief look at the plugin, and to auto-calculate those fields would take some amount of coding. Auto-calc of the standings is non-trivial and I’m not going to dive into it anytime soon. But it seems you are asking for two “display only” fields that don’t have any impact on standings order. Right? That’s much easier.Honestly, these two specific fields are not of much interest to me because I’ve never seen them on any sports website. (Maybe you have a reference?) That said, what would be of interest was the ability for a user to create whatever custome fields he/she wanted. (for display only) I think that could be done with a filter. But then some settings would be needed to configure where the custom fields were displayed in the standings tables. Phew! IDK. Your thoughts?
-Mark
November 28, 2023 at 8:32 am #7219Hi Mark,
Thanks for the reply. You are correct in assuming that these fields would not impact the standings order. They are for display purposes only, however, they would ideally be calculated by the plugin using the autofill feature.
I called them Goals For Per Game and Goals Against Per Game (as I didn’t want to cause confusion with the Points system used in LM which references points earned for W/L/T). In basketball, Points Per Game (PPG) and Opponents Points Per Game (OPPG) are both standard statistics used by all the major news orgs/leagues. Please some examples below (some of the sites use different names for the category like PTS/G).
ESPN, CBS Sports, NCAA, NBA
Hopefully this makes sense.
-OG
November 28, 2023 at 10:34 am #7222Okay. Got it. Not worried about the name because you should be able to rename the columns (given no bugs LOL). I can put it on “the list”, but I can’t promise when it will float to the top. If you want me to do it for this BB season, it’s possible, but lets take that outside this forum.
-M -
AuthorPosts
- You must be logged in to reply to this topic.