Support » Plugin: SportsPress - Sports Club & League Manager » Special teams position ordering

  • Resolved chavo

    (@chavo)


    Hi. First at all: excellent plugin! Hurray for the improvements since the last version I tested.

    I need some help with the configuration of an additional rule in table columns. I need to add a “fair play” rule. What it means? If two or more teams have equal points, it is not goal difference what defines positions. Instead of this, fair play points makes the difference (less points means higher position). How fair play is defined:
    – For each yellow card: 1 point
    – For each red card: 3 points
    – Not playing match (lack of players): 5 points
    – Serial injuries and fired of the tournament: 17 points.

    Yes, it’s a little bit tricky, but this is how rules were writen. Any ideas in how can I accomplish that task? Would it be possible to automatic adds yellow / red card penalty points?

    ps: sorry for my english.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out!

    You could only add this automatically if you had a field for the event result for yellow /red cards, not playing a match and serial injuries.

    I recommend you simply adding field for the fair play score in each match. And that would be manually added. This way you can use that as a variable in your table columns and use them as the second sort order attribute.

    Kind Regards,
    -Roch

    Hi Roch. Thanks for your reply. So, how can I add two fairplay extra fields (one for each team) to the Results metabox and then use it as a variable?
    I guess that I can do it into my functions.php file, but… which is the appropiarte code?. Sorry, I’m not a code master editor 🙁

    Thanks in advance.

    Plugin Support Roch

    (@rochesterj)

    Hi!

    Actually no custom code is required.

    You can add that under SportsPress > Configure > Event Results > Add new

    There you can do some math with the variables such as goals and yellow / red cards and anything else you have as player metrics 🙂

    Kind Regards,
    -Roch

    Ok. Thanks for your reply!

    Plugin Support Roch

    (@rochesterj)

    You’re most welcome!

    Let us know if you need anything else.

    Kind Regards,
    -Roch

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Special teams position ordering’ is closed to new replies.