Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: Days Old Plug In works okay?

Quote Reply
Re: Days Old Plug In works okay? In reply to
Funny this thread bubbled up again.

I was just playing with the Days_Old.pm file to see if I could get it to be run from inside the templates, rather than as a display hook.

I'm getting very odd results, which leads me to believe there might be a nesting problem, or other limitation in 'depth', in the template parser.

Doesn't look like GT::Date is being called properly when GT::Plugins::link is called from the template. I tried the simple things like re-initializing the Links::date_init but that didn't work.

Just odd this thread popped up :)

Also, you can do something like:
Code:
if (($link->{'isNew'} eq 'Yes') or ($link->{'isNew'} == 1)){
$link->{'Days_Old'} = GT::Date::date_diff ( GT::Date::date_get(), $link->{'Add_Date1'});
}
else {
$link->{'Days_Old'} = '';
}
to catch where the field is 'Yes' or '1'. Might not be an issue for most people, but it catches both positive values which is important if you call it before the 'isNew' flag is changed over.


PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Plugins:http://LinkSQL.com/plugin
Subject Author Views Date
Thread Days Old Plug In works okay? Pitman 6792 Apr 19, 2001, 10:44 AM
Thread Re: Days Old Plug In works okay?
katabd 6742 Apr 19, 2001, 11:34 AM
Thread Re: Days Old Plug In works okay?
Pitman 6717 Apr 19, 2001, 12:17 PM
Thread Re: Days Old Plug In works okay?
Clint 6639 Apr 19, 2001, 10:37 PM
Thread Re: Days Old Plug In works okay?
pugdog 6665 Apr 19, 2001, 11:43 PM
Thread Re: Days Old Plug In works okay?
Pitman 6620 Apr 21, 2001, 8:24 AM
Thread Re: Days Old Plug In works okay?
Robert_B 6639 Jul 11, 2001, 6:56 AM
Thread Re: Days Old Plug In works okay?
pugdog 6611 Jul 11, 2001, 12:10 PM
Thread Re: Days Old Plug In works okay?
pugdog 6585 Jul 12, 2001, 8:19 AM
Thread Re: Days Old Plug In works okay?
pugdog 6592 Jul 14, 2001, 2:40 AM
Thread Re: Days Old Plug In works okay?
Pitman 6583 Jul 14, 2001, 4:40 PM
Post Re: Days Old Plug In works okay?
pugdog 6586 Jul 14, 2001, 8:08 PM
Thread Re: Days Old Plug In works okay?
pugdog 6542 Jul 16, 2001, 1:20 AM
Thread Re: [pugdog] Days Old Plug In works okay?
pugdog 6349 Jan 1, 2002, 6:58 PM
Post Re: [pugdog] Days Old Plug In works okay?
pugdog 6335 Jan 2, 2002, 6:30 AM