Support » Plugin: myCRED » Points question

  • Resolved mikecrf121

    (@mikecrf121)


    So i Have a site where i have every major sport and challenges for each.
    so each challenge for say football will have 50 winners and 1st gets more points then 2nd and so on.
    I then want these points to count towards an over all leaderboard so im thinking ill need a point sytstem for each sport, but then have all those 5 different point types add up into overall points.

    These point types will be used to calculated 1.leaderboard for each sport.
    and 2. overall leaderboard for all sport points combined.

    Can this be done with this point system/plugin??

Viewing 5 replies - 1 through 5 (of 5 total)
  • actually figured out how to do this :).
    so this will give leaderboard for whatever pointsspecifically, or a combination you want. hope this helps people as well.

    SELECT
    row_number() OVER (ORDER BY score DESC) AS ‘Rank’,
    users.user_nicename AS User,
    SUM(*********usermeta.meta_value) AS ‘Score’
    FROM ***********usermeta
    INNER JOIN ******users
    ON *********usermeta.user_id = *********users.ID
    WHERE 1=1
    AND **********usermeta.meta_key = ‘mycred_default’ //use only this for just 1 point type
    OR ***********usermeta.meta_key = ‘mycred_winnings’//keep adding point types to include in overall points combined total
    GROUP BY User

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi @mikecrf121,

    Glad to hear that you were able to figure out the solution to your problem. We also appreciate you sharing the solution for others.

    Kindly feel free to contact us again with any query regarding our plugin.

    Thanks!

    correction to my solution for all point type leaderboard
    SUM(CAST(usermeta.meta_valueAS INT)) AS ‘Score’

    @mikecrf121
    Thanks for sharing and i will test soon on my site…
    have a nice evening

    Plugin Author WPExperts.io

    (@wpexpertsio)

    Hi there,

    Thank you for updating.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.