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 CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Where does one recurring event get "expanded"?
Pages: [1]   Go Down
Print
Author Topic: Where does one recurring event get "expanded"?  (Read 429 times)
0 Members and 1 Guest are viewing this topic.
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 31, 2004, 10:47:00 AM »

I must be missing something obvious, but darned if I can track down where a single recurring event is "expanded" into the multiple entries in @EVENTS (while it seems only the first of these has a value in the recurring_schedule field.

(see my post under Suggestions/Ideas for where I'm going with this).

Thanks,
Mike

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 31, 2004, 11:24:00 AM »

** where a single recurring event is "expanded" into the multiple entries in @EVENTS **

It isn't. That's why you can't edit a single recurring event's details and the reason why the 'Split Recurring Event' plug-in was created.

Dan O.

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

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 31, 2004, 11:50:00 AM »

Seems I started with a bad assumption.. that a recurring event only had one entry in the schedule file.

Back to the drawing board...

Mike

[This message has been edited by Zim (edited March 31, 2004).]

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 31, 2004, 06:50:00 PM »

** a recurring event only had one entry in the schedule file. **

No, a recurring event has multiple schedule records but only one event record.

Maybe you can compare the events' IDs to see if the same one is listed on multiple days which would indicate it was a recurring event? The pervious forum message linked below might also give you some ideas?

Is there a way to add something like 'Event 2 of 6' serially to a sequence of [recurring] events

Dan O.


[This message has been edited by DanO (edited March 31, 2004).]

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: April 01, 2004, 07:47:00 AM »

I have the recurring event "collapse" function working now, all template based.. recurring events are not in the main calendar, but held for a section below... now I want to do the same for multi-day events... a tad puzzled why multi-day events aren't just bounded recurring events, ocurring every X,Y,Z day.  These events seem to have less clues to snag from the template, may have to hack into the code (but trying not to).

Cheers,
Mike

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #5 on: April 01, 2004, 01:54:00 PM »

** a tad puzzled why multi-day events aren't just bounded recurring events, ocurring every X,Y,Z day. **

Maybe because they need not follow any particular pattern?

Or do you mean 'date span' events where just a start and end date are entered?

In that case maybe because they take up less space? (only a single schedule for each).

As a bonus (although probably not intended when the script was designed), they can be displayed differently like on TubaDave's 'DaySpan' templates.

** These events seem to have less clues to snag from the template **

'Day-span' events have a start and end > 1 day.

BTW. The 'Split Recurring Event' plug-in converts day-span events into daily recurring events. Maybe you can just use that part of it to convert such events so they will display with your template mod?

Dan O.

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

Logged
Zim
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: April 01, 2004, 03:06:00 PM »

What I have so far is this
code:
<%FOREACH EVENT%><%$i++; %>
<% if ($EVENT->{'schedule'}->{'recurring_schedule'} ne "") {
  my ($s,$e,$type,$mm,$dd,$wday,$which) = split(/\|/,$EVENT->{'schedule'}->{'recurring_schedule'});
  $_recurring_start_date = &SimpleDateFormat::formatDate($s,$Config->get("date_format"));
  $_recurring_end_date = &SimpleDateFormat::formatDate($e,$Config->get("date_format"));
  $ongoing .= "<br />[".$EVENT->{'details'}->{'id'}."] <a class='".$EVENT->{'details'}->{'eventcategory'}."'";
  $ongoing .= " href='".$CGI_URL_QUERYSTRING."view=Event&event_id=".$EVENT->{'details'}->{'id'}."'>";
  $ongoing .= $EVENT->{'details'}->{'title'}.'</a>';
  $ongoing .= " : $type ";
  $ongoing .= "(every ";
  foreach (split (',',$wday)) {
     $ongoing .= $dayabbrs->[$_].", ";
  }
  $ongoing =~ s/,\s+$//;
  $ongoing .= ") (at ".$EVENT->{'schedule'}->{'start_time'}.") from: $_recurring_start_date to: $_recurring_end_date ";
  $ongoing .= " mm:$mm, dd:$dd,  which:$which";
  $oglist .= $EVENT->{'details'}->{'id'};
  next;
} elsif ($EVENT->{'schedule'}->{'recurrence_id'} ne '') {
  push (@oglist,$EVENT->{'details'}->{'id'} );
  next;
} elsif (($EVENT->{'schedule'}->{'end'} - $EVENT->{'schedule'}->{'start'}) > 172800 ) {
  if ($ongoing !~ /\[$EVENT->{'details'}->{'id'}\]/) {
  $ongoing .= "<br />[".$EVENT->{'details'}->{'id'}."] <a class='".$EVENT->{'details'}->{'eventcategory'}."'";
  $ongoing .= " href='".$CGI_URL_QUERYSTRING."view=Event&event_id=".$EVENT->{'details'}->{'id'}."'>";
  $ongoing .= $EVENT->{'details'}->{'title'}.'</a>';
  $ongoing .= " (at ".$EVENT->{'schedule'}->{'start_time'}.") from: ";
  $ongoing .= &SimpleDateFormat::formatDate($EVENT->{'schedule'}->{'start'},$Config->get("date_format"));
  $ongoing .= " to: ".&SimpleDateFormat::formatDate($EVENT->{'schedule'}->{'end'},$Config->get("date_format"));

  }
  push(@oglist, $EVENT->{'details'}->{'id'});
  next;
} elsif ($EVENT->{'schedule'}->{'start_time'}) { %>
<br />
<%= SCHEDULE FIELD(start_time) %>
<% }%>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %> :
<% } %>
<a class="<%=EVENT FIELD(eventcategory)%>" href="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>"><%= EVENT FIELD(title) %></a>
<%/FOREACH%>
<% if ($i==0) { %> <% } %> <%/IF%>
<% if (scalar @oglist) {
   print "<span class='og'>[";
   print join (',', sort(@oglist));
   print "]</span>";
  }
%>

</td><%/FOREACH%></tr>
<%/FOREACH%><tr><td colspan="7">
Ongoing Events:<%=$ongoing%>
</td></tr>


Certainly appreciate any comments on making it more efficient.

I don't have all of the recurring types worked out yet, but it seems to be heading toward the right functionality.

Mike

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

[This message has been edited by Zim (edited April 01, 2004).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #7 on: April 01, 2004, 07:29:00 PM »

Can you post a link to the calendar so we can see what the output looks like?

Dan O.

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

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