WordPress.org

Forums

LeagueManager
3.8.8.5 - Rugby - Bonus Points (6 posts)

  1. c.kuettner
    Member
    Posted 1 year ago #

    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;
    		extract($rule);
    
    		$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;
    	}

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

  2. LaMonte Forthun
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. c.kuettner
    Member
    Posted 1 year ago #

    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:
    wiki

    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)

    THX

  4. LaMonte Forthun
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  5. c.kuettner
    Member
    Posted 1 year ago #

    nice !

    the font is changed in leaguemanager/style.css

  6. LaMonte Forthun
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • LeagueManager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic