Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Expired Links?

Quote Reply
Expired Links?
Has the expirator mod for Links2.0 been made for Links SQL? or is it compatible? I really need this mod before I can uprade to links SQL.
Quote Reply
Re: Expired Links? In reply to
Hi,

you don't need a mod for that. Just use SQL. In admin use the SQL-Monitor and send :

delete from Links where Add_Date < '2000-01-18'

this will delete all links which are older than the given date.

regards, Alexander
Quote Reply
Re: Expired Links? In reply to
But, can users set an number of days after which their links will expire?
Quote Reply
Re: Expired Links? In reply to
Well,

Just add a Field in the Links table and call it Exp_Date.
Let the User enter a Date when his link will expire.

The you can delete all expiring links with the SQL command:

delete from Links where Exp_Date < '2000-01-18'

regards, Alexander

Quote Reply
Re: Expired Links? In reply to
I have some links that I'd like to expire (like contests, etc.) and other links which I don't want to expire. Would leaving the Exp_Date field blank on the non-expiring links exempt them from deletion when I run the "delete from Links where Exp_Date < '2000-01-18'" command?

Thanks! Smile

Katina
Quote Reply
Re: Expired Links? In reply to
For safety's sake I would add something like

((Exp_Date < '2000-01-18') and (Exp_Date != '0000-00-00'))

That way empty date fields are exempted from deletion.

You could also make the test

((Exp_Date < '2000-01-18') and (Exp_Date > '1998-01-01'))

That would delete dates only within the past 2 years.






Quote Reply
Re: Expired Links? In reply to
Thanks for the suggestion.. I'll try it that way!! Smile

Katina