• Resolved ryan944

    (@ryan944)


    Antoine hi, great plugin !. Q. have created a website with your plugin and works great and testing it now ready to go live for prem and euro2020(21). We have 60 people playing and the highest weekly scorer in points gets a payout. Is it possible to have a rankings table not only showing overall ranking but weekly ranking ?…even if this is set from thurs to thurs..or a date entry.?
    Thanks
    Ryan

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

    (@antoineh)

    A ranking per week can only be achieved if you first create them as a custom ranking. Once created, you can show them on your site via the [fp-ranking] shortcode.

    A small warning: adding a lot of custom rankings can increase the time it takes to complete one calculation in the admin tremendously. If you find that the calculation takes too long, you can try to optimize your server config or use WP-CLI to do the calculations via the shell (if available on your server).
    Or simply ‘archive’ old rankings by copying the html of the ranking table to a post/page and then delete the ranking.

    Thread Starter ryan944

    (@ryan944)

    Antoine hi – thanks for reply. I am struggling to get the shortcode correct to show a weekly leader table of all players from say last tuesday until today or postdate. Yes can copy html and post it as an archive which is a great idea. I hace read all the help page and done a save on the matches so that it calculates but alas will not show the correct figures. Is there anywhere else I can read and learn the short code method?. Here is the site I am testing ready for next yr prem and euros.
    https://rbelectrical-services.co.uk/prem/ranking/

    Plugin Author AntoineH

    (@antoineh)

    The ranking shortcode [fp-ranking] does not support a ‘from date’ – ‘to date’ ranking. The date parameter only works as an ‘until date’ filter on the ranking. You can enter one date, e.g. 2020-09-01 00:00, and it will in that case show the ranking with only matches and questions until that date.

    If you want to have a leaderboard for matches in one week, then you must create a custom ranking in the admin, attach only the matches for that week and do a calculation. And then you can use the shortcode like this: [fp-ranking ranking="4"]
    You can find the correct ranking ID on the Rankings admin page (hover over a row to see the id).

    Thread Starter ryan944

    (@ryan944)

    Antoine hi – thats great ! very well explained and have now implemented the changes.
    Do you recommend to delete the previous rankings once a new week is added..?..
    will this effect the calculation time when theres 60 users and we are well into a season or competition?. To show all users in the weekly table -is default all or do I have to enter the short code to select all players.?..I suppose the only other question is that is there a shortcode to extract the number of exact scores by users predicted into a table? with name and amount of correct scores. Thank you very much for your time and swift reply. This is a super plugin.
    https://rbelectrical-services.co.uk/prem/weekly-leaderboard/

    Plugin Author AntoineH

    (@antoineh)

    Do you recommend to delete the previous rankings once a new week is added..?..

    Only if the calculation time is too long. Otherwise, I would just leave them. Reason: when you delete them, you’ll have to replace the shortcode for that ranking with the static html.

    will this effect the calculation time when theres 60 users and we are well into a season or competition?

    Yes, but it depends on your server config how big the effect is. I would just try and take measures only when needed. 60 users doesn’t sound like something that would cause big problems.

    To show all users in the weekly table -is default all or do I have to enter the short code to select all players.?..

    The shortcode always caps the amount of users. Default is 5. But if you want all users, just fill in 1000 in the parameter. That will at least work until your user base grows to 1000 ??
    [fp-ranking ranking=4 num=1000]

    I suppose the only other question is that is there a shortcode to extract the number of exact scores by users predicted into a table? with name and amount of correct scores.

    No, not a separate shortcode. There is an extension* that puts this info in the ranking table. Maybe that is something that you can use. Either by default in all rankings, or hide the info in the other rankings via css and only show the info in the table where you want it.

    * The extension can show the amount of full scores, or the total points from full scores. See template in the code for the value that is used.

    Thread Starter ryan944

    (@ryan944)

    Antoine hi – thank you again and also for the ranking-score-breakdown.php link will activate it and use it with some css. Lets hope that life returns to normal in the very near future – but has given me time to learn wordpress etc and get a footy site active on the net rather than sending excel files.All the best.
    Ryan

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Weekly ranking’ is closed to new replies.