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


Login with username, password and session length

Search

 
Advanced search

8019 Posts in 1850 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Add Date to Event View Not working from Search results
Pages: [1]   Go Down
Print
Author Topic: Add Date to Event View Not working from Search results  (Read 680 times)
0 Members and 1 Guest are viewing this topic.
Ian Chan
Guest
« on: January 17, 2003, 01:33:00 PM »

I modified the event view to display the date.

However, when I search for events and click on the link to display the event view the date shown is todays date.

Thanks

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 218

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


WWW
« Reply #1 on: January 17, 2003, 03:34:00 PM »

** when I search for events and click on the link to display the event view the date shown is todays date. **

Maybe because you didn't alter the search results links to pass the date information to the template? But it's difficult to say for sure without knowing exactly how you modified the event view to display the date.

Dan O.

[This message has been edited by DanO (edited January 17, 2003).]

Logged
Ian Chan
Guest
« Reply #2 on: January 24, 2003, 02:07:00 PM »

I modified the event display based on the recommendations from the posts regarding "Add Date to Event Display." http://www.calendarscript.com/support/forum/Forum4/HTML/000169.html

Our calendar is here:  http://seattlecentral.org/library/cgi-bin/calendar.pl

I've almost fixed the problem.
My URL for each event link is:
<a href="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>&datestring=<%=$EVENT->{schedule}->{nextoccurrence}->{year}%><%=$EVENT->{schedule}->{nextoccurrence}->{month}%><%=$EVENT->{schedule}->{n extoccurrence}->{date}%>" class="text">

But this
<%=$EVENT->{schedule}->{nextoccurrence}->{month}%>

is giving me 1 for January instead of 01.
This causes a January 28, 2003 to instead read
2003128
= December 8, 2003

Thanks,

Ian Chan

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 218

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


WWW
« Reply #3 on: January 24, 2003, 06:23:00 PM »

** is giving me 1 instead of 01 **

Try

<% print sprintf("%02d",$EVENT->{schedule}->{nextoccurrence}->{month}); %>

in place of

<%=$EVENT->{schedule}->{nextoccurrence}->{month}%>

Dan O.

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

Logged
Ian Chan
Guest
« Reply #4 on: January 27, 2003, 11:04:00 AM »

Thank you!

Your suggestion worked!

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 218

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


WWW
« Reply #5 on: January 27, 2003, 08:23:00 PM »

Glad to hear it.

Dan O.


[This message has been edited by DanO (edited January 27, 2003).]

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