Gossamer Forum
Home : Products : Gossamer Forum : Pre Sales :

Expire post automatically

Quote Reply
Expire post automatically
I'm looking for a forum program to use as a forum/classifieds.
I like the freedom of a forum so users can write a little more then being restricted in a classifieds program.

Can this forum expire posts automatically? By a given number of days or the option of never expire, controled by the poster.

For example, if the poster wanted there message to be displayed for four days then it would automatically be deleted or taken off the board with a message sent to the poster for renewal.



Thanks Smile
Quote Reply
Re: [Code07] Expire post automatically In reply to
I'm debating over this forum program or VB. I would buy this one if this option was available.
Quote Reply
Re: [Code07] Expire post automatically In reply to
You've said that in two different posts now, it sounds like blackmail Cool j/k

All you'd need to do would be to set up a script via cron to delete the posts with a timestamp older than x minutes.

eg...

require GT::SQL::Condition;
my $cond = GT::SQL::Condition->new( 'post_time', '<', (time - 10800) );
$DB->table('Post')->delete( $cond );

There may be a little more to it than that, but that's the idea.

Last edited by:

Paul: Jun 3, 2002, 8:39 AM
Quote Reply
Re: [Paul] Expire post automatically In reply to
how can this be done by giving the poster the option of days to automatically delete or never delete.

I can do a cron for a set time period as a general rule but I wanted the poster to have the ability to choose how many days they wanted to have their message viewed.

With numerous posts I think I would need a mod/hack. What do you think?

Last edited by:

Code07: Jun 3, 2002, 8:53 AM
Quote Reply
Re: [Code07] Expire post automatically In reply to
Create a new column in the post table from the admin table editor, say "post_expire", then add a text field on the post/reply page where the number of minutes can be entered until it expires and then run the script via cron to pickup the time from the posts table and delete it if it is old.

Someone else may come up with a better idea..