Forums

Join

Info

expired topics

  1. 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.

  2. This would be a very simple plugin.
    I'll try to whip it up for you when I have a moment.

  3. 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
    }
    }
    }
  4. You're the best, _ck_! I'll try it!

  5. You must log in to post.