however, i have a problem with mine -- i entered a recurring monthly event on mine when i first set it up several months ago. the search will not find that event at all. when i tested the same event on the demo calendar here it worked ok, listing the first match. was there a bug or something with the recurring events and do i need to delete them and reenter them to get them to work with search?
------------------David Whittaker http://www.uabcm.com/ http://www.csworkbench.com/
------------------
$event_id_index = $schedule_db->{'fieldindex'}->{'event_id'};
on the next line, place this piece of code:
$event_start_index = $schedule_db->{'fieldindex'}->{'start'};
Now look down about 7 lines below that, and find this one:
next if $schedules->{$values[$event_id_index]};
on the next line, place this bit of code:
if ($starttime) { next if (($values[$event_start_index] < $starttime) | | ($values[$event_start_index] > $endtime)); }
That should do it. The problem was, the getNextOccurence function doesn't return the next occurence for bounded events (events that were added as recurring events, but have a start and end date). For bounded events, it only returns whether the specific event that was passed in (the first one we came to, originally) is between the start and end times. If not, it doesn't show up in the search results. So, we did our own checking for bounded events with the two code additions above.
I would like to do the same thing, but am not sure how to do that. I added in the code suggested by Dave, but that seems to only fix the issue with the recurring event only showing up in the search results when the first instance of the recurring event falls within the time range searched. Can someone shed some light on how to accomplish the original problem? Thanks!
~Keetra
[This message has been edited by keetra (edited May 23, 2002).]
and comment it out (put a # on the beginning of the line). Then find (3 lines down):
$schedules->{$values[$event_id_index]} = $schedule_db->makeRecord($line);
and replace that with this:
push(@$events, {'details'=>$details->{$id}, 'schedule'=>$schedule_db->makeRecord($line) });
Finally, right after "close(DB);" put this line:
return $events.
Please note: you must have made the changes above for this to work. I haven't had time to test it, but I'm fairly sure it will work. Enjoy!
Well, your suggestions *almost* work. This is what I get:
First Occurrence Title Description NoneNoneNoneNoneNoneNoneetc.
It looks like it is looping through the events and listing multiple occurances, but it is not displaying the actual information for the events. Unfortunately, I'm just getting started in Perl, so I haven't been able to figure it out myself. Any more advice? Thanks!
code:<% IF NEXT OCCURRENCE EXISTS %><%=$MONTH_NAMES->[$EVENT->{schedule}->{nextoccurrence}->{month}-1]%> <%=$EVENT->{schedule}->{nextoccurrence}->{date}%>, <%=$EVENT->{schedule}->{nextoccurrence}->{year}%><% ELSE %>None<% /IF %>
<% IF NEXT OCCURRENCE EXISTS %><%=$MONTH_NAMES->[$EVENT->{schedule}->{nextoccurrence}->{month}-1]%> <%=$EVENT->{schedule}->{nextoccurrence}->{date}%>, <%=$EVENT->{schedule}->{nextoccurrence}->{year}%><% ELSE %>None<% /IF %>
and change it to this:
code:<%=$MONTH_NAMES->[$EVENT->{schedule}->{month}-1]%> <%=$EVENT->{schedule}->{date}%>, <%=$EVENT->{schedule}->{year}%>
<%=$MONTH_NAMES->[$EVENT->{schedule}->{month}-1]%> <%=$EVENT->{schedule}->{date}%>, <%=$EVENT->{schedule}->{year}%>
That should make the schedule part show up correctly. Are the title and description showing up?
I edited the default.html file and it got a little better:
Occurrence Title Description June 3, June 4, June 5, June 6, June 7,
It displays the day and date, but no year, title or description. Do you have a next step we can implement? I'm sure it has to be something else i the default.html file, but I don't know what.
THanks so much.
David P. MooreHuntsville, ALmooredp@email.uah.edu
Well, that's slightly off. Change it to this and see what happens:
push(@$events, {'details'=>$details->{$values[$event_id_index]}, 'schedule'=>$schedule_db->makeRecord($line) });
That should fix it.
PS: one line of code is incorrect above. It should read:
return $events;
------------------Stephanie MeemkenWebmaster, Minnesota Jayceeshttp://www.mnjaycees.org/
October 21, October 22,October 23,
it is showing the correct dates for the occurences but is not showing the year or the title or description... any ideas?!? help would be appreciated...
jason