Title: Rugby &#8211; points
Last modified: August 30, 2016

---

# Rugby – points

 *  [soku13](https://wordpress.org/support/users/soku13/)
 * (@soku13)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/rugby-points/)
 * Hi Kolja. You’re doing great job. I’ve found one error in the code. In Rugby 
   it should be this way:
 * if ( $match->tries[$index] > 3 )
    $points[‘plus’] += 1;
 *  // Current Team Lost Match with less than 8 points
    if ( $match->loser_id ==
   $team_id && abs($match->home_points-$match->away_points) < 8 ) $points[‘plus’]
   += 1;
 * You have lesst than 6 points and more than 4 tries. In rules it’s extra points
   for 7 or less and 4 or more.
 * [https://wordpress.org/plugins/leaguemanager/](https://wordpress.org/plugins/leaguemanager/)

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

 *  [cducauze](https://wordpress.org/support/users/cducauze/)
 * (@cducauze)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/rugby-points/#post-6728029)
 * Hi Soku13,
 * I’ve changed the code as well, however there is a little mistake in your code.
   You don’t get a bonus if you score 4 tries are more but if you score 3 more tries
   than the over team.
 * The problem of the plugin is that he uses world rugby rules (world cup and european
   cut) : if you score 4 tries you get a bonus when in France it’s now 3 more tries.
 * As a consequence, I’ve changed the code like that :
 *  // Default : Bonus = 4 tries
    //if ( $match->tries[$index] > 4 )
 *  // French rules : Bonus = +3 tries
    if ( $match->winner_id == $team_id && abs(
   $match->tries[‘home’]-$match->tries[‘away’]) >= 3 ) $points[‘plus’] += 1;
 *  // Current Team Lost Match by 7 points or less
    if ( $match->loser_id == $team_id&&
   abs($match->home_points-$match->away_points) <= 7 ) $points[‘plus’] += 1;
 * Hope that help you 😉
 *  [jekbau](https://wordpress.org/support/users/jekbau/)
 * (@jekbau)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/rugby-points/#post-6728032)
 * The very problem with rugby is that league points changes depending on the League
   you are playing in (for example, in France they use a different system point 
   than in England). I developed an alternate class and you can find some more info
   here: [https://wordpress.org/support/topic/rugby-alternate?replies=2](https://wordpress.org/support/topic/rugby-alternate?replies=2)

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

The topic ‘Rugby – points’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/leaguemanager.svg)
 * [LeagueManager](https://wordpress.org/plugins/leaguemanager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaguemanager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaguemanager/)
 * [Active Topics](https://wordpress.org/support/plugin/leaguemanager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaguemanager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaguemanager/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [jekbau](https://wordpress.org/support/users/jekbau/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/rugby-points/#post-6728032)
 * Status: not resolved