Expire

Expire is a Vanilla extension that will automatically close, sink or hide discussions that have no new comments for a certain number of days. Sticky discussions are always active and will never expire. No more than once per day, Expire will check for inactive discussions and hide those discussions or mark them as Closed or Sink.

Table of Contents


Installing and Enabling Expire

In order for Vanilla to recognize an extension, it must be contained within its own directory within the extensions directory. So, once you have downloaded and unzipped the Expire files, you can then place the folder containing the default.php file into your installation of Vanilla. The path to Expire's default.php file should look like this:

/path/to/vanilla/extensions/Expire/default.php

Once this is complete, you can enable Expire through the "Manage Extensions" form on the settings tab in Vanilla.


Configuration Settings

The easiest way to change Expire's settings is to install and enable SetList. Once you enable SetList, forum administrators will see a link to Expire in the side panel of the Vanilla settings page.

Expire has four settings. They are stored in Vanilla's conf/settings.php file.

$Configuration['Expire.DaysOld']
The number of days with no new comments before a discussion expires. If this value is "0", old discussions will never expire.
$Configuration['Expire.Action']
"Close" - Old discussions will be closed.
"Sink" - Old discussions will be sunk.
"Hide" - Old discussions will be hidden.
$Configuration['Expire.IgnoreWhispers']
By default a discussion will not expire if it has recent whispers. Set this value to "1" to force a discussion to expire if it has no recent visible comments.
$Configuration['Expire.LastLook']
The last time Expire went looking for old discussions. Set this value to "0" to force Expire to go looking immediately.

Development

Expire was written by squirrel. Part of the Vanilla Friends project.