# HG changeset patch # User Paul Boddie # Date 1238199099 -3600 # Node ID cca0278232ac754b8e2ac49914e05f8682345271 # Parent a7c274e2932c423453c5eb28b14b322fd8ba6297 Fixed and updated the documentation. Improved the example event category page. Added a help page for the macro. diff -r a7c274e2932c -r cca0278232ac README.txt --- a/README.txt Fri Mar 27 01:00:15 2009 +0100 +++ b/README.txt Sat Mar 28 01:11:39 2009 +0100 @@ -3,7 +3,7 @@ The EventAggregator macro for MoinMoin can be used to display event calendars or listings which obtain their data from pages belonging to specific -categories (such as CategoryEvent). The start and end dates are read from the +categories (such as CategoryEvents). The start and end dates are read from the page describing each event, and the calendar is automatically filled out with the details of each event, colouring each event period in a specially generated colour. @@ -66,35 +66,38 @@ It should now be possible to edit pages and use the macro as follows. For MoinMoin 1.5: - [[EventAggregator(CategoryEvent)]] + [[EventAggregator(CategoryEvents)]] For MoinMoin 1.6 and above: - <> + <> As arguments to the macro, you must indicate a comma-separated list of categories to be inspected for event data. For example: - <> + <> By default, this should display a calendar in a collection of tables, one for each month containing events. To show a collection of month-by-month listings, use the 'mode' argument as follows: - <> + <> + +See pages/HelpOnEventAggregator for more detailed information. Using the Action ---------------- -To obtain an iCalendar summary, a collection of parameters can be specified in -the URL of any Wiki page. For example: +To obtain an iCalendar summary, the EventAggregatorSummary action can be +selected from the actions menu on any page. Alternatively, a collection of +parameters can be specified in the URL of any Wiki page. For example: - http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents + http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&doit=1 This should produce an iCalendar resource in response. By specifying 'start' and 'end' parameters, a restricted view can be obtained. For example: - http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&start=2009-06&end=2009-07 + http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&start=2009-06&end=2009-07&doit=1 This would restrict the initial query to events occurring in the months of June 2009 ('2009-06') and July 2009 ('2009-07'). diff -r a7c274e2932c -r cca0278232ac pages/CategoryEvents --- a/pages/CategoryEvents Fri Mar 27 01:00:15 2009 +0100 +++ b/pages/CategoryEvents Sat Mar 28 01:11:39 2009 +0100 @@ -3,11 +3,24 @@ #format wiki #language en -The events category. Here are the current month's events: +This is the events category to which event pages can be assigned. + +To add an event to this calendar (by making a page in this category), fill out and submit this form: + +<> + +Some ideas: -<> + * You can add other categories and then separate groups of events by assigning their pages to different categories. + * You can view many categories in the same calendar if you want to aggregate events from different groups. + +To add a new category, fill out and submit this form: -To add a page to this category, add a link to this page on the last line of the page. You can add multiple categories to a page. +<> + +Here are the current month's events in this category: + +<> '''List of pages in this category:''' diff -r a7c274e2932c -r cca0278232ac pages/HelpOnEventAggregator --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pages/HelpOnEventAggregator Sat Mar 28 01:11:39 2009 +0100 @@ -0,0 +1,73 @@ +##master-page:HelpTemplate +##master-date:Unknown-Date +#format wiki +#language en + +== EventAggregator == + +The !EventAggregator macro for !MoinMoin can be used to display event calendars or listings which obtain their data from pages belonging to specific categories (such as CategoryEvents). + +== Creating Events == + +Before creating any events, create a category for those events. You can do this by filling out and submitting this form: + +<> + +Each event must be created on a new page belonging to the appropriate event category. For CategoryEvents, you can do this by filling out and submitting this form: + +<> + +The event page describes the event in more detail, and the start and end dates of the event must be specified in a definition list so that they can be read from the page and displayed by the !EventAggregator. The EventTemplate provides some guidance, and all you need to do is to replace the `YYYY-MM-DD` placeholders with actual year, month and day values. For example: + +{{{ + Start:: 2009-06-28 + End:: 2009-07-04 +}}} + +== Showing Event Calendars == + +To show a calendar, use the !EventAggregator macro with a list of event categories. For example: + +{{{ +## Show Events and Training categories. +<> +}}} + +The calendar, shown by default, is automatically filled out with the details of each event in the specified category (or categories), colouring each event period in an automatically generated colour. + +Specific periods can be defined using the `start` and `end` parameters. For example: + +{{{ +## Show June and July 2009. +<> +}}} + +By using specific month values, a fixed window of time can be presented, displaying only events occurring within that period. It is possible to omit `start` or `end` in order to show all events up to (by omitting `start`) or starting from (by omitting `end`) a particular month. + +There are special values which are significant. The `current` value refers to the current month and can be used with the minus and plus operators to refer, respectively, to months before and after the current month: + +{{{ +## Show this and next month. +<> +## Show this and last month. +<> +}}} + +In addition, the `yearstart` and `yearend` values refer to the first and last months of the current year: + +{{{ +## Show this year's events. +<> +## Show events from last December to next January. +<> +}}} + +== Showing Event Lists == + +A more plain view of events can be displayed by specifying the `mode` parameter as follows: + +{{{ +<> +}}} + +The `list` value causes a list view to be employed; the `calendar` value causes the default calendar view to be employed.