(see my post under Suggestions/Ideas for where I'm going with this).
Thanks,Mike
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.
------------------
Back to the drawing board...
Mike
[This message has been edited by Zim (edited March 31, 2004).]
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
[This message has been edited by DanO (edited March 31, 2004).]
Cheers,Mike
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?
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>
<%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>
} 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.
[This message has been edited by Zim (edited April 01, 2004).]