Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Date showing up wrong in Event View
Pages: [1]   Go Down
Print
Author Topic: Date showing up wrong in Event View  (Read 325 times)
0 Members and 1 Guest are viewing this topic.
canadaman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Sysadmin


WWW
« on: March 27, 2003, 04:57:00 PM »

Hi,

I've been enjoying 5 months of Calendarscript bliss when I found something really odd. Right now I have the display date and time in event view mods as explained here http://www.calendarscript.com/support/forum/Forum4/HTML/000411.html

Works great! But there's a strange bug. When you click to event view from the list view the displayed date is always the current date while the event time is correct. Going straight from the Calendar view (one, 2, 3, 4 week or the month view) and the event view is fine.

They should be using the same code to get to event view so I am really confused as to why the date variable isn't showing up.

Anyone have any ideas?

Thanks!

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: March 27, 2003, 06:43:00 PM »

** They should be using the same code to get to event view **

Yes they should be, but probably aren't. Unless you can provide a link to the actual calendar, no one here will be able to confirm it for you.

Dan O.

------------------

Logged
canadaman
New Member
*

Karma: 0
Offline Offline

Posts: 0

Sysadmin


WWW
« Reply #2 on: March 28, 2003, 02:54:00 PM »

Fixed it!

When I was posting the links I noticed the url with the bad date was missing the datestring. After digging around in

default.html I found that on line 256 if you change

<% } %><% if ($_SHOW_EVENT_TIMES eq "ALL") { %><% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time)

%><% } %><% } %><% if (($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START")

&&($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %><A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT

FIELD(id) %>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title) %></A><BR>

To

<% } %><% if ($_SHOW_EVENT_TIMES eq "ALL") { %><% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time)

%><% } %><% } %><% if (($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START")

&&($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %><A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT

FIELD(id) %>&datestring=<%=$DAY->{'datestring'}%>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title)

%></A><BR>

it solves the problem. Basically you put &datestring=<%=$DAY->{'datestring'}%> inside the quotes in front of STYLE. Don't

leave a space before the & or you'll get a %20 in the link and it won't work.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: March 28, 2003, 06:13:00 PM »

** Fixed it! **

Glad to hear it.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: