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)Single day events show as multiple!
Pages: [1]   Go Down
Print
Author Topic: Single day events show as multiple!  (Read 274 times)
0 Members and 1 Guest are viewing this topic.
cosmocanuck
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: August 01, 2004, 05:09:00 PM »

Hi all,

Well, it figures - right after I spread the word far and wide about my new "Musical Theatre in Vancouver" calendar, I discover a problem. Events on a single day are showing in the monthly listing as lasting for several days (and not even a consistent number of days, either). Baffling and highly worrisome.

My month display is based on a mod done by someone else, to solve the issue of multi-day events being repeatedly listed for each day when viewing the monthly listing. Now it only lists them once with the start and end dates - which is great, but perhaps the mod is the reason for this newly-discovered glitch?

List-style display code is below. Thanks for any advice! Oh, and my calendar is viewable here: http://www.adamabrams.com/calendar/

Cosmo

   <!-- LIST STYLE DISPLAY -->
         <TABLE BORDER="0" WIDTH=100%><TR><TD>
         <SPAN CLASS="text">
            <%&getEvents( { 'range'=>$VIEW } );%>
            <%$lastday=0;%>
            <%$firstflag=0;%>            
             <%$total_events=0;%>
            <%FOREACH EVENTLIST%>
               <%IF EVENTS EXIST%>
                  <%FOREACH EVENT%>
                     <%$flag=0;%>
                     <%foreach $dupetest(@titleevent) {%>
                        <%if ($EVENT->{'details'}->{'title'} eq $dupetest) {%>
                             <%$lastmonth = $DAY->{monthname};%>
                             <%$lastday = $DAY->{dd};%>
                             <%$lastdayname = $DAY->{dayname};%>
                             <%$lastyear = $DAY->{datestring};%>
                             <%$lastyear = substr($lastyear,0,4);%>
                           <%$flag=1;%>
                        <%}%>
                     <%}%>
                     <%if ($flag eq 0) {%>
                         <%if ($lastday ne 0) {%>
                             to <br><%= $lastdayname%>, <%= $lastmonth%> <%= $lastday%>, <%= $lastyear%>
                           <%$lastday=0;%>
                           <%}%>
                         <%if ($firstflag eq 0) {%>
                        <%$firstflag=1;%>
                         <%} else {%>  
                        <%$firstflag=1;%>
                        <br><br>
                         <%}%>
                         •
                         <A HREF="<%= $CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(title) %></A><br>

                         <%$firstmonth = $DAY->{monthname};%>
                         <%$firstday = $DAY->{dd};%>
                           <%$firstdayname = $DAY->{dayname};%>
                           <%$firstyear = $DAY->{datestring};%>
                           <%$firstyear = substr($firstyear,0,4);%>
                         <%= $firstdayname%>, <%= $firstmonth%> <%= $firstday%>, <%= $firstyear%>
                         <%push(@titleevent,$EVENT->{'details'}->{'title'});%>
                         <%$total_events++;%>
                     <%}%>
                  <%/FOREACH%>
               <%/IF%>
            <%/FOREACH%>
            <%if ($lastday ne 0) {%>
               to <br><%= $lastdayname%>, <%= $lastmonth%> <%= $lastday%>, <%= $lastyear%>
               <%$lastday=0;%>
              <%}%>
            <%unless($total_events){%>
               <BR><CENTER><I>No Events</I></CENTER>
            <% } %>
            <% for ($count=$totalevents*2; $count < 25; $count++) { %>
              
            <%}%>
         </SPAN>
         </TD></TR></TABLE>
         
         <!-- END LIST STYLE DISPLAY -->

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: August 02, 2004, 01:45:00 AM »

** perhaps the mod is the reason for this newly-discovered glitch? **

Difficult to say without actually being able to look into it.

If you can find the event's schedule(s) in the schedule.txt file, it should tell if the event was entered as a single event in which case the template itself may be the cause of the duplicates.

Dan O.

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

Logged
cosmocanuck
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: August 04, 2004, 02:44:00 AM »

I shall have a deeper look at the template(s) and hopefully figure out where things are going awry. Thanks!

Adam

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

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