• Resolved pablog

    (@pablogutierrez)


    Hi,

    We’re having so much fun with this plugin for the World Cup 2026!

    When using the [fp-ranking] shortcode, is it possible to sort users alphabetically when they have the same number of points?

    For example, if two or more users have the same score, could the ranking table use their names as a tiebreaker and display them in alphabetical order?

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AntoineH

    (@antoineh)

    By default the order is based on points, then amount of full scores, amount of toto scores and amount of bonus questions correct. If that is still resulting in a tie, then the order is alphabetically on name.

    But it is possible to change this behavior. You’ll need a (fairly) simple extension that changes the SQL statement for the order and once this extension is active, you’ll have to do a re-calculation of the scores to make the new ordering effective.

    I already had some example code, so I changed it to match your requirements. See result here.

    Explanation: I remove the mentions of the beforementioned rules from the SQL statement by replacing them with an empty string. This leaves only the total points (high-low) and the name (a-z).

    Thread Starter pablog

    (@pablogutierrez)

    YES! It worked! Thanks!

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

You must be logged in to reply to this topic.