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 6768 Apr 19, 2001, 10:44 AM
Thread Re: Days Old Plug In works okay?
katabd 6719 Apr 19, 2001, 11:34 AM
Thread Re: Days Old Plug In works okay?
Pitman 6693 Apr 19, 2001, 12:17 PM
Thread Re: Days Old Plug In works okay?
Clint 6615 Apr 19, 2001, 10:37 PM
Thread Re: Days Old Plug In works okay?
pugdog 6642 Apr 19, 2001, 11:43 PM
Thread Re: Days Old Plug In works okay?
Pitman 6596 Apr 21, 2001, 8:24 AM
Thread Re: Days Old Plug In works okay?
Robert_B 6616 Jul 11, 2001, 6:56 AM
Thread Re: Days Old Plug In works okay?
pugdog 6587 Jul 11, 2001, 12:10 PM
Thread Re: Days Old Plug In works okay?
pugdog 6561 Jul 12, 2001, 8:19 AM
Thread Re: Days Old Plug In works okay?
pugdog 6568 Jul 14, 2001, 2:40 AM
Thread Re: Days Old Plug In works okay?
Pitman 6560 Jul 14, 2001, 4:40 PM
Post Re: Days Old Plug In works okay?
pugdog 6562 Jul 14, 2001, 8:08 PM
Thread Re: Days Old Plug In works okay?
pugdog 6518 Jul 16, 2001, 1:20 AM
Thread Re: [pugdog] Days Old Plug In works okay?
pugdog 6325 Jan 1, 2002, 6:58 PM
Post Re: [pugdog] Days Old Plug In works okay?
pugdog 6312 Jan 2, 2002, 6:30 AM