This is a MoinMoin macro for event calendar (similar to MonthCalendar macro). The development is based on the MoinMoin MonthCalendar macro but it is a little bit different from MonthCalendar. It is targeted to the one of PIM. It includes a parser which shows the event information in a well parsed format. <> <> = Features = * Monthly, Weekly, Daily, List, Simple, Upcoming view of events * Handles daily, timely, recurred events * Uses wiki pages in a specific category for storing event data * Customized display: background-color = Platform Support = * 0.99b Tested on * MoinMoin 1.9.6 * Linux (Arch Linux) * Python 2.7.3 * Firefox 18.0 * 0.99a Tested on * MoinMoin 1.8.4, 1.9.4 * Linux (Fedora 10, Ubuntu 10.04) * Python 2.6.x * Firefox 3.5 Folks, please add more above if you can! * up to 0.99 Tested on/with: * MoinMoin 1.3.5, MoinMoin 1.5.x * Windows XP, Windows 2000, MacOsX 10.4.6 * Python 2.3.x, 2.4.x * IE 6.0, Firefox 1.5b2, Mozilla 1.7a, Opera 8.5 = Installation Guide = * Event``Calendar macro * Download the latest Event``Calendar.py macro and place it either in your global macro directory (MoinMoin/macro) or preferably in your local macro directory (yourwiki/data/plugins/macro). * Do not forget to rename the downloaded .py file. For example, you should change the file name 'Event``Calendar-080.py' to 'Event``Calendar.py'. * Event``Calendar stylesheet * Download the latest eventcalendar stylesheet file and insert the entries into the common.css of the appropriate theme (e.g. `MoinWiki/share/moin/htdocs/modern/css/common.css`). = Download = * v0.99b (patch wrapup release, supports moinmoin 1.9.6) * [[attachment:EventCalendar-099b.py]] * use [[attachment:eventcal-096.css]] for .css * v0.99a (patch wrapup release) * [[attachment:EventCalendar-099a.py]] * use [[attachment:eventcal-096.css]] for .css * v0.99 * [[attachment:EventCalendar-099.py]] * use [[attachment:eventcal-096.css]] for .css * v0.98 * [[attachment:EventCalendar-098.py]] * use [[attachment:eventcal-096.css]] for .css * v0.96 * [[attachment:EventCalendar-096.py]] * [[attachment:eventcal-096.css]] * v0.94 * [[attachment:EventCalendar-094.py]] * use [[attachment:eventcal-090.css]] for .css * v0.93 * [[attachment:EventCalendar-093.py]] * use [[attachment:eventcal-090.css]] for .css * v0.92 * [[attachment:EventCalendar-092.py]] * use [[attachment:eventcal-090.css]] for .css * v0.91 * [[attachment:EventCalendar-091.py]] * use [[attachment:eventcal-090.css]] for .css * ''no parser'' * v0.90 * Macro: [[attachment:EventCalendar-090.py]] * Parser: [[attachment:eventcal-090.py]] * Stylesheet: [[attachment:eventcal-090.css]] * v0.80 * Macro: [[attachment:EventCalendar-080.py]] * Parser: [[attachment:eventcal-080.py]] * Stylesheet: [[attachment:eventcal-080.css]] = Change Log = * '''July 17, 2009 - Version 0.99a''' * Add ErikMartin's Defaults patch (defaults-099-01) * Add AlanSnelson 2008-11-05 patch for Moin 1.8.0 caching methods * Add tidyup patch for 1.6.1 (Event``Calendar-099.py.patch) NeoCoin * Add Weeknumber patch from KlausMariaPfeiffer 2008-01-25 * Add label colour patch DavidOCallahan 2006-07-18 {see here for names: http://www.w3schools.com/html/html_colornames.asp} * Add pagelinks-099-01.patch for OrphanedPages maintenance. * Add showpagelist, to append list of contributing pages pagelist-099-01.patch (except: default now off not on) * Add event sorting patch RuthIvimey 2007-05-17 * Fix url_prefix usage DaveGore 2008-04-04 * Patches listed on this page but not in 0.99a include: * ErikMartin's Label Priority patch - too big a patch for this wrapup release. * RuthIvimey's page label colour patch - not sure of side-effects * HyungyongKim's unicode patch: described as temporary * '''May 22, 2006 - Version 0.99''' * added some error messages * fixed a bug on trailing spaces (Thanks to SkenderH) * '''May 12, 2006 - Version 0.98''' * added datetime format * display error messages for invalid event format * show week number * added 'label' field for custom bgcolor * fixed a bug on duplicated recurred event, added 'last weekday' recurrence (Thanks to Chris Clark) * '''April 17, 2006 - Version 0.96''' * added weekly, daily view * entering only the start_time (without end_time) is allowed * tooltip box in simple view * fixed a bug on duplicated event id * '''Feb. 06, 2006 - Version 0.94''' * fixed a bug on sorting events in a calendar view * fixed a bug on displaying multiple recurred events in the upcoming view * '''Jan. 18, 2006 - Version 0.93''' * use date/time format in user configuration at list view * fixed a bug on formatting 'recur_until' * '''Jan. 17, 2006 - Version 0.92''' * handling event recurrence feature is added * '''Jan. 13, 2006 - Version 0.91''' * no need parser any more * event data format is changed to a simpler one: {{{ == title == start:: startdate end:: enddate bgcolor:: background_color description:: event_description ... ---- CategoryEventCalendar }}} * Note: it is not compatible with the event data of the old versions * event information is stored in wiki pages with specified category (CategoryEventCalendar by default) * event caching per page * first-day/first-weekday bug is patched. * custom icon field is not used any more * '''Nov. 15, 2005 - Version 0.90''' * No file I/O needed: just with wiki pages * custom display for parsed view: none, footnote, erroronly, table * custom display for monthly view: bgcolor, icon * simple view is added * a few parameters are added * '''Oct. 31, 2005 - Version 0.80''' * The initial version is released. = Usage = * To list the events in a page, just insert {{{<>}}} * To insert an event, insert the event information in any pages of specified category (CategoryEventCalendar by default). == Event Format == {{{ [default_description:: [page_default_description_text]] [default_bgcolor:: [page_default_background_color]] [label_def:: [label_name], [label_background_color]] == == start:: <startdate> [starttime] [end:: [enddate] [endtime]] [description:: [description_text]] [bgcolor:: [custom_background_color]] [recur:: <recur_freq> <recur_type> [until <recur_until>]] [label:: <label_name>] ... ---- CategoryEventCalendar }}} * default_bgcolor, default_description: default values of bgcolor and description in the page if unavailable. optional * label_def: label definition with name, bgcolor. optional * title: event title. required * should be enclosed with heading marker ('='), Title cannot be omitted. * startdate: date of start. required * should be in date format or date format * starttime: time of start. optional * should be in time format * enddate: date of end. optional * should be in date format or date format. If omitted, it will be assigned equal to <startdate>. * endtime: time of end. optional * should be in time format. Both of start|end Time can be omitted but not either of them. * description: description of the event. optional * any text with no markup. should be in a line. * bgcolor: custom background color of the event in monthly view. optional * e.g., #abcdef * recur: recurrence information of the event. optional * recur_freq: how many intervals, digit or 'last' for weekday, required * recur_type: [day|week|weekday|month|year], required * day: every [recur_freq] days * week: every [recur_freq] weeks * weekday: on the same weekday of [recur_freq]-th week of the month. or 'last weekday' * month: on the same day of [recur_freq]-th month * year: on the same day of [recur_freq]-th year * recur_until: recurred until when, date format, optional * e.g., 10 day, 2 week until 2006-06-31, 3 weekday, 6 month until 2007-12-31, 1 year * label: custom label for specific name, bgcolor. optional * The order of the fields after an event title does not matter. * Priority of bgcolor: bgcolor > default_bgcolor > label_bgcolor === Datetime Format === * Date format: * YYYY/MM/DD, YYYY-MM-DD, YYYY.MM.DD: 2006/05/12; 2006-05-12; 2006.05.12; 2006-5-12; 06/5/12 * B DD, YYYY: May 12, 2006; May 5th, 2006; January 1st, 2006; Jan 5, 06 * YYYYMMDD, YYMMDD: 20060512; 060512 * Year: YY = 20YY. e.g., 06-2-2 = 2006-02-02, allowed 1900 ~ 2099 only. * Time format: * H:M, HHMM: 12:00; 22:00; 2:00; 2 (= 2 o'clock); 2200; 12:0; 2:0 * I:M PP, IIMM PP: 12:00 PM; 3:00p; 2a (= 2 o'clock AM); 3:0pm; 0200 am; 10pm * For example: {{{ == Valid event #1 == start:: 2006-02-28 end:: 2006-03-01 description:: multi-day event == Valid event #2 == start:: 2006-02-28 13:00 end:: 2006-03-01 14:00 description:: multi-day event with specified time == Valid event #3 == start:: 2006-02-28 description:: single-day event. enddate will be 2006-02-28 automatically. == Valid event #4 == start:: 2006-02-28 13:00 end:: 14:00 description:: single-day event with specified time. enddate will be 2006-02-28 automatically. == Valid event #5 == start:: 2006-02-28 13:00 end:: 2006-03-01 description:: single-day event with specified time. endtime will be 13:00 automatically. == Invalid event #1 == start:: 2006-02-28 end:: 2006-03-01 13:00 description:: start time should be specified ---- CategoryEventCalendar }}} === Event Data Example === {{{ = Personal Events = default_bgcolor:: #c0c0c0 default_description:: My personal event = Labels = label_def:: Holiday, #ff0000 label_def:: Meeting, #00ff00 === Business trip === start:: 2006-01-10 14:00 end:: 2006-01-12 17:00 description:: L.A. bgcolor:: #cfcfcf === Test event === start:: 2006-01-10 02:00p end:: 2006-01-12 17:00 description:: test event bgcolor:: #cfcfcf === Jinah's Birthday === start:: 1977-10-20 recur:: 1 year label:: Holiday === Weekly meeting === start:: Jan 17, 2006 7:00pm end:: 21:00 recur:: 1 week until 061231 label:: Meeting ---- CategoryEventCalendar }}} == Parameters == * {{{category}}}: the category of the event data to be used in the calendar. default: 'CategoryEventCalendar' {{{ [[EventCalendar(category=CategoryPersonalEvents)]] }}} * {{{menubar}}}: shows menubar or not (1: show, 0: no menubar). default: 1 {{{ [[EventCalendar(menubar=0)]] }}} * {{{monthlywidth}}}: calendar width in pixel or percent (monthly view). default: '600' (pixel) {{{ [[EventCalendar(monthlywidth=80%)]] }}} * {{{simplewidth}}}: calendar width in pixel or percent (simpleview). default: '150' (pixel) {{{ [[EventCalendar(simplewidth=200)]] }}} * {{{firstview}}}: initial calendar view: monthly, weekly, daily, list, simple, upcoming. default: 'monthly' {{{ [[EventCalendar(firstview=simple)]] }}} * {{{curdate}}}: initial calendar date (in YYYYMM format). default: current month {{{ [[EventCalendar(curdate=200510)]] }}} * {{{upcomingrange}}}: # of days for the range of upcoming event list. default: 7 (days) * {{{changeview}}}: enables to change the calendar view or not (1: enabled, 0: disabled). default: 1 * {{{numcal}}}: # of calendar in monthly, simple view. default: 1 * {{{showlastweekday}}}: shows the event at the last weekday if the recurred weekday is not available. (1: enabled, 0: disabled). default: 0 * {{{showerror}}}: shows error messages below the calendar if event data format is invalid. (1: enabled, 0: disabled). default: 1 * {{{showweeknumber}}}: shows the week number of the year (1: enabled, 0: disabled). default: 0 * {{{showpagelist}}}: shows a list of the pages used for event data below the calendar. (1: enabled, 0: disabled). default: 0 == Cache-related Information == * Page List: the page list of the specified category is cached at the macro page. '''If any data pages are added or removed into/from a category, you should do 'delete cache' in the page.''' Since this cache is valid for 24 hours, however, you can get refreshed page list after a day. * Events, Cal_Events: the information about all the events and rendering monthly view calendar is cached at the macro page. If any data pages in the specified category are modified, it re-builds this information. * Event Records: the information about the event records in a page is cached. = Sample & Screenshot = * Sample sites (If available, please add yours): * http://www.silee.net/CalendarTest * http://www.plsavez.hr/hr/Kalendar * http://www.iam-wiki.org/Veranstaltungskalender_Identity_Management * Monthly view {{attachment:snap-monthly.jpg}} * Simple view {{attachment:snap-simple.jpg}} * List view {{attachment:snap-list.jpg}} * Upcoming view {{attachment:snap-upcoming.jpg}} * Weekly view {{attachment:snap-weekly.jpg}} * Daily view {{attachment:snap-daily.jpg}} = To do list = * Clean the ugly codes!!! (need help) * raw html codes * Custom icon per event (experimental) {X} * Parsing description field {X} * Update page log at add/edit/remove event in the text data file {X} * Sort events by various options in list view * Shows a part of the event list (e.g., next 100 events..) * Show endtime in Eventcalendar * Add exceptions to recur: "recur 1 day except (2009/09/10)" = Completed To do's = * Daily view of events * Weekly view of events * Date/time Format customization (e.g., 2005/10, Oct. 2005, 18:00, 06:00pm) * Custom background color per event * Upcoming event list * More input parameters * Using page cache * Load partial events only in the specified date range * Pre-defined configurations (e.g., color code) = Notes = * MonthCalendar developed by ThomasWaldmann has inspired this macro. * Much buggy.. : please report bugs and suggest your ideas. * If you missed to add css for EventCalendar, monthly view may not be readable. * Insert the eventcalendar css classes into the screen.css of appropriate theme. = Confirmed Bugs & Patches = == v0.99a == 1.9.1 & 1.9.2 require this patch: {{{ --- EventCalendar-0.99a.py 2010-06-10 14:57:51.683965215 +0100 +++ EventCalendar-0.99b.py 2010-06-10 15:06:14.264057020 +0100 @@ -267,10 +267,10 @@ if args: args=request.getText(args) - for item in macro.form.items(): + for item in macro.request.values.items(): if not form_vals.has_key(item[0]): try: - form_vals[item[0]]=item[1][0] + form_vals[item[0]]=item[1] except AttributeError: pass @@ -318,7 +318,7 @@ html.append( html_result ) html.append( showmenubar() ) - html.append( showpagelist() ) + html.append( show_page_list() ) if Params.showerror and Globs.errormsg: html.append(u'<p><i><font size="2" color="#aa0000"><ol>%s</ol></font></i>' % Globs.errormsg) }}} == v0.99 == === 1.8.0 update Patch === For 1.8.0 MoinMoin, I have modified the !CacheEntry function to use Page instance caching (scope='item') as the default scope of wiki fails to render the calendar. -- AlanSnelson <<DateTime(2008-11-05T16:49:00Z)>> * patch {{attachment:EventCalendar-099-01.py.patch}} Thankyou! :-) --DavidGore <<DateTime(2008-12-16T04:01:00Z)>> === 1.6.1 update Patch === For 1.6.1 MoinMoin, I remove imported module that do not use, and edit two line because of argument's count. In addition, I add encode,decode code for caching based on non-alphabet character pagenames. * patch {{attachment:EventCalendar-099.py.patch}} example page [[http://neocoin.net/cs/NeoCoin/Journal|My Journal Page]] --NeoCoin <<DateTime(2008-02-14T05:15:54Z)>> === UTC Offset Messes up Upcoming event view === I set my offset to -5.0 from UTC and my upcoming view is empty. FYI, the UTC was a day ahead when I tried --JaeStutzman === Days back in Upcoming view === Would be nice if the ''Upcoming'' view would offer a second range varable beside ''upcomingrange'' - something like ''backrange''. With this, the ''upcoming'' view would be extended to a ''recent and upcoming event'' view - this would be very helpful for example to create an ''What happened lately and will happen soon'' view ... And here's the patch: {{{ 26d25 < * backrange: # of days for the backrange of upcoming event list. default: 0 (days) 184d182 < backrange = 0 # days 217d214 < backrange = 0 382,388d378 < # backrange: # of days for backrange in upcoming event list < # default: 0 < try: < Params.backrange = int(params.get('backrange', Globs.backrange)) < except (TypeError, ValueError): < Params.backrange = Globs.backrange < 832d821 < dayback_delta = datetime.timedelta(days=Params.backrange) 834d822 < prev_range = cur_date - dayback_delta 838c826 < datefrom = u'%04d%02d%02d' % (prev_range.year, prev_range.month, prev_range.day) --- > datefrom = u'%04d%02d%02d' % (year, month, day) 846,847c834 < datefrom = formatcfgdatetime(formatdateobject(prev_range)) < # datefrom = formatcfgdatetime(cur_date, nowtime) --- > datefrom = formatcfgdatetime(cur_date, nowtime) 857,858c844,846 < if events[eid]['enddate'] >= formatdateobject(prev_range): < html_event_rows.append( listshow_event(events[eid]) ) --- > if events[eid]['enddate'] >= formatdateobject(Globs.today): > if (not events[eid]['endtime']) or events[eid]['endtime'] >= formattimeobject(Globs.now): > html_event_rows.append( listshow_event(events[eid]) ) }}} -- JohannesKilian <<DateTime(2006-09-19T13:27:48Z)>> === Week Number === thanks for implementing the week numbers! but, if the first day of the week is monday, the weeknumber is wrong. I've patched it the following way: {{{ # diff EventCalendar-099.py EventCalendar.py 176c176 < calendar.setfirstweekday(calendar.SUNDAY) --- > calendar.setfirstweekday(calendar.MONDAY) 3629c3629 < html_text = u'%s <font size="1" color="#aaaaaa"><i>(%d)</i></font>' %(html_text, (int(datetime.date(year, month, day).strftime('%W')) + 1)) --- > html_text = u'%s <font size="1" color="#aaaaaa"><i>(%d)</i></font>' %(html_text, (int(datetime.date(year, month, day).strftime('%W')))) }}} -- KlausMariaPfeiffer <<DateTime(2006-09-01T12:38:48Z)>> === Week Numbers in 2008 === thanks for implementing the week numbers! but, in 2008 week numbers are wrong, just use the isocalendar. I've patched it the following way: {{{ # diff EventCalendar-099.py EventCalendar.py 176c176 < calendar.setfirstweekday(calendar.SUNDAY) --- > calendar.setfirstweekday(calendar.MONDAY) 3629c3629 < html_text = u'%s <font size="1" color="#aaaaaa"><i>(%d)</i></font>' % (html_text, (int(datetime.date(year, month, day).strftime('%W')) + 1)) --- > html_text = u'%s <font size="1" color="#aaaaaa"><i>(%d)</i></font>' % (html_text, (int(datetime.date(year, month, day).isocalendar()[1]))) }}} -- KlausMariaPfeiffer <<DateTime(2008-01-25T14:40:51Z)>> === Named Colours === I've patched EventCalendar v0.99 so that it allows named colours as well as hex values. This allows entries like this: {{{ == Labels == label_def:: sick, red label_def:: conference, yellow === Meeting 1 === start:: 2006-05-30 end:: 2006-06-03 description:: First Meeting label:: conference === Moon Trip === start:: 2006-07-19 description:: Trip to the Moon bgcolor:: blue}}} Here's the patch: {{{ --- EventCalendar-0.99.py.orig 2006-07-18 10:00:48.000000000 +0100 +++ EventCalendar-0.99.py 2006-07-18 10:01:38.000000000 +0100 @@ -1575,7 +1575,7 @@ regex_page_bgcolor = r""" (?P<req_field>^[ ]+default_bgcolor::[ ]+) ( - (?P<pagebgcolor>\#[0-9a-fA-F]{6}) + (?P<pagebgcolor>(\#[0-9a-fA-F]{6}|[a-zA-Z]+)) \s*? $ )? @@ -1616,7 +1616,7 @@ ( (?P<name>[^,^:^\s]+?) [,: ]+ - (?P<bgcolor>\#[0-9a-fA-F]{6}) + (?P<bgcolor>(\#[0-9a-fA-F]{6}|[a-zA-Z]+)) \s*? $ )? @@ -1888,7 +1888,7 @@ regex_bgcolor = r""" (?P<reqfield>^[ ]+bgcolor::[ ]+) ( - (?P<bgcolor>\#[0-9a-fA-F]{6})? + (?P<bgcolor>(\#[0-9a-fA-F]{6}|[a-zA-Z]+))? \s*? $ )?}}} While this patch makes it possible for users to enter invalid colour names, I think that overall it makes life easier for users. Here's a [[http://www.w3schools.com/html/html_colornames.asp|list of HTML colour names]]. -- DavidOcallaghan <<DateTime(2006-07-18T09:12:56Z)>> === Stored Page Links === This patch updates the pagelinks data, so that the links generated by the macro are registerd correctly for things like OrphanedPages and linkto searches * patch: {{attachment:pagelinks-099-01.patch}} === Show Page List === This patch adds the option to display a list of pages that were used to generate the callendar, below the callendar * patch: {{attachment:pagelist-099-01.patch}} === Default Label Config Page === This patch adds looking for a defalut page for labels, (also reads events on the page) for all the calls to !EventCalendar, this make it easy to have consistant set of labels without duplicating and getting the label duplication warnings, or every time there is a new calendar added needing to add it to the page with the default labels. -- ErickMartin <<DateTime(2006-11-30T15:52:39Z)>> * patch: {{attachment:defaults-099-01.patch}} === Label Priority === This patch fixes the problem where a labels color would be ignored if the page with the defaitions had a default event color -- ErickMartin <<DateTime(2006-11-30T15:52:39Z)>> * patch: {{attachment:label_priority-099-01.patch}} The cached data of calendar events may show to the un-authorized users by acl. -- SeungikLee <<DateTime(2006-10-09T08:27:28Z)>> A couple problems and a question. I am using EventCalendar with MMDE (DesktopEdition), installed as a service. a) If I put two event calendar macros in the same page, changes in view on one affect both. So, if I start one with upcoming and the other with monthly, moving one month ahead changes de upcoming view to monthly also. b) I have to stop and start the MMDE service to include newly defined pages with events. After restart I do the normal cache clean and all works. Perhaps it is a MMDE problem ... c) question: how one gets full blocks covering several days? (as done in the monthly view example ... I have to artificially make the title long enough but seems unpractical ...) TIA CarlosBandar Thanks SeungikLee. It's very useful but there is a error when I use unicode event pagename (ex, Hangul pagename) because "%" character in URL encode string. It is a temporary solution for escaping error. {{{ # diff EventCalendar.py ~/EventCalendar-099.py 2864,2870c2864 < try: < html_cols = u'\r\n'.join(html_hour_cols[hour_index]) % {'colspan': colspan, 'width': u'%d%%' % width} < except TypeError: < html_cols = u'\r\n'.join(html_hour_cols[hour_index] < ).replace('%(colspan)d',u'%d'%colspan < ).replace('%(width)s', u'%d%%'%width) < --- > html_cols = u'\r\n'.join(html_hour_cols[hour_index]) % {'colspan': colspan, 'width': u'%d%%' % width} }}} -- HyungyongKim <<DateTime(2006-07-03T08:04:41Z)>> also need change a similar line for weekly view. {{{ 2864,2867c2864 < try: < html_cols = u'\r\n'.join(html_hour_cols[hour_index]) % {'colspan': colspan, 'width': u'%d%%' % width} < except TypeError: < html_cols = u'\r\n'.join(html_hour_cols[hour_index]).replace('%(colspan)d',u'%d'%colspan).replace('%(width)s', u'%d%%'%width) --- > html_cols = u'\r\n'.join(html_hour_cols[hour_index]) % {'colspan': colspan, 'width': u'%d%%' % width} 3128,3131c3125 < try: < html_cols = u'\r\n'.join(html_hour_cols[hour_index][dayindex]) % {'colspan': colspan, 'width': u'%d%%' % width} < except TypeError: < html_cols = u'\r\n'.join(html_hour_cols[hour_index][dayindex]).replace('%(colspan)d',u'%d'%colspan).replace('%(width)s', u'%d%%'%width) --- > html_cols = u'\r\n'.join(html_hour_cols[hour_index][dayindex]) % {'colspan': colspan, 'width': u'%d%%' % width} }}} -- GuoYong <<DateTime(2006-09-23T01:03:41Z)>> RuthIvimey here with 3 issues: There is a small error in the list view, which doesn't sort events within a day, only for different days. Apply this patch (unified diff) to fix it: {{{ @@ -1051,8 +1080,11 @@ # sort events in the list by start date of the event def comp_list_events(xid, yid): events = Globs.events - - return cmp(events[xid]['startdate'], events[yid]['startdate']) + if events[xid]['startdate'] == events[yid]['startdate']: + return cmp(events[xid]['starttime'], events[yid]['starttime']) + else: + return cmp(events[xid]['startdate'], events[yid]['startdate']) + # load events from wiki pages def loadEvents(datefrom='', dateto='', nocache=0): }}} I also consider it a bug, but probably the author doesn't :-), that label background colours have a lower priority than the default background colour. If you want to change that, the following patch is what I'm using, although it might not be optimal... {{{ @@ -1693,8 +1727,8 @@ # continue # set default values - if not e_bgcolor: - e_bgcolor = page_bgcolor + #if not e_bgcolor: + #e_bgcolor = page_bgcolor if not e_description: e_description = page_description }}} And finally, in week view, if you have two events that end and start at the same 1/2 hour point, the calendar puts them side-by-side as if they overlap. I can see why this happens - the granularity of rendering week view is 1 hour, so it can't render a 30 min split. It would be nice if it could though. Would it be very hard to split the day into 48 rows each of 30 mins? For that matter, would it be possible to specify a start hour and end hour for the day - e.g 08:00 to 23:00? Thanks anyway - it's looking good (see [[http://chbc.cherryhinton.org.uk/Diary|Our Diary]] ) -- RuthIvimey <<DateTime(2007-05-17T23:36:42Z)>> Sorry for beeing anonymus, but another user has used my mail-adress. I think that I have found a bug but can't believe that I am the first. As shown in the Screenshot the Event "Business Trip" is missing in the Upcoming-List. At 20:59 that Event was there. If I change the end to 22:00h it will be listed. {{attachment:time_bug.PNG}} -- Dirk <<DateTime(2007-06-12T21:50:42Z)>> The call "request.cfg.url_prefix" returns "None" in MoinMoin1.6.2 (it might also be because I'm using ProxyReverse in Apache). This causes the `<SCRIPT>` tag to incorrectly point to `src="None/common/js/infobox.js"` and tooltips are unavailable. I changed "request.cfg.url_prefix" to "request.cfg.url_prefix_static" in line 3366 to avoid this error. -- DaveGore <<DateTime(2008-04-04T20:37:00Z)>> = Discussion / Support / Request / Contribution = /OlderDiscussion /RefactoringProposals - HTML templates and OOP == v0.99 == * Four Quadrants of Time Management. If we can define more properties such as importance and urgency and have another daily/weekly/monthly will be better. Please refer to Stephen R. Covey talks about in his Four Quadrants of Time Management: 1) Important & Urgent 2) Important & Not Urgent 3) Urgent & Not Important 4) Not Urgent & Not Important -- RainR (2007.08.10) It should be possible to put multiple of EventCalendar macros on a single page. I have created many CategoryCalendarEvents for various purposes. For instance I have create a different category for each user of the system. Now I would like to do the following: || Person One || {{{[[EventCalendar(firstview=upcoming,category=CategoryPersonOneEvents)]]}}} || || Person Twe || {{{[[EventCalendar(firstview=upcoming,category=CategoryPersonTwoEvents)]]}}} || This would be very useful when creating an overview page for a secretary or something. -- AllenCurtis <<DateTime(2007-09-17T04:20:53Z)>> Another nice extension would be the ability to specify multiple even calendar categories for the same calendar. This could be a good compromise to enabling multiple event calendar instances to exist on the same page. (I assume that is a page cache issue) -- AllenCurtis <<DateTime(2007-10-06T20:54:18Z)>> Hi, are there plans for 1.6? -- ReimarBauer <<DateTime(2007-10-26T15:37:58Z)>> Is there a way to create yearly events without specifying the year? I simply don't know or don't want to publish the year for birthday events. --AnkeHeinrich <<DateTime(2007-10-31T10:42:00Z)>> I like the interface of this macro. I think it would be nicer if this macro has following functions. Thanks. -- TakeoKatsuki <<DateTime(2010-01-19T16:19:47+0900)>> 1. Incorporating data of MonthCalendar. For example, could contents of MonthCalendar pages (file names are in year-month-day format) be recognized as the start date and end date of single-day events? 2. In addition to {{{start::}}} and {{{end::}}} syntax, time information in the heading may also be useful for specifying start time and end time of the event. For example, {{{= 14:00-16:00 meeting =}}}. 3. Creating new events directly from the calendar probably by clicking the date link, which is the case in MonthCalendar. 4. (./) Faster page rendering. Currently, a category with many subpages such as MonthCalandar pages takes very long time to be rendered. I found this problem only on Windows. On Linux machines this macro is fast enough even with hundreds of subpages. 5. (./) Specification of multiple categories for one calendar. This would be useful if one wants to obtain data from certain months from MonthCalendar. This can be achieved by {{{<<EventCalendar(category=(CategoryOne OR CategoryTwo))>> }}} 6. Importing iCal or GoogleCalendar data. Ideally synchronization with these calendars. 7. Mouseover on an event displays a box that shows detailed info from the "description" field, and URLs/WikiLinks there are clickable. 8. Email notification for a specified event. Is there an EventCalendar-RSS-Feed or is something like that planned? -- MelaEckenfels <<DateTime(2009-08-04T00:46:21Z)>> How can I make the calendar starts from Sunday instead of Monday? I changed the code {{{calendar.setfirstweekday(calendar.MONDAY)}}} to {{{calendar.setfirstweekday(calendar.SUNDAY)}}}, and restarted the system. It works for the first view, but if I do "delete cache" action, the calendar again starts from Monday. I tested on WinXP and Linux. -- TakeoKatsuki <<DateTime(2010-06-02T18:18:54-0800)>> Hi, I've made a quick patch (really quick, so probably there still may be bugs :) ) which adds a new field called 'url'. If this one is given for an event then the link in the calendar will point to the given URL instead of the page with the list of events. {{{ 497a498 > url = event['url'] 517a519,521 > if len(url) > 0: > targetlink = '<a href="%s">%s</a>' % ( url, wikiutil.escape(targettext)) > 1756c1760 < e_start_date, e_start_time, e_end_date, e_end_time, e_bgcolor, e_label, e_description, e_recur_freq, e_recur_type, e_recur_until = geteventfield(eventdetail) --- > e_start_date, e_start_time, e_end_date, e_end_time, e_bgcolor, e_label, e_description, e_recur_freq, e_recur_type, e_recur_until, e_url = geteventfield(eventdetail) 1791a1796 > eventitem['url'] = e_url 1978a1984,1993 > > regex_url = r""" > (?P<reqfield>^[ ]+url::[ ]+) > ( > (?P<url>.*?) > \s*? > $ > )? > """ > 2040a2056 > pattern_url = re.compile(regex_url, re.UNICODE + re.MULTILINE + re.IGNORECASE + re.DOTALL + re.VERBOSE) 2312a2329,2340 > ##################### retrieve URL for details > match = pattern_url.search(detail) > > if match: > if match.group('url'): > url = match.group('url') > else: > errormsgcode('empty_url') > url = '' > else: > url = '' > 2472c2500 < return startdate, starttime, enddate, endtime, bgcolor, label, description, recur_freq, recur_type, recur_until --- > return startdate, starttime, enddate, endtime, bgcolor, label, description, recur_freq, recur_type, recur_until, url }}} -- AlexanderAgibalov <<DateTime(2010-06-18T12:43:25Z)>> == v0.99a == I noticed two problems here on Debian running MoinMoin v1.9.3-1+squeeze1 with Python 2.6: 1. the macro variable seems to lack a "form" attribute. I am not aware of the specific problematic circumstances. This exception is raised: {{{ File "/data/moin/sites/spontanplanung/plugin/macro/EventCalendar.py", line 271, in execute for item in macro.form.items(): AttributeError: Macro instance has no attribute 'form' }}} 2. the function ''show_page_link'' is referenced without underscore (''showpagelink'') The following patch fixes both problems. The first part is just a quick workaround for problem (1) - I don't know if this breaks anything. The second part is simple and foolproof, I guess. {{{ --- EventCalendar.py.orig 2009-07-16 03:35:13.000000000 +0200 +++ EventCalendar.py 2012-06-21 22:03:43.000000000 +0200 @@ -267,12 +267,13 @@ if args: args=request.getText(args) - for item in macro.form.items(): - if not form_vals.has_key(item[0]): - try: - form_vals[item[0]]=item[1][0] - except AttributeError: - pass + if hasattr(macro, "form"): + for item in macro.form.items(): + if not form_vals.has_key(item[0]): + try: + form_vals[item[0]]=item[1][0] + except AttributeError: + pass # PROCESSING ACTIONS ---------------------------------------- cal_action = form_vals.get('calaction', default_action) @@ -692,7 +693,7 @@ return html -def show_page_list(): +def showpagelist(): html = "" request = Globs.request formatter = Globs.formatter }}} -- Lars <<DateTime(2012-06-21T23:27:25Z)>> = Bugs and Discssion Older than 0.99 = /OlderDiscussion