# HG changeset patch # User Paul Boddie # Date 1306611953 -7200 # Node ID e243694bdbc9ae53c797b62455437b5b3a7748d7 # Parent ae1a2e8398a116ddb39dc1d4e01d38482b73a44a Fixed the pop-up element text alignment for the view and download controls. Updated the help pages to reflect the current feature set, adding a section describing the map view. Added resource pages and map images. Updated the documentation to include resource page installation instructions. diff -r ae1a2e8398a1 -r e243694bdbc9 README.txt --- a/README.txt Fri May 13 01:36:26 2011 +0200 +++ b/README.txt Sat May 28 21:45:53 2011 +0200 @@ -100,6 +100,24 @@ You may need to switch user in order to have sufficient privileges to copy the page package into the Wiki. +Resource Pages +-------------- + +For the map view, some resource pages are provided with EventAggregator. +Unlike the help pages which are most likely to be left unedited, the resource +pages should be modified and updated with additional map and place details. +Consequently, upgrading these pages is not necessarily desirable when new +releases of EventAggregator are made available, and thus these pages are kept +separate from the help pages. + +To install the resource pages, use the following commands: + + python moinsetup.py -f moinsetup.cfg make_page_package resource_pages resource_pages.zip + python moinsetup.py -f moinsetup.cfg install_page_package resource_pages.zip + +You may need to switch user in order to have sufficient privileges to copy the +page package into the Wiki. + Using the Macro --------------- diff -r ae1a2e8398a1 -r e243694bdbc9 css/event-aggregator.css --- a/css/event-aggregator.css Fri May 13 01:36:26 2011 +0200 +++ b/css/event-aggregator.css Sat May 28 21:45:53 2011 +0200 @@ -25,6 +25,7 @@ .event-download { margin-left: 1em; margin-right: 1em; + text-align: left; } .event-download { diff -r ae1a2e8398a1 -r e243694bdbc9 pages/HelpOnEventAggregator --- a/pages/HelpOnEventAggregator Fri May 13 01:36:26 2011 +0200 +++ b/pages/HelpOnEventAggregator Sat May 28 21:45:53 2011 +0200 @@ -7,11 +7,13 @@ 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 == The easiest way to create an event is to hover over a day number in a calendar and to follow the "New event" link. If you do not have a calendar set up, take a look at the instructions for [[#PreparingACalendar|preparing]] and [[#ShowingEventCalendars|showing]] calendars first. -Each event must be created on a new page belonging to the appropriate event category. The following action can be used to create a new event page (using !EventAggregatorNewEvent) without looking at a calendar: +Each event must be created on a new page belonging to the appropriate event category. The following action can be used to create a new event page (using [[HelpOnEventAggregatorNewEvent|EventAggregatorNewEvent]]) without looking at a calendar: (!) <> @@ -77,7 +79,7 @@ Summary:: a synonym for title Topics:: a list of topics related to the event - use a comma (`,`) to separate topic names Categories:: a synonym for topics - note that this means "event categories", not "page categories" which are a distinct concept - Location:: the location of the event + Location:: the location of the event - this may [[#Showing_Events_on_Maps|position the event on maps]] if the location is known to !EventAggregator These properties may be incorporated into representations or summaries of events. @@ -203,6 +205,19 @@ Without any time period, the calendar would show all events, and there would be no real need to provide navigation, since there would be no events outside the displayed period to navigate to. It is possible to omit either the `start` or the `end` parameter and still provide navigation, however. +=== Showing Calendar Days === + +To view the individual days in a calendar, it is possible to hover over a day number and select the "View day" link. However, a calendar view can be set up using the macro as follows: + +{{{ +## Show yesterday, today and tomorrow. +<> +}}} + +In the above example, specifying a `mode` of `day` sets the resolution of the calendar to that of individual days, and thus the special value `current` refers to the current day (today) instead of the current month. + +In the day view, time information is shown so that it becomes possible to see whether events conflict with each other. In addition, location information is shown above columns of events to help with event scheduling. + === Assigning Templates and Parent Pages === New events can be added to a calendar by following the "New event" links provided when hovering over each of the day numbers; this opens the form provided by the !EventAggregatorNewEvent action. For all events belonging to a particular calendar, it can be convenient to assign a default template page, so that the information provided by such events is consistent. Thus, it is possible to specify such a template page using the `template` parameter. For example: @@ -245,9 +260,27 @@ To define your own topic colours, edit the `event-aggregator.css` file which is provided with the !EventAggregator distribution, and then reinstall that file for each of the Wiki themes of interest. Topics involved in event colouring should be mutually exclusive: more than one such topic should not be specified for any given event. -=== The Default View and Switching Views === +== Showing Events on Maps == + +If a map is defined, as described below, and the name of such a map is given when using the macro, it becomes possible to allow a map view to be shown. For example: + +{{{ +<> +}}} + +The above example will show all events in the given category whose locations are known and are found to refer to places on the `europe` map. -The `calendar` value for the `mode` parameter causes the default calendar view to be employed, but you can switch the view - effectively changing the `mode` - using the links provided below the view produced by this macro. +=== Defining Maps === + +!EventAggregator uses a page called EventMapsDict to define and retain the available maps (unless the `event_aggregator_maps_page` configuration setting has been changed). Follow the instructions on the EventMapsDict page to define new maps. + +=== Defining Locations === + +!EventAggregator uses a page called EventLocationsDict to define known locations (unless the `event_aggregator_locations_page` configuration setting has been changed). Follow the instructions on the EventLocationsDict page to define new locations. + +== The Default View and Switching Views == + +The `calendar` value for the `mode` parameter causes the default calendar view to be employed, but you can switch the view - effectively changing the `mode` - using the links provided below the view produced by this macro. The map view is only available via a link if a map name has been given using the `map` parameter. == See Also == diff -r ae1a2e8398a1 -r e243694bdbc9 pages/HelpOnEventAggregatorNewEvent --- a/pages/HelpOnEventAggregatorNewEvent Fri May 13 01:36:26 2011 +0200 +++ b/pages/HelpOnEventAggregatorNewEvent Sat May 28 21:45:53 2011 +0200 @@ -5,7 +5,7 @@ == EventAggregatorNewEvent == -The !EventAggregatorNewEvent action provides support for creating new events more conveniently than manually editing an event page based on a template. The action can be selected from the actions menu on any page, or it can be invoked by selecting the "New event" link shown when hovering over a day number in an !EventAggregator calendar view. +The !EventAggregatorNewEvent action provides support for creating new events more conveniently than manually editing an event page based on a template. The action can be selected from the actions menu on any page, or it can be invoked by selecting a day number in an !EventAggregator calendar view. Upon invoking the action, a form will be displayed requesting values for the following items: @@ -50,7 +50,7 @@ To manually select the parent page, select the `Show advanced options` button in the form. }}} -An event may be assigned a parent page, resulting in the event page being created as a sub-page of this parent page. For a collection of events, a parent page acts as a common container for all the event pages in the collection. For example, a parent page called '''Appointments''' could be defined for the events '''Summer Party''' and '''Winter Party''' with the pages for the events being created as '''Appointments/Summer Party''' and '''Appointments/Winter Party'''. In the calendar, these events would not include '''Appointments''' in their names by default. See the related [[HelpOnEventAggregator#AssigningTemplatesandParentPages|guide to these options]] for more information. +An event may be assigned a parent page, resulting in the event page being created as a sub-page of this parent page. For a collection of events, a parent page acts as a common container for all the event pages in the collection. For example, a parent page called '''Appointments''' could be defined for the events '''Summer Party''' and '''Winter Party''' with the pages for the events being created as '''Appointments/Summer Party''' and '''Appointments/Winter Party'''. In the calendar, these events would not include '''Appointments''' in their names by default. See the related [[HelpOnEventAggregator#Assigning_Templates_and_Parent_Pages|guide to these options]] for more information. If the action has been invoked by a link provided by a calendar, the `parent` parameter of the !EventAggregator macro may specify the default parent page for the new event. If no such parameter was used for the calendar, or if no calendar was involved (such as when the action is invoked from the editing menu), no parent page is chosen. diff -r ae1a2e8398a1 -r e243694bdbc9 pages/HelpOnEventAggregatorSummary --- a/pages/HelpOnEventAggregatorSummary Fri May 13 01:36:26 2011 +0200 +++ b/pages/HelpOnEventAggregatorSummary Sat May 28 21:45:53 2011 +0200 @@ -33,8 +33,7 @@ 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&doit=1 +http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&start=2009-06&end=2009-07&doit=1 }}} This restricts the initial query to only retrieve events occurring in the months of June 2009 (`2009-06`) and July 2009 (`2009-07`). @@ -44,14 +43,21 @@ By adding the `format` parameter, an RSS feed resource can be produced: {{{ -http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&doit=1& -format=RSS +http://example.com/moin/FrontPage?action=EventAggregatorSummary&category=CategoryEvents&doit=1&format=RSS }}} This resource produces a description of all events within the stated criteria. Updated events should be detected by feed readers and each subscriber notified of such updates, with the comment made when the affected event was edited being provided as the event description in the feed. A technical note: feed readers will typically detect updated events by consulting the content of each event description's `guid` element, notifying the user of changes if the content of that element has itself changed. +=== Using wget with Direct Requests === + +Since `wget` is considered a "robot" or "spider" by !MoinMoin by default, the Wiki configuration must be edited to exclude `wget` from the list of such site visitors. In a standard configuration class the following can be added to achieve this: + +{{{#!python numbers=disable + ua_spiders = DefaultConfig.ua_spiders.replace("|wget", "") +}}} + == Time Information in Summaries == The iCalendar format makes extensive use of time information and can employ complicated data structures in order to try and represent event times correctly. !EventAggregator has the following level of support for iCalendar features: diff -r ae1a2e8398a1 -r e243694bdbc9 resource_pages/EventLocationsDict --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resource_pages/EventLocationsDict Sat May 28 21:45:53 2011 +0200 @@ -0,0 +1,26 @@ +A list of location names mapping to their positions written as ` `, where northern latitudes are positive, southern latitudes are negative, western longitudes are negative, and eastern longitudes are positive. + +Latitudes and longitudes are thus written as `[+|-] [ : [ : ] ]` - in other words, a positive or negative number of degrees optionally followed by a colon and a number of minutes, optionally followed by a colon and a number of seconds. + + Oslo, Norway:: 59:56:58 10:45:23 + Reykjavík, Iceland:: 64:8 -21:56 + Tórshavn, Faroe Islands:: 62:0:42 -6:46:3 + Madrid, Spain:: 40:23 -3:43 + Paris, France:: 48:51:24 2:21:3 + Birmingham, United Kingdom:: 52:28:59 -1:53:37 + Brussels, Belgium:: 50:51:0 4:21:0 + Gothenburg, Sweden:: 57:42 11:58 + Moscow, Russia:: 55:45:06 37:37:04 + Helsinki, Finland:: 60:10:15 24:56:15 + Helsinki, FI:: 60:10:15 24:56:15 + Tampere, Finland:: 61:30 23:46 + Valkeakoski, Finland:: 61:16 24:02 + Mariehamn, Finland:: 60:06 19:56 + Akureyri, Iceland:: 65:41 -18:06 + Vienna, Austria:: 48:12:32 16:22:21 + Wien, Austria:: 48:12:32 16:22:21 + Graz, Austria:: 47:04:13 15:26:20 + Linz, Austria:: 48:18:11 14:17:26 + Azores, Portugal:: 37:44:28 -25:40:32 + Amsterdam, The Netherlands:: 52:22:23 4:53:32 + Jan Mayen, Norway:: 70:59 -8:32 diff -r ae1a2e8398a1 -r e243694bdbc9 resource_pages/EventMapsDict --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resource_pages/EventMapsDict Sat May 28 21:45:53 2011 +0200 @@ -0,0 +1,10 @@ +Map definitions of the form ` ` for each map. Each corner is specified in the form ` ` where northern latitudes are positive, southern latitudes are negative, western longitudes are negative, and eastern longitudes are positive. + +Latitudes and longitudes are thus written as `[+|-] [ : [ : ] ]` - in other words, a positive or negative number of degrees optionally followed by a colon and a number of minutes, optionally followed by a colon and a number of seconds. + +Widths and heights are specified as numbers of pixels. Each filename must refer to an attachment which has been attached to this page and which has the given filename. + + europe:: 28 -23 73 37 600 450 europe-600x450.png + europe-large:: 28 -23 73 37 900 675 europe-900x675.png + +The bundled maps have been generated using [[http://www.mapnik.org/|Mapnik]] according to the [[http://trac.mapnik.org/wiki/GettingStarted|Mapnik tutorial]], together with boundary data (`world_borders.zip`) from [[http://mappinghacks.com/data/|Mapping Hacks]]. diff -r ae1a2e8398a1 -r e243694bdbc9 resource_pages/EventMapsDict-attachments/europe-600x450.png Binary file resource_pages/EventMapsDict-attachments/europe-600x450.png has changed diff -r ae1a2e8398a1 -r e243694bdbc9 resource_pages/EventMapsDict-attachments/europe-900x675.png Binary file resource_pages/EventMapsDict-attachments/europe-900x675.png has changed