• Hey Guys.

    I have the following problem. The custom sorting of tables in leaguemanager are 1.) points, 2.) goal difference and 3.) teamID. That is not what i need.

    What i need is 1.) points, 2.) goal difference and 3.) goals done.

    Is there anyway to edit/change this to the other-two-scores.php??

Viewing 2 replies - 1 through 2 (of 2 total)
  • I need this to!

    Hopefully there will be a new update soon because there are many problems with the current version!

    Thread Starter garthnait

    (@garthnait)

    I tried my self to change the sorting, but it doesn’t work.

    I changed this

    /**
    	 * rank Teams
    	 *
    	 * @param array $teams
    	 * @return array of teams
    	 */
    	function rankTeams( $teams )
    	{
    		foreach ( $teams AS $key => $row ) {
    			$points[$key] = $row->points['plus'];
    			$done[$key] = $row->done_matches;
    			$diff[$key] = $row->diff;
    		}
    
    		array_multisort( $points, SORT_DESC, $diff, SORT_DESC,  $done, SORT_ASC, $teams );
    		return $teams;
    	}

    into this

    /**
    	 * rank Teams
    	 *
    	 * @param array $teams
    	 * @return array of teams
    	 */
    	function rankTeams( $teams )
    	{
    		foreach ( $teams AS $key => $row ) {
    			$points[$key] = $row->points['plus'];
    			$goals[$key] = $row->goals['plus'];
    			$done[$key] = $row->done_matches;
    			$diff[$key] = $row->diff;
    		}
    
    		array_multisort( $points, SORT_DESC, $diff, SORT_DESC,  $goals, SORT_DESC, $done, SORT_ASC, $teams );
    		return $teams;
    	}

    but nothing changed in the sorting.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Leaguemanager] Table sorting’ is closed to new replies.