Promotion

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
The usergroup promotion is IMO very strange.

It selects (and promotes if necessary) only the users, which were online in the last 24h.

If i want to create a group for not active users i need another way to move them

If i send mails (with excl. offers for special users) to usergroup x it could be possible that they get the mail, but they shouldn't because they'll lose the promosion(will be transfered out of the usergroup) once the click the link...

Also if i have a condition "if registerdate is 1 year ago" promote...
But this won't also happen before the user gets online...
So we won't get the mails for these usergroup:(

Any way to optimise this?

On the other side, i can understand this way, because if there would be no limit, you'll have probably a big user foreach loop
 
The usergroup promotion is IMO very strange.

It selects (and promotes if necessary) only the users, which were online in the last 24h.
It worked the same in vb3.8.. My solution was to edit the code directly so they were promoted even if they were not online in the last 24 hours. Certainly not ideal.
 
It worked the same in vb3.8.. My solution was to edit the code directly so they were promoted even if they were not online in the last 24 hours. Certainly not ideal.
to be honnest=> don't know how it works in vB
Haven't touched the code for a long while:D

thx for the info
have to check if this will throw the famous xf- memory exceptions with xf:D
 
..have to check if this will throw the famous xf- memory exceptions with xf:D
My personal theory is that if there should be no problem because those are being done every 24hours (for most sites) i.e. as people accumulate the various promotions for what ever criteria they will be promoted as time goes on - once the initial mass promotions occur.

All I know for sure is that it is not problem for our small site.
 
My personal theory is that if there should be no problem because those are being done every 24hours (for most sites).
No, all 20 minutes
But i'm still scared of the first run.
 
It worked the same in vb3.8.. My solution was to edit the code directly so they were promoted even if they were not online in the last 24 hours. Certainly not ideal.
Please, how you've changed the code?
Can you please give us the necessary code modifications?
Thanks :)
 
Not sure you would want to change it to be honest. While it would be nice if promotions were instant, the reality is that checking all users for promotions every hour (or however often they are checked) is a huge waste of server resources. What if you have 1,000,000 users... do you really want your server spinning through them all every hour just to hopefully find one that needs a promotion? Checking users that have visited in the last 24 hours prevents server resources required for the check from going crazy.

For a special situation like Ragtak was trying to address, it would probably be better to just have a custom addon that did that specific check (based on the user date) and did the promotion itself (I assume it wouldn't be too hard to just use the existing promotion model to do it).
 
I agree with you :) But I need to run the cron once after the vb4 to xenforo migration ;)
After that, I'll put the code in place like before modification.

Anyway, I've found the code to modify, but my server goes in error 500 (probably nginx/php timeout).
Alterinatives to run the cron successfully ?

Thanks :)
 
I haven't tried it myself, but you may be able to run the cron.php script from a shell. It shouldn't require any user authentication since it's really just a triggering mechanism).
 
Top Bottom