Rebuild User Cache with cron entry

I don't want to open an another thread, but I'm in a similar situation.
I've created a new usergroup called Birthday, so each user celebrating his birthday is promoted for one day.
The issue is: the promotion only works if the user logs into the forum on hist birthday, otherwise I have to run "Rebuild User Group Promotions" via cron.
 
@loplo Just curious, if the user doesn't log in on his birthday then why does it matter if the promotion isn't applied?
 
The promotion adds a banner to the username, that's the only thing that this promotion does.
Most people don't have time for the forum on their birthday (family/birthday trip/etc), but the rest of the forum can write some "Birthday wishes" on his profile page, dedicated thread, etc, after noticing the "birthday banner".
 
You could accomplish something similar with template edits and avoid the overhead and limitations of the promotion system, but I realize it's a bit cumbersome in its own right:

Code:
<xen:if is="{$user.dob_day} == {xen:date $serverTime, 'd'} AND {$user.dob_month} == {xen:date $serverTime, 'm'}">
    <em class="userBanner wrapped" itemprop="title">
        <strong>Birthday</strong>
    </em>
</xen:if>

Putting that in the right place in the message_user_info and member_view templates would show the banner in posts and on the profile. You could customize it further with CSS classes on the <em> tag.

The downside being it relies on the server's timezone, not the forum's/user's. I'm not sure if there's a way around that.
 
Last edited:
Top Bottom