Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [pugdog] Expirator

Quote Reply
Re: [pugdog] Expirator In reply to
Hi Pugdoq,

Thanks for the answer, but i still blur some of explanation, please help:

In Reply To:
You need to add a field to the Links table "expired" and make it an Int or small Int.

Yes, i add the new table follow the instruction above with the 'Column Name: Expired' --> 'Column Type: INT' --> 'Column Index: None' --> 'Not Null: No' --> 'Form Type: Select' -->
'Form Name: 15 30 45 60' --> 'Form Values: 15 30 45 60' -->

My problem now, i still dont understand how to make the next step as below, Please help to give more detail how to make it .. Thanks.

In Reply To:
The rest of the use would be in your templates by using <%if expired%> tags.

If you want the ads deleted when they expire, this should be part of the cron script.

It needs to:

delete from Links where Expired=0

and run right after the cron script that decrements the date.

Update Links Set expired=expired-1 where Expired > 0

In your templates, if <%Expired%> is greater than 0, the ad is not expired, so
it actually works backwards -- you might want to rename the field -- but I
prefer just using a more complete test --

<%if Expired >0%> rather than the short hand <%if Expired%>
Subject Author Views Date
Thread Expirator reenee 6776 Jan 3, 2002, 12:02 PM
Thread Re: [reenee] Expirator
pugdog 6641 Jan 3, 2002, 1:22 PM
Thread Re: [pugdog] Expirator
reenee 6623 Jan 3, 2002, 2:05 PM
Thread Re: [reenee] Expirator
pugdog 6627 Jan 3, 2002, 4:18 PM
Thread Re: [pugdog] Expirator
reenee 6608 Jan 5, 2002, 1:08 AM
Thread Re: [reenee] Expirator
pugdog 6570 Jan 5, 2002, 2:22 AM
Thread Re: [pugdog] Expirator
reenee 6570 Jan 5, 2002, 3:17 AM
Thread Re: [reenee] Expirator
reenee 6582 Jan 6, 2002, 1:21 AM
Thread Re: [reenee] Expirator
Paul 6576 Jan 6, 2002, 1:37 AM
Post Re: [RedRum] Expirator
reenee 6501 Jan 20, 2002, 10:03 AM
Thread Re: [pugdog] Expirator
Andrew Mitcham 6461 Mar 18, 2002, 5:32 AM
Thread Re: [Andrew Mitcham] Expirator
webmaster33 6467 Mar 18, 2002, 8:13 AM
Thread Re: [webmaster33] Expirator
Andrew Mitcham 6444 Mar 18, 2002, 9:57 AM
Post Re: [Andrew Mitcham] Expirator
pugdog 6488 Mar 18, 2002, 10:04 AM
Thread Re: [Andrew Mitcham] Expirator
webmaster33 6321 Sep 2, 2002, 5:30 AM
Thread Re: [webmaster33] Expirator
Andrew Mitcham 6315 Sep 2, 2002, 7:12 AM
Post Re: [Andrew Mitcham] Expirator
webmaster33 6286 Sep 2, 2002, 7:34 AM