I agree with Will on this.
Create "events" over the pages, so every time an event occurs, i.e. the user deletes the message, he will request the event module with the event, say EVENT_USER_DELETE_POST, and then you can select this event and build a request on it. You can then decide whether the badge is awarded or not.
This will keep the two logic separate and keep the modular design. It should be very easy to implement this way.
The only drawback is that if the event was not “captured”, then the user may have earned the criteria for skipping, but he has not yet been rewarded. However, this should never happen. The only situation I can think of is to manually manipulate the database.
Gary Green Feb 07 '09 at 2:08 2009-02-07 02:08
source share