1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Auto Promotions

Discussion in 'XenForo Questions and Support' started by Daphonic, Apr 20, 2016.

  1. Daphonic

    Daphonic Active Member

    I'm working on a Rank system for our Site. Basicly Level 1-50+ I wanted to use Auto Promotions to give someone the new Rank, but how can I remove the old rank?

    So person gets enough Trophy points to hit Level 21. Auto promotion should add them to Rank 21, and remove rank 20.

    Reason I'm doing this, is we will have TeamSpeak add on sync Ranks. I would like to have members Ranks show in TeamSpeak and auto show.
  2. Martok

    Martok Well-Known Member

    To remove someone from a user group, they would have to no longer meet the criteria for auto promotion to that group.

    As there is is only a 'User has at least X trophy points", then this might work:

    Specify the required trophy points AND
    User is not a member of all of the user groups above the user group they are being promoted to:

    So for rank 2 it would be something like:
    User has at least 20 trophies
    User is not a member of rank 3, 4, 5..., 50

    For rank 30 it would be something like:
    User has at least 300 trophies
    User is not a member of rank 31, 32, 33..., 50

    I *think* that would work.

    **Edit** I've just noticed you're using a Ranks add-on. I assumed Ranks was related to user groups. If it isn't, I don't think it can be done without custom development (you'd have to ask in the add-on thread about this).
    Last edited: Apr 20, 2016
  3. Daphonic

    Daphonic Active Member

    I use the Steam Rank System that just goes off Trophy Points.

    So if I did it like you say, it will auto promote them to say level 20, and remove level 19?
  4. Martok

    Martok Well-Known Member

    If the ranks are directly related to user groups eg rank 1= user group 1, rank 2 = user group 2 etc then I think it should work.
  5. Daphonic

    Daphonic Active Member

    The way you described it doesn't seem to work.
  6. Martok

    Martok Well-Known Member

    It does work, but what seems to happen is it adds the user to all applicable rank user groups on the first run of the user group promotion cron, then on the next run it removes them from the user groups they shouldn't be in and only leaves then in the the correct rank user group. This part is easy to work around by rebuilding the user group promotions in the ACP twice.

    After that, it does work, though when it promotes to the next rank user group up it still leaves the user in the previous rank user group until the hourly user group cron runs again, at which point it removes them from that and leaves them only in the rank user group that they are supposed to be in.

    So it's not a perfect solution but if you can cope with the 'two ranks for an hour' issue then it might be OK at least for now.
  7. Daphonic

    Daphonic Active Member

    Ok I will let it run, and see if it starts working.
  8. Martok

    Martok Well-Known Member

    Make sure you rebuild the user group promotions cache twice in the ACP as I suggested, that'll get it working initially. It's only after this that there will be the 'two ranks for 1 hour' issue.
  9. Daphonic

    Daphonic Active Member

    where do i go to rebuilt the user group promotions? The cron job ended up giving me Rank 1 and 2, so it didnt remove rank 1 tho.
  10. Martok

    Martok Well-Known Member

    ACP Search for "rebuild caches"

    Running the cron twice should have sorted that.
    Rebuilding the User Group Promotion cache (twice) will apply the promotions to all users, not just the active ones.
  11. Daphonic

    Daphonic Active Member

    I've rebuilt twice, but it wont remove the lower ranks.. so i'm in Rank 1, 2 ,3 for my tests.
  12. Martok

    Martok Well-Known Member

    Post a screenshot of the criteria for the promotions for ranks 1, 2 and 3.

Share This Page