Attachment 'defaults-099-01.patch'
Download   1 Index: EventCalendar.py
   2 ===================================================================
   3 --- EventCalendar.py	(revision 232)
   4 +++ EventCalendar.py	(working copy)
   5 @@ -29,6 +29,7 @@
   6          * showerror: shows error messages below the calendar if event data format is invalid. (1: enalbed, 0: disabled). default: 1
   7          * showpagelist: shows a list of the pages used for event data below the calendar. (1: enalbed, 0: disabled). default: 1
   8          * showweeknumber: shows the week number of the year (1: enalbed, 0: disabled). default: 0
   9 +        * configpage: the page that defines default config, in particular labels. default: 'EventCalendarDefaults'
  10          
  11      
  12      <Event Data Format>
  13 @@ -212,6 +213,7 @@
  14      curdate = ''
  15      bgcolor = ''
  16      category = ''
  17 +    defaultconfigpage = 'EventCalendarDefaults'
  18      upcomingrange = 0
  19      changeview = 0
  20      numcal = 1
  21 @@ -422,6 +424,12 @@
  22      except (TypeError, ValueError):
  23          Params.showpagelist = 1
  24   
  25 +    default_cfg_page = 'EventCalendarDefaults'
  26 +    if hasattr(request.cfg, 'event_calendar_default_cfg_page'):
  27 +        default_cfg_page = request.cfg.event_calendar_default_cfg_page
  28 +
  29 +    Params.defaultconfigpage = params.get('configpage', default_cfg_page)
  30 +
  31      # default bgcolor
  32      Params.bgcolor = '#ddffdd'
  33      
  34 @@ -1468,6 +1476,11 @@
  35  
  36      
  37      if Globs.page_action == 'refresh' or cache_pages.needsUpdate(arena._text_filename()) or timedelta_days >= 1:
  38 +        cfgpage = Page(request, Params.defaultconfigpage)
  39 +        if cfgpage.exists():
  40 +            formatter.pagelink(1, pagename=cfgpage.page_name)
  41 +            eventpages.append(cfgpage.page_name)
  42 +
  43          categorypages = searchPages(request, category)
  44          for page in categorypages:
  45              # this is to workaround the bug in the category search returning
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.
