Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Auto Close

edited November 2011 in Vanilla 1.0 Help
Eliminate "discussion resurrection"! A simple extension that prevents users from adding new comments to old discussions, Auto Close removes the comment box from discussions that have remained inactive for a set amount of time.

Includes the option of "archiving" (ie, hide) old & inactive discussions, as well as exempting Stickies, Whispers, and specific Categories.

Comments

  • Brilliant add-on timfire and a very useful note about GuestPost too.

    Now this is what I call "cool" !
  • how would I change this to only be active for a certain category (news category)? Also, can the admin re-open a discussion (permission based or not)? And one more thing: Could I allow users to 'petition' to reopen a discussion (more of a request than anything) like "this discussion has been inactive for 28 days and has been closed. Click here to request that it be reopened" And if a certain number of unique users click on it within a certain period, it notifies the admin OR automatically reopens it. (15 users over the course of a year vs. 15 users in 2 hours...)
  • fysicsluvrhow would I change this to only be active for a certain category (news category)?
    That's easy. First, in the "Manual Settings" section, add an array that contains all the categories you want the extension to work in:

    [ln ~16] $Configuration['AutoClose_CategoryID'] = array('1', '2', '3'); // Etc.

    Then, change the if-condition at line 47 as follows:

    [ln 47] if (($CommentGrid->Discussion->DateLastActive + (60 * 60 * 24 * $CommentGrid->Context->Configuration['AutoClose_Length'])) < time() && !($CommentGrid->Context->Configuration['AutoClose_OpenStickies'] && $CommentGrid->Discussion->Sticky) && in_array($CommentGrid->Discussion->CategoryID, $CommentGrid->Context->Configuration['AutoClose_CategoryID'])) {
    fysicsluvrAlso, can the admin re-open a discussion (permission based or not)?
    Yes, posting to old discussions is permissions-based. Simply adding a new comment to an inactive discussion will reset its status and open it back up.
    fysicsluvrAnd one more thing: Could I allow users to 'petition' to reopen a discussion (more of a request than anything) like "this discussion has been inactive for 28 days and has been closed. Click here to request that it be reopened" And if a certain number of unique users click on it within a certain period, it notifies the admin OR automatically reopens it. (15 users over the course of a year vs. 15 users in 2 hours...)
    That would take a lot of work, more than what the extension is right now! I don't think I want to mess with that, I like the extension nice and simple. On my forum, if someone wants to continue an inactive discussion, I just tell them to start a new one with a link to the old one.
  • Uploaded version 1.1 of Auto Close.
  • Uploaded version 1.1 of Auto Close.
  • Uploaded version 1.1 of Auto Close.
  • Sorry for the rapid uploads, I had to fix a couple of typos in the readme. In version 1.1, I added the option to exempt Whispered discussions & specific Categories (as fysicsluvr suggested).

    I realized there is a slight "quirk" with (non-whispered) discussions that contain whispered comments. If a discussion contains a whisper as its final comment, Auto Close will determine the inactive period differently for the author & recipient of the whisper as it does for everyone else. In effect, the discussion will remain "open" longer for those two users than it does for users who can't see the whisper.

    It's a pretty minor thing, but it's worth noting in case a auto-closed discussion suddenly re-opens.
  • Uploaded version 1.2 of Auto Close.
  • I added a settings page, so admins no longer need to manually change settings. I also added an "archiving" option to hide old & inactive discussions.
  • I installed this extension and getting many errors. I m facing following problems 1.After expiration period the post deleted. 2. No archiving tab 3. No way to get back archive posts 4. If post expires. and somebody arrive from search engine or from link . If give bunch of errors. for eg. If discussion id 3 expires and someone opens from old link or come from seach engine. It will give you pages of errrors
  • MrKool,

    1) I assume you mean that posts disappear, rather than being deleted from the database, right? The posts re-appear if you disable the extension, right? Do the posts re-appear if you disable the "Archive" option?

    2) I have to ask the simple questions first---you're tried clicking the "Create Menu Tab" option (the option is off by default), right? You're saying that when you select that option, the Panel link disappears but no tab shows up? Does the Panel link appear if you re-click the "Add Discussion Filter" option?

    3) See above.

    4) Now this I'm not sure about, there's very little difference between new & old discussions. What versions of Vanilla and PHP are you using? What are the specific errors you're getting?
  • Uploaded version 1.3 of Auto Close.
  • Version 1.3 fixes some minor issues I found.
  • support for 1.1.5a too??

    edit: if I put 1 day then it wont't list in archiv. why? If I change my computer time, possible?
  • no idea? can someone confirm, that can use with 1.1.5a?
  • I am having one of the same issues that Mr Kool is experiencing: no archive tab appears no matter the settings under Extension Options->AutoClose. Anything I should look at?

    Vanilla 1.1.8
    PHP 5.2.9
  • is there a version or function vanilla 2 that works like this?
Sign In or Register to comment.