Info
- 4 posts
- 2 voices
- Started 3 years ago by ddemeo
- Latest reply from ddemeo
expired topics
-
- Posted 3 years ago #
I'd love to see the ability to have topics automatically expire. In other words, if a topic hasn't had a new post in a given amount of time, it could optionally be closed or deleted automatically. For those of us that wish to keep our databases small, this might be pretty helpful.
-
- Posted 3 years ago #
This would be a very simple plugin.
I'll try to whip it up for you when I have a moment. -
- Posted 3 years ago #
Untested. auto-closes a topic on-the-fly when someone visits it and it's last post is 90 days old (adjustable)
add_action('bb_head','auto_close_topic'); function auto_close_topic() { global $topic; if (is_topic() && $topic->topic_open===1) { $old=time()-3600*24*90; // 90 days default if (strtotime($topic->topic_time)<$old) { bb_close_topic($topic->topic_id); $topic->topic_open=0; // just in case the cache doesn't clear } } } -
- Posted 3 years ago #
You're the best, _ck_! I'll try it!
-
You must log in to post.