Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Added: Wrong Date

(Page 1 of 2)
> >
Quote Reply
Added: Wrong Date
Hi Everyone,

I am having problem with added date. In every catagory after the URL description every link is showing today's date, NOT the date it was added.

But, in the admin page everything is fine.

Please help.

Regards,

pagla2000
Quote Reply
Re: Added: Wrong Date In reply to
What tag or variable are you using to show the date that the link was added?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Added: Wrong Date In reply to
Could you be more specific. I am using webcawler templet.

Whenever I do the "build all" from admin.cgi page all the entries in catagory pages updates tne current date. NOT when they added.

Thank you,

pagla2000

[This message has been edited by pagla2000 (edited November 27, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
Dah, Okay......look in your link.html file. Look at the Date tag you are using.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Added: Wrong Date In reply to
 
Here is the date tag from link.html

<%Date%>


Thanks,

pagla2000
Quote Reply
Re: Added: Wrong Date In reply to
And the Date field is correct with the field you have in your links.def file? They are both Date, right??

Make sure that you have &get_date specified for the Date field. Also, make sure that you have the correct dates in your links.db file.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 28, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
Eliot Lee,

Thanks for helping in this topic, as pagla2000 I have the same problem: I get the the wrong date (date when I "build" pages), and I was also wondering if that <%Date%> field was wrong.

In your last reply, do yo mean to change <%Date%> for something like <%&get_date %> after we are sure we have the correct dates in our links.db file?

I just want to make sure that's what you mean, I am not a CGI programmer and I am new in Links, actually this is my first post.

Thanks,
Quote Reply
Re: Added: Wrong Date In reply to
The tag you need to use is <%Date%> in your link.html template file. Make sure that the dates are being added correctly in your database file. If they are different dates and show the date added (not today's date), then there are some other problems with your files.

What I meant by the &get_date reference is that you have this in your Date field in your links.def file, like the following:

Code:
Date => [3, 'date', 15, 15, 1, \&get_date, '']
,

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 28, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
Eliot,

At least in my case, the files added to my database links.db are correct.

When I see the date added in "modify" in admin site, the web sites dates I added my self are also correct.

I just checked my links.def file, and I also found: <B>Date => [3, 'date', 15, 15, 1, \&get_date, ''],</B> to be exaclty the same as the one you showed us.

So I don't know what's wrong, but by the way, you indirectly helped my to fix <B>another</B> problem, that 500 limit in URL descriptions, in the same file links.def I changed 500 for 700 instead (in Description line, just for the heck) and they I added a longer description, and now it works! Smile . Thanks for that one (I also read an old post of you about that 500 limitation in URL description).

Thanks,

Carlos
Quote Reply
Re: Added: Wrong Date In reply to
Hmm...I really don't know what the problem is. Unless you have made changes to the db.pl file where the get_date sub-routine is located.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 28, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
Eliot,

Thanks anyway, you already helped me to fix the problem I was actually concerned the most, the one about the 500 character limit.

I hope pagla2000's problem will be easier to solve.

Several people installed a few add-ons, it is possible that some modification of that pl file ocurred...

Carlos
Quote Reply
Re: Added: Wrong Date In reply to
Eliot Lee,

I checked everything you said but still the same problem.

Here is the code from links.def:

Date => [3, 'date', 15, 15, 1, \&get_date, ''],


I have all the correct dates in links.db


Thank you,

pagla2000

[This message has been edited by pagla2000 (edited November 28, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
Then I don't know what the problem could be.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Added: Wrong Date In reply to
Hmmm,

I'm too experiencing problems with Date.

If I put <%Date%> in my links.htm file I get nothing. If I put <%date%> in I get the day I rebuild the database. On all entries.

My entry in links.def looks correct though.
Anyone using templates or anything?

C.
Quote Reply
Re: Added: Wrong Date In reply to
I too am having this EXACT same problem..

Let me go out on a limb here and guess that we are "ALL" using the WEBCRAWLER TEMPLATES?

Conan
Quote Reply
Re: Added: Wrong Date In reply to
Nope, I'm using the Snap templates... :-)

Anyways, do the templates change the get_date routine? In which file is it? I tried searching for them before getting on the bus to work, but didn't find it.

Surely there must be a bug in there somewhere, more precisely in getting the date from the database where the date is correct onto the page where it ends up as the date of the latest rebuild.

C.

Quote Reply
Re: Added: Wrong Date In reply to
BTW,
The get_date is in db_utils.pl not in db.pl

And it says:

sub get_date {
# --------------------------------------------------------
# Returns the current date.
#
my ($time) = shift;
$time | |= time();

exists $DATE_CACHE{$time} or ($DATE_CACHE{$time} = &unix_to_date($time));
return $DATE_CACHE{$time};
}

in the file I just d/l from this site. It looks as if it gets the date from the server, not the database. In that case it should readjust the Added date at every rebuild - or am I mistaken?

C.


[This message has been edited by Chimbis (edited November 30, 1999).]

[This message has been edited by Chimbis (edited November 30, 1999).]
Quote Reply
Re: Added: Wrong Date In reply to
OK, I think I fixed this ...

In my template there is a file called
site_html_templates.pl in there I've got


%globals = (
Date => &get_date,
Price => $price,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);

This calls the &get_date function from links admin when you rebuild the site. I removed that line from the file and rebuilt. Voila! Correct dates.

You cannot tamper with &get_date directly - you need it when adding links.


Quote Reply
Re: Added: Wrong Date In reply to
What I'd do is:

Rename site_html_templates.pl to site_html_templates.old.

Remove the line containing Date => &get_date, from your original file. Save and upload.

Rebuild, if Links doesn't break and everything seems to work OK keep the new file. Otherwise rename site_html_templates.old back to site_html_templates.pl.
Quote Reply
Re: Added: Wrong Date In reply to
Chimbis,

I also use the Snap templates. I just checked my site_html_templates.pl file, and I don't have the subroutine:

%globals = (
Date => &get_date,
Price => $price,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);

I did find some variables, like Date => &get_date, but not together with the code as shown abouve,
Quote Reply
Re: Added: Wrong Date In reply to
I was helping someone fix up the Snap templates for their site this past week and encountered the same problems. Here's what I found:

In site_html_templates.pl,

Date => &get_date,

should be:

date => &get_date,

but it should be called <%Date%> in the link.html template. There is also a <%date%> on the home.html page that is intended to pull the build date, and that appears to be what is referenced by the site_html_templates.pl globals. Are there two date tags used in Links?

If I'm not mistaken, that's all I had to do to fix the problem.

Dan


[This message has been edited by Dan Kaplan (edited January 05, 2000).]
Quote Reply
Re: Added: Wrong Date In reply to
Just throwing another post in to move this to the top in case someone read it earlier and didn't see that I edited/corrected my last message... Wink

Dan
Quote Reply
Re: Added: Wrong Date In reply to
 
Code:
date => &get_date,

2) <%Date%> = Date when link was added

In the links.def file, use the following default attribute in the Date Added Field:

Code:
\&get_date

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------





[This message has been edited by Eliot (edited January 06, 2000).]
Quote Reply
Re: Added: Wrong Date In reply to
We were experiencing the same problem on all of our sites using Links.

The problem was (at least with our sites) was that we had the following stated in our site_html_templates file:

Code:
%globals = (
date => &get_date,
Date => &get_date,
Price => $price,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);

Once we removed the following line:
Code:
Date => &get_date,

The upper/lower case was the deciding factor Smile

It now functions fine. I justed wanted to say thanks to you guys for helping us out with this little problem.

It was indeed calling the build date rather then modified date.

--------------------------------------------
Marcus Cantwell
http://www.SponsorFind.com
mcantwell@sponsorfind.com

Part of the Real Time Network
www.rtnetwork.com


[This message has been edited by SponsorFind (edited January 10, 2000).]
Quote Reply
Re: Added: Wrong Date In reply to
I've been watching this thread since I relaized the same thing was happening on my site. All the links say they were added on today's date or whatever the current date is.

I've tried removing the line in the site_html_templates.pl as suggested with no luck. Has everyone else resolved this problem? If so, could you suggest what I may have missed.




------------------
ccunet
> >