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


Login with username, password and session length

Search

 
Advanced search

8240 Posts in 1905 Topics- by 2172 Members - Latest Member: JeffHLB
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO)Incorrect date glitch - a problem with template or script?
Pages: [1]   Go Down
Print
Author Topic: Incorrect date glitch - a problem with template or script?  (Read 1111 times)
0 Members and 1 Guest are viewing this topic.
cosmocanuck
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« on: August 04, 2009, 07:16:35 PM »

Hi! I've been using CalendarScript for a long time on my site www. vancouvermusicals. com .  I'm running the latest version - 3. 21.  However, it's been brought to my attention that there's a glitch in the event display: sometimes, after clicking to view event details, the date at the top of the resulting event listing is incorrect.

As far as I can tell, this is what the glitch is: if you click a date on the small calendar grid (for example, August 17), you see the correct shows (events) for that date.  But then, if you click on the month's name just above the calendar, in order to view all shows for that month, then click on any show in the resulting list. . .  the same date you previously clicked on the calendar grid (in this case, August 17) is displayed at the top of the page for that show - regardless of whether it has a performance on that date!

My install of CalendarScript was customized using a third-party set of instructions, including some modified files, for the script.  But this was a long time ago, so I don't even recall where I got that from.  It certainly works well, though, except for this small glitch.  However, I do see that the code in question in the template is as follows:

<a href="<%= $CGI_URL_QUERYSTRING %>view=Month&selected_datestring=" title="View WHOLE Month"><%= $MONTH_NAME %> <%= $YEAR %></font></a> <font face="Verdana, Arial, Helvetica, sans-serif" size="1">

Is there something amiss with the template, is this an inherent glitch in CalendarScript. . .  or. . . ?

Any help or suggestions are tremendously appreciated!

Thanks,
Adam
Logged
DanO
Moderator
Sr. Member
*****

Karma: 13
Offline Offline

Posts: 273

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


WWW
« Reply #1 on: August 05, 2009, 05:04:53 PM »

Quote
is this an inherent glitch in CalendarScript

I believe so. Someone had a similar problem as stated in the message "Current Date Highlight".

You might need to alter the part of the link after view=Month&selected_datestring= to pass the appropriate date information.

JMO

Dan O.
Logged
cosmocanuck
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« Reply #2 on: August 06, 2009, 07:23:47 PM »

Thanks Dan! Although it being a problem with the script is what I was afraid of. . .   8^(

I confess I'm not sure how I'd modify the template code to fix this, but I do have one followup question that might lead to a simpler fix.

Could I simply eliminate the display of the date altogether, when viewing details for one show?

i. e. , I click on a day in the calendar, say, August 17, and it does say "Events for August 17" on the resulting page listing multiple shows. . .  but if you click for details for a single show, you don't get the "Events for. . . " line (which as we've seen can easily be wrong in this context)?

I've made some attempts at tweaking the template but i can't even find out where that "headline" is generated from.

Thanks for any help you can provide!
Adam
Logged
DanO
Moderator
Sr. Member
*****

Karma: 13
Offline Offline

Posts: 273

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


WWW
« Reply #3 on: August 08, 2009, 01:53:16 PM »

Quote

it being a problem with the script is what I was afraid of.


Looking at it more closely, I was wrong. There is likely a problem in the template coding... actually several.

1. When you click on the 17th and then one of the [more details] links on that page, part of the link URL contains
calendar.pl?datestring=2009081717&selected_datestring=20090817...

Note the datestring= value in the URL has too many digits (although it still looks to function that way).

2. To display the correct event date when linking from the main 'Events for August 2009' display, you'll have to pass the correct event date in the links to the events as a datestring= value. Otherwise it looks like your template uses the selected_datestring= value (if set like from clicking on a calendar grid date) or it uses the current date.

Someone likely needs to correct the coding of the template you're using.

JMO

Dan O.
Logged
cosmocanuck
New Member
*

Karma: 0
Offline Offline

Posts: 3


WWW
« Reply #4 on: August 17, 2009, 11:01:18 PM »

Hi again Dan O. !

Well, I had an even closer look.  While this code on line 208. . .

<FONT SIZE="-2">[<A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&datestring=<%=$DAY->{'datestring'}%>&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;">More details</A>]</FONT> &nbsp; </DIV>

. . . creates that badly-formed date string, the resulting link still does what it needs to.  The nub of the problem seems to lie earlier, on line 158:

<A HREF="<%= $CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id)  %> "STYLE="text-decoration:underline;" CLASS="text">

I can't figure out how to correct it, however.

Now, while I often enjoy, and am even sometimes successful at, solving coding problems where I only have pretty basic knowledge of what I'm doing. . .  in this case I think it makes sense to hand this off to someone who really knows their stuff.  And by someone. . .  I'm thinking you, Dan! I imagine it would probably take you all of two minutes to fix this, vs.  who knows how long for me to puzzle it out (assuming I even could). 

I'd gladly pay you for your time - if you can just let me know what you think the cost would be I'm sure I would be willing to cover it.  Let me know if that's possible.  It's important to me that this site work correctly - I've let this problem slide way too long.  I hope you can help!

Thanks,
Adam
Logged
Pages: [1]   Go Up
Print
Jump to: