Tags:
create new tag
view all tags

Question

Is there a way to integrate CalendarPlugin with TimeTablePlugin to create a combination monthly/weekly calendar?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: CalendarPlugin, TimeTablePlugin, ToolTipPlugin, GluePlugin
Categories:  

-- LynnwoodBrown - 08 Jun 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

A client asked for a combination monthly and weekly calendar and after a fair amount of tinkering, I got a fairly satisfactory solution combining CalendarPlugin and TimeTablePlugin. I also incorporated the add-an-event "wizard" described in CalendarPluginAddEventCommentPluginTemplate. I'm sharing my work here for others that may find it useful and perhaps further refine it.

Here's some screen shots: (click to view full size)

  • Month view:
month.jpg
  • Week view:
week.jpg
  • Event list view:
event_list.jpg
  • Posting new event:
post_new.jpg

Miscellaneous notes:

  • In addition to CalendarPlugin and TimeTablePlugin, this setup uses ToolTipPlugin (which was used by TimeTablePlugin), IfDefinedPlugin, and GluePlugin. GluePlugin really isn't necessary. I just use it because I find it useful. If you don't use it, you'll need to reformat a couple of the tags (which should be fairly self-evident if you look at the code). Likewise, the use of IfDefinedPlugin could be replaced with IfStatements to reduce the requirements. (Again, I just find IfDefinedPlugin easier to use.)
  • I incorporated the prior/next month links described in CalendarPluginDev and modified that setup to provide prior/next week links also. I also added a fix so that these would work better with transitions across years (with some kind help from PeterThoeny).
  • I tweaked CalendarPluginAddEventCommentPluginTemplate to accommodate the time input. If you don't enter the times, the event is listed at the top in the week view.
  • If you look at this in detail, you'll see that because of the differences between the two plugins, I had to make various compromises and a couple of semi-kludge to make it all work. I'm confident that others may be able to add some improvements!

To set it up:

  1. Add content from this comment template to UserCommentsTemplate
  2. Create a topic using MonthWeekCalendar.txt as a template.

-- LynnwoodBrown - 08 Jun 2007


Comments & Discussion

Thanks Lynnwood for sharing this with the TWikiCommunity!

-- PeterThoeny - 08 Jun 2007

NICE

-- VickiBrown - 08 Jun 2007

is there additional documentation? I have really problems to integrate this greate proposal! The commands ~~~ year="%CURYEAR%" adn ~~~ month="%CURMONTH%" are not working..... Additionally another error occured: No such template def MPL:DEF{PROMPT:AddCalendarEvent} The events aren't displayed in the Month View.

-- StephanMunk - 17 Jul 2007

Stephan - I'm sorry but there isn't more documentation. Regarding ~~~      year="%CURYEAR% and similar lines with "~~~", that is formatting for GluePlugin. If you are not using that plugin, you need to reformat those tags to be on a single line (and remove the "~~~"). Regarding the second error, that suggest that you did not add the CommentPlugin template as instructed in step 1 in my instructions above.

Having worked with this setup for a few weeks now, let me comment that I am not entirely happy with it. Basically, it's a huge hack of a lot of pieces that are prone to break. In particular, the use of ToolTipPlugin adds a level of complexity and fragility that is is not worth it IMHO. I simply included it because CalendarPluginAddEventCommentPluginTemplate used it. If I can figure a way to remove that part of it, I most certainly will. For example, I have discovered that after you have added a few events, the list of events basically breaks the application and the tooltips don't work anymore. :-\ As a work around, I now store the events list in a separate topic.

Also, I just received a report today that the javascript for adding new events doesn't work in MS Vista. I can't even begin to debug that since I don't have a copy of Vista (and have no intent on getting one, thank you).

So, in short, I think this really needs some work in simplifying it to make is less fragile. That's a shame because this is approaching the minimum requirements of a decent calendar application for TWiki IMO. Unfortunately, I don't have the luxury to work more on this at present unless someone would like to sponsor the work. I would be glad to share ideas and code with someone else if they would like to work with me on it. (Particularly someone with javascript knowledge and a vista installation.) If I do get some time and/or sponsorship to take this further, I'll certain share the results back here.

-- LynnwoodBrown - 18 Jul 2007

Hi, thanks for your quick reply. Now the Calendar is working half. I have only problems that the start and end dates / time and coloars won't be transferred to the EventsList. Only the description is displayed in the list.... So without extra editing nothing appears in the calendar....any advice?

-- StephanMunk - 18 Jul 2007

Stephan -
The template OUTPUT section is incomplete. I'm working on understanding why myself. (See: Support.IntegrateWeekAndMonthCalendar)

-- VickiBrown - 29 Aug 2007

Closing this after more than 30 days of inactivity.

-- PeterThoeny - 03 Oct 2007

Change status to:
Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt Add_to_UserCommentsTemplate.txt r1 manage 24.3 K 2007-06-08 - 18:25 UnknownUser Comment template
Texttxt MonthWeekCalendar.txt r1 manage 6.0 K 2007-06-08 - 18:18 UnknownUser Topic combining monthly and weekly calendar
JPEGjpg event_list.jpg r1 manage 46.3 K 2007-06-08 - 18:47 UnknownUser event list view
JPEGjpg month.jpg r1 manage 97.6 K 2007-06-08 - 18:39 UnknownUser Month view
JPEGjpg post_new.jpg r1 manage 73.4 K 2007-06-08 - 18:48 UnknownUser post new event view
JPEGjpg week.jpg r1 manage 88.8 K 2007-06-08 - 18:46 UnknownUser Week view
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2007-10-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.