Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Show a link when Date is < than today

Quote Reply
Show a link when Date is < than today
Hello,

I use Links SQL for a Running Portal http://www.LaufSuche.de

In my Dbase are Links to Runningevents but my Problem is the older Events shoud be not listed !!
For Example:

The Event is on 01.04.2004 and today is the 18.04.2004 , the Event ist now old and not interested for my User.
But I will not delete this Event because the Owner will edit this for the next Year.

Is there any Way to say " Create only Links when Date is < Today" ??

Sorry for my bad English, I live in Germany

Thanx for your Help
Qix

Is there any German writing User here ?!?
Quote Reply
Re: [qix] Show a link when Date is < than today In reply to
Ich würde das über ein zusätzliches Feld
machen und dieses Feld beim Aufbau der
Seiten auf True oder False setzen.
Dazu würde ich mal einen Blick auf die
Links Routine zur Generierung des Status
"Whats New" werfen und diesen dann
entsprechend umarbeiten.
Quote Reply
Re: [eljot] Show a link when Date is < than today In reply to
Hallo eljot,

schonmal vorab vielen Dank für deine Hilfe.
Ist das nur in der nph-build.cgi oder muss ich da noch wo anders suchen ??

gruss
frank
Quote Reply
Re: [qix] Show a link when Date is < than today In reply to
In order to do this inside links, it requires a lot of changes. That is to get the "counts" and span pages correct.

A *very* simple way to do this, is to use the expire-links plugin, which will expire your links

Or, you can set up a cron job that simply updates the database so that:

UPDATE prefix_Links SET isValidated='No' where Expire_Date < CURDATE

You need to make a small script, to run, which sets up the links headers, but simple.

That will set all expired links to not-validated, and you can delete or archive them as you wish.

If you want to DELETE expired events, without a second chance...

DELETE FROM prefix_Links where Expire_Date < CURDATE

Expire_Date is the date field of your table that tells when the link expires.

DO NOT USE THIS AS IS ON ANY SITE!!! It must be customized a bit for your use.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Show a link when Date is < than today In reply to
Hello Pugdog,

where can I find the "expire-links plugin" ??

Can you write me such "a small script" ??

Thanx
qix
Quote Reply
Re: [qix] Show a link when Date is < than today In reply to
Dieses wird über die nph_build und build.pm
gesteuert.