Hi Everyone,
I am trying to amend the Leaguemanager Plugin to allow the league table to calculate a bonus point if a team loses but comes within 5 points.
I have tried a couple of hacks but I keep hacking myself into a corner.
Does anyone have any suggestions? I am happy to get stuck into the code.
I am thinking that the easiest way is to amend the sql statement for the loss:
"SELECT COUNT(ID) FROM {$wpdb->leaguemanager_matches} WHERE loser_id = '".$team_id."'"
If I could amend it so it added an additional point to the count for all of the 'lost' games for a team where they meet the criteria i.e. 'home_points-away_points<=5 or away_points-home_points<=5' that would be great.
Alternative suggestions welcome - I am pulling my hair out here.
Thanks,
Emily