I think I may have solved this for mine so here goes:-
Open the Core.php file located in the plugin\leaguemanager\lib folder and do the following:-
line 514 change to:-
$teams[$team->id]['points2'] = array( 'plus' => $team->points2_plus, 'minus' => $team->points2_minus );
Delete line 653 then move line 652 down to 653 and add the following to the blank 652:-
$team->points2 = array( 'plus' => $team->points_plus);
Delete line 664 and change line 666 (formerly 667) to:-
array_multisort($points, SORT_DESC, $teams);
Change line 724 (formerly 725):-
if ( $team->points['plus'] == $team2->points['plus'] && $team->diff == $team2->diff && $team->points2['plus'] == $team2->points2['plus'] && $team->add_points['plus'] == $team2->add_points['plus'] && $team->points2_plus['plus'] == $team2->points2_plus['plus'] )
In your sports php file (I used the Hockey.php file) look for the following:-
/**
* rank Teams
*
* @param array $teams
* @return array of teams
*/
function rankTeams( $teams )
{
foreach ( $teams AS $key => $row ) {
$points[$key] = $row->points['plus']+$row->add_points;
$done[$key] = $row->done_matches;
$diff[$key] = $row->diff;
}
array_multisort( $points, SORT_DESC, $diff, SORT_DESC, $done, SORT_ASC, $teams );
return $teams;
}
and change to:-
/**
* rank Teams
*
* @param array $teams
* @return array of teams
*/
function rankTeams( $teams )
{
foreach ( $teams AS $key => $row ) {
$points[$key] = $row->points['plus']+$row->add_points;
$games[$key] = $row->points2_plus;
$diff[$key] = $row->diff;
$done[$key] = $row->done_matches;
}
array_multisort( $points, SORT_DESC, $games, SORT_DESC, $diff, SORT_DESC, $done, SORT_ASC, $teams );
return $teams;
}
I’m not familiar with php or coding so this came as trial and error. If it doesn’t work for you, I’m sorry but I cannot help as it was purely trial and error which got me this far! My league tables now work how they should.
If I manually add points using the +/- column, I click on the Show button next to the season number and this adds the points. I then click on the Update Results button and this re-orders the table.