Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Need help for dates display

Quote Reply
Need help for dates display
Hi,

I want to use long date ("5 septembre 2002") in all my forum except in category_list.html, forum_view.html and message_list.html. I set by default long date in language variables ("%d% %mmmm% %yyyy% à %H%:%MM%"). So now I have to change the display date in category_list.html, forum_view.html...

I tried in category_list.html the tag "<%GT::Date::date_get($forum_last_date, '%d% %mmm% %yyyy% à %H%:%MM%')%>" but it gives a really strange date: "31 déc. 1969 à 19:00". Crazy Does anybody know where come from the problem? And also do you know how I can use the function "nbsp" with this king of tag?

Thank you very much!

François
Quote Reply
Re: [Franco] Need help for dates display In reply to
I noticed that the tag "<%GT::Date::date_get($forum_last_date, '%d% %mmm% %yyyy% à %H%:%MM%')%>" work perfectly in user_view.html and profile_display.html (the right dates appear). But I have to initialize the date before with this tag "<!--<%GForum::init_date%>-->". Unfortunately, nothing of that seem to work in category_list.html, forum_view.html and message_list.html. So how can I change the date format in these templates (I want to use the short date in these templates)? Any idea?

Thank you for your help!

François

Last edited by:

Franco: Aug 7, 2002, 9:05 AM
Quote Reply
Re: [Franco] Need help for dates display In reply to
Hi François,

Instead of $forum_last_date, use $forum_last_time. That should fix it.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Need help for dates display In reply to
Thank you very much, Jason!

It works, but I still don't know how to use the function "nbsp" with this tag (<%GT::Date::date_get($forum_last_time, '%d% %mmm% %yyyy% à %H%:%MM%')%>). Is it possible to use the function "nbsp" with this kind of tag? I tried many things, but no success.

Thank you!

François
Quote Reply
Re: [Franco] Need help for dates display In reply to
Hi François,

You can't use it directly, but you should be able to do this if you combine it with a "set":

<%set mydate = GT::Date::date_get(.....)%><%nbsp mydate%>

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Need help for dates display In reply to
Simple! Thank you!! I love GT support! Smile

Do you know if that kind of date setup in category_list.html (for all forums) and forum_view.html (for all threads) will put much more load on the server comparatively to the standard date setup?

Thank you again!

François
Quote Reply
Re: [Jagerman] Need help for dates display In reply to
Oops, the tag "<%set mydate = GT::Date::date_get($forum_last_time, '%d% %mmm% %yyyy% à %H%:%MM%')%><%nbsp mydate%>" doesn't work: it gives the current time and date of the server for all the forums. Crazy. But the "nbsp" function works...

Any idea??

Thank you!

François
Quote Reply
Re: [Jagerman] Need help for dates display In reply to
I tried again only the tag "<%GT::Date::date_get($forum_last_time, '%d% %mmm% %yyyy% à %H%:%MM%')%>", and the problem still there. So it seem that the problem come from the variable "forum_last_time". Frown

Thank you for your help!

François
Quote Reply
Re: [Franco] Need help for dates display In reply to
I tried "forum_last" and it works.

Thank you!

François
Quote Reply
Re: [Franco] Need help for dates display In reply to
Whoops, oh yeah, it's forum_last, not forum_last_time Blush

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com