This recipe adds a custom data field to forums which can be used to make topics posted in the forum automatically expire after a set number of hours. A custom action is used to schedule the locking of the topic at the given time. This recipe could easily be tweaked to extend the scheduled lock time if the topic author re-posts or under some other condition.
QuoteRule: Trigger scheduling custom action
- Event: Topic has been created or updated
- Truth Value (When topic is new only)
- Schedule automatic closing of a topic (Trigger the scheduling action)Rule: Schedule topic expiration based on forum setting
- Event: Action triggered: Schedule automatic closing of a topic
- Number Value (Topic expiration setting is more than zero)
- Lock content (Lock the topic at the scheduled time)