Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Useful Tag!

Quote Reply
Useful Tag!
I have just created a very useful global that I thought I'd share because it is very simple.

With this tag you can put a very detailed date and time on which ever page you want (dynamic recommended ie. add/modify/search).

The output looks like :

Mon Jan 1 15:24:38 2001

You could also put it in add_email.txt and other emails if you want.

Anyway....add the following code to the bottom of SiteHTML.pm

sub local {
my $output = scalar(localtime);
return $output;
}


Then go to your admin area and then go to globals....

Create a global called local and add the code....

&Links::SiteHTML::local();

Just add <%local%> where you want the Date and Time to appear!

Thanks.

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)
Quote Reply
Re: Useful Tag! In reply to
A better solution (not editing code) is to add a global:

sub {
return scalar localtime;
}

and then just use <%local%> when you want it.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Useful Tag! In reply to
Oh thanks!

Paul Wilson. Shocked
(Dont blame me if I'm wrong!)