[Zope-PTK] Automagically rendering a calendar?
Nolan Darilek
nolan_d@bigfoot.com
Sun, 05 Mar 2000 12:53:54 -0600
In my latest attempt to bite off more than I can chew, I'm pondering
creating an automatically-rendered calendar which displays events by
date.
My site is an attempt to allow members of a student organization to
advertise events. I currently have a static site in place which
includes a very simplistic calendar, but this is a pain to
update. Since I'd like to make maintaining the site as simple as
possible, I'd like to create a calendar which automatically links each
date to any events which are happening on that date. It would be even
better if I could avoid creating links for dates on which no events
are planned, since that would allow anyone who is planning something
to quickly glance over the page and determine which dates are in use.
Since a news item does basically what I'd want, I thought of deriving
a new class called an Event. Events would serve almost the same
purpose as a news item, but they would add an additional date property
which indicates when the event is. I'm investigating the dtml-calendar
tag, and it seems that each date could simply perform a search to
determine which Event items' dates match, but that doesn't solve the
problem of determining whether or not an event is actually planned for
that date. The only way I can think of, off-hand, is to search for
each date within the calendar's range and only link dates which
produce results. This site won't receive lots of hits, so having a
completely efficient algorithm isn't a necessity, but I can't help
thinking that there is a better way to do this without performing a
search for each date. Can anyone suggest anything?
I'm also confused about how to create the Event class. Will this
require modification of the Python PTK code, or can it be done from
within the Zope web interface? If modifications are required, is it
somehow possible for me to maintain compatibility with future PTK
releases while at the same time introducing my own site-specific
ZClasses? I'm also using an ad banner product to allow members to draw
up their own banner ads for programs; how difficult is it to create a
"banner wizard" and an "event wizard" so that folks can very easily
create these objects?
Thanks a bunch.