PDA

View Full Version : Auto-prune via cron


FASherman
09-12-2002, 02:48 AM
This is something I want for myself and have nearly complete. The question is whether there is any interest in me posting it as a hack.

It is a perl script that auto-prunes threads based on a unique setting for each forum. Here is how it is going to work when it is complete.

You create an admin-only viewable forum called archive or something to that affect.

Each forum has two additional data fields. One is the inactivity period before pruning, the other is a yes/no to archiving.

If a forum is set to archiving, if it is inactive for longer than the specified period, it is moved to the archive forum, the last activity date is updated and the text of the first post will be appended with "archived from XXXXX forum on dd/mm/yyyy."

If archiving is set to no, it will be the thread, associated posts, polls and attachments will be deleted.

For the archive forum, the archive option will have to be set to no and the inactivity period the the "holding period" to remain in archive.

So, lets say a thread gets archived. To a user, it appears deleted. After the archive hold period it is deleted.

You still have all the info to restore it via the move thread option.

All of this will happen via a perl script run from cron.

It'll take some hacks to the PHP code to manage the new forum fields. No big deal there.

Does this seem like its of any value to anyone?

Amzadi
01-29-2004, 05:57 AM
I wish I had a scheduled cron that moved inactive users to another specified group.