Skip to:
Content
Pages
Categories
Search
Top
Bottom

expired topics

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

Viewing 3 replies - 1 through 3 (of 3 total)

  • _ck_
    Participant

    @_ck_

    This would be a very simple plugin.

    I’ll try to whip it up for you when I have a moment.


    _ck_
    Participant

    @_ck_

    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
    }
    }
    }

    You’re the best, _ck_! I’ll try it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar