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

Re: [SWDevil.Com] Custom Display Based on Links Age

Quote Reply
Re: [SWDevil.Com] Custom Display Based on Links Age In reply to
Hi,

You could do it with this global:

do_days_diff
Code:
sub {
my $today = GT::Date::date_get();
my $linkdate = $_[0];
my $diff = GT::Date::date_diff($linkdate,$today);
return { diff => $diff };
}

..then in link.html, use:

Code:
<%do_days_diff($Add_Date)%>
<%if diff <= 30%>
less than 30 days old
<%elsif diff > 30 and diff <= 90%>
between 30 days and 90
<%else%>
older than 90 days
<%endif%>

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Custom Display Based on Links Age VishalT 6536 Apr 11, 2007, 10:44 AM
Thread Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6356 Apr 12, 2007, 1:25 AM
Thread Re: [Andy] Custom Display Based on Links Age
VishalT 6381 Apr 12, 2007, 11:25 AM
Thread Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6345 Apr 13, 2007, 1:10 AM
Thread Re: [Andy] Custom Display Based on Links Age
VishalT 6328 Apr 13, 2007, 1:40 PM
Thread Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6392 Apr 13, 2007, 2:14 PM
Thread Re: [Andy] Custom Display Based on Links Age
VishalT 6363 Apr 13, 2007, 2:50 PM
Thread Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6330 Apr 14, 2007, 1:34 AM
Thread Re: [Andy] Custom Display Based on Links Age
VishalT 6331 Apr 14, 2007, 1:40 AM
Post Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6327 Apr 14, 2007, 1:56 AM
Thread Re: [SWDevil.Com] Custom Display Based on Links Age
Andy 6300 Apr 14, 2007, 10:24 AM
Thread Re: [Andy] Custom Display Based on Links Age
VishalT 6315 Apr 14, 2007, 4:40 PM
Post Re: [SWDevil.Com] Custom Display Based on Links Age
VishalT 6262 Apr 19, 2007, 10:09 AM