This page is to set up a possible plan for how to add calendar functionality into Mir.
The Model
The aim is to implement
UkCalendarViews The first stage will be without non admin user accounts, and not to deal with repeating events.
An "Event" is a single event. It can be one day or multi day. It can have one region, and multiple topics. There will be a description which can contain the precise location, time of day, contact details, why, etc.
Fields
The fields mostly exist in Mir already. The minimum to allow the functionality to work is thought to be (by Main.Damish)
- There will be an extra article type of Event (hard wired into the publish page)
- There will be a "event (start) date" field which must be filled in
- There will be an "event end date" field which is optional, and is intended for multiple day events
Location of the event, timing etc, can be left to the description part. (Though it might be wise for the publish page text to remind people to enter these).
See below for possible reuse of date fields in articles.
Views
The "publish event" view would be similar to the present publish page, but with the date fields added. (For the first iteration, there would be no user IDs).
The "view event" view would be pretty much the same as the present article view, but with links to
- See other events today
- See other events this week
- See other events this month
The "calendar" view (day, week, month) is the biggest problem. But a first view could just be upcoming events. This could be similar to an archive view, but ordered by when the events take place. Top of the list would be events happening today, and going further into the future as we go on. The events could then be automatically added to sections of the front page etc.
So the views would be
- Events on day X
- Events in week Y
- Events in month Z
- The next 50 events, starting today
And there could be filters of topic and/or region applied to these views. Which leads us on to
Selection of events
Day view could be [all articles of type "event" with start date on this day, or start date before this day and end date on or after this day] with optional additional filter by region and/or topic.
Next 50 events could be [the next 50 events - all events today (see above filter) followed by the next (50 - events today) events with start date after today, ordered by start date]
A week or month view would be made up of multiple day selections.
The Plan - Core functionality
Extra Fields
Before we start making pages, I expect we would need to do add a few extra fields.
- Extra article type 'Event' (or 'Calendar' or whatever)
- Event (start) date
- Event end date (optional, only for multi day events)
At some point we may also want to add
- Reports of event (so reports of events can be found easily)
Publish Form
This could start off as similar to the present publish forms (article and comment).
This could be done by copying etc/open/editarticle.template to editevent.template and doing some editing. We would also need to do something to producers.xml ...
Quick and Dirty Events View
This could be similar to an archive view, but ordered by when the events take place. Top of the list would be events happening today, and going further into the future as we go on. We could also do a "Past Events" view. The events could then be automatically added to sections of the front page etc.
When viewing a single event, this can just be a normal article view.
This should be fairly easy, again only requiring changes to producers.xml and a few new templates.
So far, no java coding required ...
Proper Calendar Views
This is where the Java coding starts. We want to have a standard html table showing the events per day, per week and per month at least. This would probably best be done by having functions in Mir to produce them.
Not sure where to start in the code though ...
The Plan - Extended Functionality
This section is some extra ideas that would be nice.
Linking Reports to Events
It would be excellent to link events to the reports. Then when you want to find reports of an event, you can just go to the event announcement and find a list of reports. This means that when adding an article, there should be some way to select the event you are talking about.
For discussion see the
Novemeber archives of imc-uk-useability.
We could allow article users just to put in the date (or start and end date) of the event which their report is about. Then we could have a search for date X - "all articles of type newswire or feature" for which have a "start date of X, or a start date before X and an end date after or on X". There could be a link from articles to "other reports of this date" which would take you straight to the search. This would make it fairly easy to do, without major surgery to the publish page.
User ID for correcting / editing events
This would mean having a login. This would be optional. And to have a login, an email address is optional. But it would provide useful functionality. Could be contraversial though ...
Implementing this in Mir would mean that people could then use the ID for articles and comments they have written. Possibly a few issues to sort out there ...
Repeating Events
This means - daily, weekly, fortnightly, monthly. How to specify a repeating event. Easy cases are
- Every day
- Every tuesday
- The 3rd of each month
Harder are
- Every other monday, starting on 7th of November 2005
- The second tuesday of each month
- The last friday of each month
- Once in a blue moon (not really
I suppose we could have start date (for the first one) and then a repeat period. Every week/fortnight/month is easy. More thought required ... Are there existing solutions we can copy? How do we keep the publish form simple?
--
DaMish - 17 Nov 2005
to top