Jake, I built one - it took me ages because i kept changing my mind
about how to handle recurring events.  I've built it about a dozen
times now.   Here's what I settled on (it has advantages and
disadvantages - there was no clear winner in the contest to find the
best way to do it, which is why it took so long to do) ....

I have a event table, which contains all the details of the event
itself - event name, venue, image name, ticket price, link to 'more
info'  web site, etc etc.

And a eventDate table,  which has the date(s) this event will occur
on.   This table links to the event table with a foreign key to the
event table.

In the input side, the user first completes the event details, then is
passed to a dates page and can enter the dates for the appearance as
far forward as they want.

The recurring options included are  :

Daily for X days
Weekly for x weeks
fortnightly for x fortnights
Monthly for x months
Bi-monthly for x occurrances
quarterly
6 monthly
annually
on the (first,second,third,forth,fifth) (dayof week) of the month
starting from (date)

The tricky bit was the way to handle the recurring aspects.  And i
finally settled on creating a single event in the events table,  and
multiple dates in the eventDates table   The action page inserts date
records in the eventDates table the appropriate number of times based
on what is selected on the dates options page.

The calculation of the dates forward is handled by a
EventDatesGatesDAO.cfc  which has methods that can figure out the
dates on each interval ..  i.e. give getdateWeekly() a date and it'll
return a date object with the date a week hence.   Give
getdateFortnightly() a date and it will return a date object of two
week's hence.   Give getYearForward() a date and you'll get back the
same day a year hence.   GIve getnextnthofmonth() a date, the nth, and
a day, and it'll return the date of the nth day (e.g. 3rd monday) in
the next month after the date given.

It's not perfect, but it is a series of compromises for me.

The drawback with this approach is that if the user changes the text
of the event, it's changed for all occurrances.   For example, if they
change the details of the listing to show 'Special Christmas meeting",
 then the listing in the March calendar will also show "Special
Christmas meeting"

But i decided that was a lesser evil than creating a whole event
record for each date, and then if for example the venue changed (which
happens often in this organisation), the user would have to go through
and edit every occurrance of that event in the future.

Once you have the database containing the events records and the
dates/times they're to appear on, the display side of it is fairly
straightforward.

Hope this helps.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month



>
> >Can anyone suggest a CF calendar that allows for recurring events?  I am
> >working on a project which requires this.  The project is Farcry-based but
> >I?m just looking for an example of how to manage the data.  Anything will
> >help.
> >
> >
> >
> >Thanks!
> >
> >_____
> >
> >Jake Churchill
> >Team Leader
> >11204 Davenport, Ste. 100
> >Omaha, NE  68154
> >HYPERLINK "http://www.cfwebtools.com"http://www.cfwebtools.com
> >402-408-3733 x103
> >
> >

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292217
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to