Support » Plugin: LeagueManager » – Rugby – Bonus Points

  • Hi there, great plugin – making things so easy 😉

    In the rugby sports module the bonus point system needs an update (ok, there are different systems available, but this one is most common):

    Bonus Point Try: more or equal than 4
    Bonus Point Lost: less or equal than 7

    function calculatePoints( $points, $team_id, $rule )
    		global $leaguemanager;
    		$matches = $leaguemanager->getMatches( "(<code>home_team</code> = {$team_id} OR <code>away_team</code> = {$team_id})" );
    		foreach ( $matches AS $match ) {
    			$index = ( $match->home_team == $team_id ) ? 'home' : 'away';
    			if ( $match->tries[$index] >= 4 )
    				$points['plus'] += 1;
    			// Current Team Lost Match with less than 6 points
    			if ( $match->loser_id == $team_id && abs($match->home_points-$match->away_points) <= 7 )
    				$points['plus'] += 1;
    		return $points;

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author LaMonte Forthun


    Does it make sense to keep the method that’s currently available and add this as an option or would it be better to make the bonus point system fully modifiable? Thanks for the feedback, anything else you can help with to expand the Rugby features would be appreciated.

    Yes, it makes sense to have more options. Following options would be great:

    • Common System: 4 Points for win, 2 Points for Draw, 7 or less Points loosing, score 4 or more tries
    • French System: 4 Points for win, 2 Points for Draw, 7 or less Points loosing, score at least 3 or more tries than your opponent
    • Six Nations System: 2 Points for win, 1 Point for Draw, no Bonus Points

    4 Point and 2 Point System are already working – is it possible to uncupple the Bonuspoint System and make it configureable?

    See also:

    Another feature:
    x) I have found a code snippet for inter-group-matches (just disable the ‘group’ part of the WHERE in match.php
    An option on league-settings would be great! (so i do not have to code after updates)

    x) I have modified the font for the tables – i had to do it in the style.css of the plugin. After an update. i have to manually set the values. An option for custom css would help (at the same spot where I can set the table colors)


    Plugin Author LaMonte Forthun


    Good information, thank you.

    Inter-group matches is part of the latest release, you can set it up in the league preferences.

    You modified the font for the tables on the template or in the admin section?

    nice !

    the font is changed in leaguemanager/style.css

    Plugin Author LaMonte Forthun


    Yeah, that’s why I was asking… Good that you found it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ – Rugby – Bonus Points’ is closed to new replies.