Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Problem with Date

Quote Reply
Problem with Date
Can some one please help me to set Birthday date

this is what i mean
let say if some one put down their birthday march 27, 1982

and it will convert it to -his age is 18
and next year his age will increase to 19 and then 20 the year after....

thanx
Quote Reply
Re: Problem with Date In reply to
This type of question should be posted in the LINKS MODIFICATION FORUM since it deals with hacking codes in the LINKS script.

This will not be an easy modification to make.

You will have to do the following:

1) Use similar codes found in the Age Mod?? Topic in the DBMAN file.

2) Use a separate script to calculate the years and add a value of one to the age field. This would have to run via Cron to re-calculate the age automatically.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Problem with Date In reply to
"This type of question should be posted in the LINKS MODIFICATION FORUM since it deals with hacking codes in the LINKS script."

Sorry, I will next time
Quote Reply
Re: Problem with Date In reply to
Hmm, shoot me if I'm wrong but wouldn't it be just as easy to just put a birthday date field in and when you "build" the new page set it runs an equation that works out the age and sets it in the DB then...

Every time you run build it just works out the age again and overwrites the old age.

Seems a lot simpler if you ask me.

As for CRON, well you won't get the new age until you rebuild anyway so why not just include the "build" command (including your new age function) in the CRON and away you go...

Just my 2 penneth worth

------------------
- - - - - -
martin@websnail.net
www.WebSNAIL.org
Quote Reply
Re: Problem with Date In reply to
 
Quote:
Hmm, shoot me if I'm wrong but wouldn't it be just as easy to just put a birthday date field in and when you "build" the new page set it runs an equation that works out the age and sets it in the DB then...

Ehhem...That is what the Age Mod does for DBMAN and could be imported into LINKS (if you know anything about Perl). (Which is also what I originally suggested.)

Quote:
As for CRON, well you won't get the new age until you rebuild anyway so why not just include the "build" command (including your new age function) in the CRON and away you go...

That is the wrong approach IMHO...You will need to have a separate script that checks the birthdate against date routines in LINKS and then can be executed via Cron.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.