• If I want to add a Result is in every line 0
    These must first all be deleted before you can save the result otherwise the counting in the table.

    If a game is decided by penalty in ice hockey the points are calculated incorrectly. Instead winner 2 points he gets either 3 or 1 and loser gets 0 points instead of 1 point.

    Table is calculated incorrectly.

    how can I fix the error quickly because we are in the middle of the season.

    thank you for quick help.

    https://wordpress.org/plugins/leaguemanager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Which kind of point rules did you choose? DEL or NHL? They have different point rules
    Take a look at your ../wp-content/plugins/leaguemanager/sports/hockey.php

    If you want to change something you have to do it there in

    function getPointRules( $rules )
    	{
    		// DEL rule
    		$rules['del'] = array( 'forwin' => 3, 'fordraw' => 1, 'forloss' => 0, 'forwin_overtime' => 2, 'forloss_overtime' => 1 );
    		// NHL rule
    		$rules['nhl'] = array( 'forwin' => 2, 'fordraw' => 0, 'forloss' => 0, 'forwin_overtime' => 2, 'forloss_overtime' => 1 );
    
    		return $rules;
    	}
    function calculatePoints( $points, $team_id, $rule )
    	{
    		extract($rule);
    
    		$num_won_overtime = $this->getNumWonMatchesOvertime( $team_id );
    		$num_lost_overtime = $this->getNumLostMatchesOvertime( $team_id );
    
    		$points['plus'] = $points['plus'] - $num_won_overtime * $forwin + $num_won_overtime * $forwin_overtime + $num_lost_overtime * $forloss_overtime;
    		$points['minus'] = $points['minus'] - $num_lost_overtime * $forwin + $num_won_overtime * $forloss_overtime + $num_lost_overtime * $forwin_overtime;
    
    		return $points;
    	}

    This is the documentaion explanation

    function pointRuleDocumentation()
    	{
    		echo '<h4>'.__( 'German Icehockey League (DEL)', 'leaguemanager' ).'</h4>';
    		echo '<p>'.__( 'The DEL uses a more complicated form of the Three-Point-Rule. The winner after regular time gets three points, the loser none. The winner after overtime gets two points and the loser one. This rule was also applied at the Ice Hockey World Championship in 2008.', 'leaguemanager' ).'</p>';
    
    		echo '<h4>'.__( 'National Hockey League (NHL)', 'leaguemanager' ).'</h4>';
    		echo '<p>'.__( 'The NHL uses a derivative of the Two-Point-Rule. The winner after regular time and overtime gains two points whereas the loser after overtime and penalty gets one.', 'leaguemanager' ).'</p>';
    	}
    Thread Starter Sharky1980

    (@sharky1980)

    Ok,

    in the hockey.php i don’t find the points after Penalty

    and how can I delete all the 0 in the result entry ?

    Thread Starter Sharky1980

    (@sharky1980)

    The Problem with still 0 solved, but where in the Hockey.php can i change the Points for Penalty?

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

The topic ‘Problem with the Plugin’ is closed to new replies.