• 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

Daphonic

Active member
#1
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.
 

Martok

Well-known member
#2
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
AND
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
AND
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:

Daphonic

Active member
#3
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?
 

Martok

Well-known member
#6
The way you described it doesn't seem to work.
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.
 

Martok

Well-known member
#8
Ok I will let it run, and see if it starts working.
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.
 

Daphonic

Active member
#9
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.
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.
 

Martok

Well-known member
#10
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.
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.