r363 - 06 May 2008 - 19:34:07 - PeterThoenyYou are here: TWiki >  Plugins Web > CalendarPluginDev
Tags:
calendar 1 Add my vote for this tag, date_time 1 Add my vote for this tag, , create new tag

CalendarPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on CalendarPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please file bug reports in the CalendarPlugin bug database.
• See CalendarPluginDevArchive for older discussions.

Development discussion for CalendarPlugin

-- AndreaSterbini - 27 Jan 2001

Should this format work:

  • L Fri - [[RedbournRecreationCentre][Recreation Centre]] Social events last Friday of the month

The documentation says that:

  • L Mon May - The last Monday of May

I just want the last Monday of every month.

Thanks.

  • (I removed the pre tags, FF did not display anything for some reason -- PTh)

-- MartinCleaver - 06 Jan 2006

hi.

I just installed the plugin and have gone over the install instructions several times. Still cant get a calendar to display. Is there a debug or a help section for the install?

-- AsimKhan - 16 Jan 2006

Did you ensure that CPAN:HTML::CalendarMonthSimple and CPAN:Date::Calc are installed and accessible by your web server? Please post a full support question at Support. This topic is for development issues (enhancements, bugfixes, ...) only. Thanks.

-- FranzJosefSilli - 16 Jan 2006

I have been thinking about how to make this plugin look more professional (IMHO the current table based rendering is quite ugly), and it seems to me that we are not using the JS calendar to its fullest potential. The utility has all the tools (see demo) to be able to highlight specific dates (e.g. days that have appointments) and upon clicking a date show additional information in a separate div.

The way this can be used is to display a flat calendar with the focus on the current date, and the associated appointments somewhere (e.g. right below the calendar). Then the user can click on other dates to see what's coming up.

All that is missing is a way to convert the calendar items into a JS data-structure that can be passed to the JScalendar.

Any thoughts?

-- PankajPant - 23 Jan 2006

I tried out the 1.018 with Dakar but all the descitions are empty (also the day). Only the days witout a description are seen. Now i go back 1.017 and all seems to be well.

-- GuentherFischer - 04 Feb 2006

To the Plugin maintainer: HandlingCairoDakarPluginDifferences has some tips to keep Plugins compatible with Cairo and Dakar codebase.

-- PeterThoeny - 08 Feb 2006

Our users have asked if will be possible with a later version of this plugin, to click on a date and make an entry rather than adding a line manually to a list of entries.

-- PeterJones - 08 Feb 2006

I've been promising an update to the plugin and finally did so today. I tried to clean up the documentation to describe what the plugin actually does; there have been several comments in the past that it doesn't seem to behave the way the documentation says it does.

MartinCleaver: Regarding a specification of "L Fri" to get the last Friday of every month. That isn't within the specification of monthly repeating events, but I don't see why it couldn't be. I'll look into that.

PankajPant: Interesting idea on using JSCalendar. I've thought about it a little, but haven't settled in my mind how to go about it. Do you have a prototype implementation?

GuentherFischer: I'm not sure why you are seeing blank descriptions. If this version does not clear up the problem, perhaps you could post a short example of that shows the problem. I've run this version on both Cairo and Dakar (4.0.0 & 4.0.1) and it seems to work on all of them.

PeterJones: I've briefly thought about doing some sort of CommentPlugin approach to entering dates. If you do something along that line (or some other approach), please share it here.

-- DavidBright - 08 Feb 2006

David, thanks for fixing the Plugin and publishing the new version. The version info looks incorrect. Shouldn't that be 1.024 since it is Cairo compatible?

-- PeterThoeny - 09 Feb 2006

1.024? I just incremented the version number from the previous. Is there some scheme to the version numbers for indicating TWiki version compatibility? If so, I missed it. I'm happy to change something if it needs it; just let me know.

-- DavidBright - 09 Feb 2006

There is a note on the CalendarPlugin page that the plugin does not honor topic permissions. Can anyone think of any reason not to do so? It would seem to be a fairly trivial modification.

-- DavidBright - 09 Feb 2006

David, the JS calendar can take an onSelect() function. For instance, on the demo page, this is defined as:

function flatSelected(cal, date) {
  var el = document.getElementById("preview");
  el.innerHTML = date;
}

What this does is show the selected date in the "preview" area (below the flat calendar). All CalendarPlugin needs to do is to generate this function on the fly, based on the event information. It will need to be restricted to a certain duration (e.g. the current month or current-1 to current+1 month) to prevent recurring events from making this an infinite list. Then let the JS calendar do the rest.

-- PankajPant - 09 Feb 2006

TWiki Dependency: $TWiki::Plugins::VERSION 1.1 indicates that this Plugin requires Dakar. If you set this to $TWiki::Plugins::VERSION 1.024 it indicates that this Plugin also works for Cairo.

-- PeterThoeny - 09 Feb 2006

Ah, the Plugins version! OK, I've changed that in svn and I'll update the topic soon. Actually, looks like the plugin can support the Plugins API back to at least 1.010, so that's what I'll put as the dependency.

-- DavidBright - 09 Feb 2006

I've implemented the suggestion by MartinCleaver to allow a monthly repeat to specify "last x of the month" where x is a day name. The new version has been posted on CalendarPlugin.

-- DavidBright - 11 Feb 2006

Hm, I'm wondering how difficult it would be to design a form (and implement it for example as template for the CommentPlugin) that allows an even more user friendly adding of events for this plugin.

recurrent_events.gif recurrent_events_web.gif

As can be seen above this can't be that difficult, as even M$ can do this. wink I'm pretty sure we could do this more KISS-like.

-- FranzJosefSilli - 11 Feb 2006

Aren't there any standards (XML or something) out there for easier exchange between different event management systems? Why not support (at least) one format (e.g. iCal) for import/export purposes?

-- FranzJosefSilli - 11 Feb 2006

David, maybe you should add an intuitive example for the formatting of a multi-day event and the new multi-months per line feature.

BTW: What happened to the multi-time-events per day enhancement, proposed by BradDixon? He even had implemented a script that triggered local alarms based on events in a wiki calendar (see patches attached below).

-- FranzJosefSilli - 11 Feb 2006

TWiki:Plugins.CommentPlugin example - an early draft of something I'm messing around with. In your TWiki.CommentsTmpl (or better, the suggested UserTemplates topic so it doesn't get overwritten):

%TMPL:DEF{PROMPT:calendar}%
<hr width="60%"/> Date: <input %DISABLED% type="text" size="12" name="comment_date" value="01 Jan 2006" /> Event: <input %DISABLED% type="text" size="40" name="comment_text" value="Enter event description here." /> <input %DISABLED% type="submit" value="%button|Add%" />   event <hr width="90%"/>
%TMPL:END%
and then
%TMPL:DEF{OUTPUT:calendar}%
%POS:BEFORE%   * %URLPARAM{"comment_date"}% - %URLPARAM{"comment_text" }%
%TMPL:END%
Then put %COMMENT{type="calendar"}% wherever and it appends calendar lines. This isn't very flash at the moment, would be nice to use date-picker etc.

-- MarcusLeonard - 18 Feb 2006

Check out CalendarPluginFormTest for an example form (modeled on Outlook's appt. form) for creating events. Note that this is currently not functional, as it needs to be converted into a comment template. However, the form itself is more or less complete.

Marcus, sorry if this duplicates your effort.

-- PankajPant - 23 Feb 2006

The multidayformat didn't work properly for me when used in a list showing the next x days - middle-unseen and last-unseen would not be properly used. This is because CalendarPlugin.pm first collects all events for the current month (i.e., starting at day 1), and only later decides what to display. If an event already started , say, on the 5th of this month, the seen variable would thus claim it had been seen, even though my list started today, say, on the 8th.

My attached CalendarPlugin.pm.diff fixes this by starting the event collection on listStartDay if there is such a thing defined, or on the 1st if not. Works for me!

-- MarcLangheinrich - 06 Mar 2006

Thanks, Marc! I've incorporated the patch into SVN 9113 (see Item1794) and uploaded the new version to CalendarPlugin.

-- DavidBright - 06 Mar 2006

This topic is getting way to long. Some older content should be moved to CalendarPluginDevArchive (with attachments.)

-- PeterThoeny - 22 Mar 2006

Yet another Web Calendar, now by Google.

-- FranzJosefSilli - 13 Apr 2006

Hi, there is a nice weekly timetable view now that works with all CalendarPlugin event types: TWiki:Plugins.TimeTablePlugin.

-- DanielRohde - 24 May 2006

I wonder if the nice form in CalendarPluginFormTest was actually finished and/or made into a CommentPlugin template?

-- JosMaccabiani - 14 Jun 2006

Nope. I've been too busy recently to be able to work on this. Please feel welcome to adopt it.

-- PankajPant - 15 Jun 2006

I'd like to be able to hide weekends.

-- DenisHowe - 23 Jun 2006

From the comments it seems a safe bet that this works on 4.0.3, but I was wondering (and not just for this plugin) if there could be clearer communication about what TWiki version a plugin works on/has been tested on?

A low TWiki::Plugins::Version number doesn't mean much to most people and it doesn't mean that its been kept upto date like this plugin.

Thanks,

-- EricHanson - 28 Jun 2006

Each Plugin package has a TestedOnTWiki form field. The CalendarPlugin is developed in SVN and should work also on 4.0.x releases (code has $RELEASE = 'Dakar';). I added the 4.0.0 value accordingly to the form field.

FYI, the PluginPackage topic has links to "Plugins tested against [version]" topics, where you can see the list of Plugins that work on a particular TWiki version.

-- PeterThoeny - 28 Jun 2006

Thanks Peter. Seems like it might be nice to have the latest stable version listed with each TWiki though. I know from personal experience that not every TWiki installation will upgrade right away (including twiki.org) or perhaps not at all even.

-- EricHanson - 08 Aug 2006

Jos - Check out CalendarPluginAddEventCommentPluginTemplate. I made the CalendarPluginFormTest into a CommentPlugin template. Also expanded functionality a bit.

-- CynthiaManuel - 10 Aug 2006

Have a look at UserCommentsTemplate#Add_Calendar_Event? for a live sample of CynthiaManuels work (thanks for that) here on TWiki.org.

-- FranzJosefSilli - 10 Aug 2006

BUG REPORT: When using months="2" or more, headercolor="" attribute only applies to the first month, other months still have default headercolor

-- NikolaiSvakhine - 23 Aug 2006

Hi Cynthia! I somehow missed your template before, but thanks! Great work and very useful. I'll implement this straight away.

-- JosMaccabiani - 25 Aug 2006

Hmmm... The demo URL works perfect, however on my installation clicking the date fields does not show ('pop up') the JSCalendar. I've confirmed that JSCalendarContrib, ToolTipPlugin, CommentPlugin and CalendarPlugin all work.

There's a javascript error (in IE6) that says: "Line 452 - Calendar is undefined". Any ideas what's going wrong? Thanks

-- JosMaccabiani - 25 Aug 2006

It would be nice if the calendar could show some buttons with which the displayed month can be manipulated. I.e.: you click >> and august will be september.

-- JosMaccabiani - 27 Aug 2006

The calendar itself cannot do that, because it isn't a capability of the underlying perl module. However, you can add some text to the topic which calls %CALENDAR% to give that capability. It is surprisingly ugly (at least my version is --- maybe someone can come up with something better). First, there is code to figure out the current month and the previous/next month:

<!-- Skip the space left by these calculations
Get the month and year specified in the URL, if any

%CALC{"$SET(month, %URLPARAM{"month"}%)"}%
%CALC{"$SET(year, %URLPARAM{"year"}%)"}%

If the month and/or year is unspecified (blank), then we set it to the current month/year.
The month calculation is nasty. Because FORMATTIME will return a leading zero on a month less than
10, EVAL will see an "octal" number like 08 (August) or 09 (September). These are, of course, invalid
octal numbers. So, we prepend a 1 to the GET, effectively adding 100 to any month number. To counteract
this, we add an initial -100 to get the actual month number. Gad.

%CALC{"$IF($EXACT($GET(month),), $SET(month, $EVAL(-100+1$FORMATTIME($TIME(), $month))),)"}%
%CALC{"$IF($EXACT($GET(year),), $SET(year, $FORMATTIME($TIME(), $year)),)"}%

Set up the month and year for the previous and next month.

%CALC{"$IF($GET(month) == 1, $SET(pmonth, 12),$SET(pmonth, $EVAL($GET(month)-1)))"}%
%CALC{"$IF($GET(month) == 1, $SET(pyear, $EVAL($GET(year)-1)), $SET(pyear, $GET(year)))"}%
%CALC{"$IF($GET(month) == 12, $SET(nmonth, 1), $SET(nmonth, $EVAL($GET(month)+1)))"}%
%CALC{"$IF($GET(month) == 12, $SET(nyear, $EVAL($GET(year)+1)), $SET(nyear, $GET(year)))"}%
-->

Then, there is the actual code to go to the previous/next month:

<!-- Go to previous month: -->
<a href="%TOPICURL%?month=%CALC{"$GET(pmonth)"}%&year=%CALC{"$GET(pyear)"}%"> &lt;&lt; previous month</a>

<!-- Go to next month: -->
<a href="%TOPICURL%?month=%CALC{"$GET(nmonth)"}%&year=%CALC{"$GET(nyear)"}%"> next month &gt;&gt;</a>

-- DavidBright - 28 Aug 2006

I know this is an odd request but is there a way to show what time (hh:mm) the calendar plugin thinks it is?

I am on TWiki4 and have an issue where the TWiki is setup to user servertime, but the Calendar plugin seems to stil be on gmt. From my impression of the plugin, I thought it would use servertime if that was specified. Do I need to use GMTOFFSET or could there be some other issue I am overlooking?

Thanks for any pointers.

-- EricHanson - 22 Sep 2006

Too bad it only reads bulleted lists, because the EditTablePlugin would make such a cool tool for maintaining the events in the calendar. Something like this:

%TABLE{sort="on"}%%EDITTABLE{ header = "|*date*|*comment*|" format="|date,20,,%d %b %Y|text,30|" }%
|*date*|*comment*|
| 05 Oct 2006 | Ballot recount |

Wouldn't that be cool. wink Here's the change to do it:

6a7
> # Copyright (c) 2006 Fred Morris, m3047@inwa.net
443c444
<       }
---
>       }
559c560,577
<       my @bullets = grep { /^\s+\*/ } split( /[\n\r]+/, $text );
---
>       # Allow for tables, by converting them to bullets. FWM, 03-Oct-2006
>
>       my @bullets;
>       foreach my $bullet (grep { /^(:?\s+\*.+|\s*(?:\|.+?){2,}\|\s*)$/ } split( /[\n\r]+/, $text )) {
>           if ($bullet =~ m/^\s*\|(.*)\|\s*$/) {
>               $bullet = $1;
>               my @event_fields;
>               foreach my $field (split /\|/,$bullet) {
>                     $field =~ s/^\s+//o;
>                     $field =~ s/\s+$//o;
>                     push @event_fields, $field;
>               }
>               my $event_date = join ' ', @event_fields[0..(@event_fields-2)];
>               my $event_comment = $event_fields[@event_fields-1];
>               $bullet = "   * $event_date - $event_comment";
>             }
>           push @bullets, $bullet;
>       }

Cheers!

-- FredMorris - 04 Oct 2006

That's great. Since EditTablePlugin is included in the standard twiki distro, what do folks think about making this change permanent for the CalendarPlugin ?

A couple of issues that may be worth working around :

  • The change would create a backwards compatability problem for those who already have large calendars using bullets, but tables are just so much nicer.
    • Is there a way to ask CalendarPlugin to accept both bullets and tables ?

-- KeithHelfrich - 04 Oct 2006

Hm, wouldn't it be more nice if PreferencesPlugin could be generalised to allow for easier editing of lists (not preference settings only)?! And it's pretty easy to write a search that kind of converts a table into a list that can be used by the CalendarPlugin (see CalendarTable).

-- FranzJosefSilli - 04 Oct 2006

That code is backwards compatible: it converts tables into the bulleted syntax which is expected.

In a nutshell what it does is:

  1. IF it sees a table.
  2. Split it into columns.
  3. Concatenate all but the last column, separated by spaces as the date.
  4. The last column is considered the comment.
  5. Create a new "bullet" record which is the expected bullet + date + - + the last column.

This means that not only does the %EDITTABLE{...} sample code work, but anything which renders columns which can be concatenated and rendered as a date will work: separate columns for the date, month and year would work. Maybe somebody will figure out how to do date ranges.

-- FredMorris - 05 Oct 2006

Here is my enhanced version of CalendarPlugin:

calendarplugin-fwm-061006.tgz

-- FredMorris - 06 Oct 2006

It appears that if I use custom day names:

     daynames="M|T|W|R|F|S|S|"
the results are no longer centered in the header cells (and there is no control for header cell alignment)

  %CALENDAR{headercolor="#9933FF" weekendheadercolor="#9933FF" weekendcontentcolor="#FFFFFF" weekendcolor="#CC66FF" todaycolor="#FFFFCC" daynames="M|T|W|R|F|S|S|" showweekdayheaders="1" headercontentcolor="#FFFFFF" weekendheadercontentcolor="#CCCCCC"}%
calplugin_snap.jpg

-- VickiBrown - 11 Oct 2006

Here's how I got CalendarPluginAddEventCommentPluginTemplate to work on my site without introducing anything into the skin or view templates. I added the following to the definition of the PROMPT:AddCalendarEvent template:

<LINK TYPE="text/css" rel="stylesheet" href="%PUBURL%/%TWIKIWEB%/JSCalendarContrib/calendar-system.css" />
<style>.calendar {z-index:2000;}</style>
<script type="text/javascript" src="%PUBURL%/%TWIKIWEB%/JSCalendarContrib/calendar.js"></script>
<script type="text/javascript" src="%PUBURL%/%TWIKIWEB%/JSCalendarContrib/lang/calendar-en.js"></script>
<script type="text/javascript" src="%PUBURL%/%TWIKIWEB%/JSCalendarContrib/calendar-setup.js"></script>

-- DiabJerius - 15 Oct 2006

The documentation implies that

header="$m $y"
will provide a header of the current month and year. It doesn't; it just outputs the string $m $y. HTML::CalendarMonthSimple just dumps out what it's given for the header parameter. It doesn't perform any special interpolation.

-- DiabJerius - 15 Oct 2006

I was wondering, if it is possible to produce a "mini-calendar" using current possibilities? Typical use would be left or right bar in a WebHome.

  • Mini-calendars for saving screen estate:
    mini-calendar.png

I.e. instead of presenting a topic line for each entry, just emphasize and link dates that have >= entries?

-- SteffenPoulsen - 15 Oct 2006

I moved Igor's support question to CalendarPluginOn64BitMachine.

-- PeterThoeny - 21 Oct 2006

I wanted to be able to tell the plugin that when it's listing events instead of putting them in a calendar (i.e., aslist is 1), it should list a maximum of 7 days worth of events, to limit the amount of space taken up by events in my sidebar. I implemented this in maxlistdays.diff, attached.

I noticed while doing that that when aslist is 1, then plugin sometimes does a bit more work than it should, so I fixed that as well; the fix should be obvious from the diff.

Thanks for all your work on this plugin and on tWiki!

-- JonathanKamens - 03 Nov 2006

Concerning DavidBright's comment on August 28, I came up with what seems to be a simpler way to allow "<< Previous Month" and "Next Month >>" links on a calendar page. The problem is simplified by using relative months instead of an absolute month and year. I assume that if there's a "month" parameter to the URL, it contains a negative number to go back that number of months or a positive number to go forward. Here's the code to support that:

<!--
   %CALC{"$SET(monthval, %URLPARAM{"month"}%)"}%
   %CALC{"$IF($EXACT($GET(monthval),), $SET(monthval, 0))"}%
   %CALC{"$IF($GET(monthval)>-1,$SET(prefix,+))"}%
   %CALC{"$SET(lastmonth,$EVAL($GET(monthval)-1))"}%
   %CALC{"$SET(nextmonth,$EVAL($GET(monthval)+1))"}%
-->

And then the links:

<table>
<tr><td><a href="%TOPICURL%?month=%CALC{"$GET(lastmonth)"}%">&lt;&lt; Previous month</a></td>
<td align="right"><a href="%TOPICURL%?month=%CALC{"$GET(nextmonth)"}%">Next month &gt; &gt;</a></td></tr>
<tr><td colspan="2">%CALENDAR{showweekdayheaders="1" topic="..." month="%CALC{"$GET(prefix)"}%%CALC{"$GET(monthval)"}%" width="100%"}%</td></tr>
</table>

-- JonathanKamens - 03 Nov 2006

I was wondering if anyone could verify the following:

It seems that the set gmtoffset on the CalendarPlugin page does not behave as expected (at least not how I thought it would work). I was under the impression that if I changed the code:

  • Set GMTOFFSET = -5
That all calendars on my TWiki install would be offset by 5 hours. After experimenting I see that is not the case. Is there a point to setting the gmtoffset then?

Thanks In Advance.

-- EricHanson - 10 Nov 2006

We would like to have a monthly calendar that alphabetically sorts events (based on description). Any suggestions or ideas would be greatly appreciated.

Many thanks.

-- DevinBougie - 13 Nov 2006

Devin, try to generate the event list via an accordingly sorted formated search. See CalendarEvent for an example that used to work and still should work, or the latest CalendarPlugin version is pretty useless. Still haven't tested the latest version yet, sorry.

-- FranzJosefSilli - 13 Nov 2006

I have quickly implemented support for ISO-8601 dates (2006-11-13), which have the advantage to be multilingual, and not ambiguous. This patch does not add support for intervals, just plain dates. This patch is published as GPL.

-- MarcSCHAEFER - 23 Nov 2006

Thanks Marc, I think it is important that this plugin understands also ISO dates.

-- PeterThoeny - 26 Nov 2006

Thanks for the suggestion, Franz. Unfortunately that doesn't quite work for us, as the CalendarPlugin doesn't necessarily display entries in the order that they're listed. For example, multi-day events take precedence over single-day events.

-- DevinBougie - 27 Nov 2006

I haven't been satisfied with the feature to show a relative month "+mm" or "-mm" from the current month. It gives unreliable results at the end of the month. For example, right now is near the end of the last day of November. Using JonathanKamens's code sample above, the calendar actually shows the month of December. The bug is in the CalendarPlugin, not in the sample code.

I work around this by calculating the relative month explicitly. I wanted to have a calendar with buttons for the next month and next year, just like JosMaccabiani. I also wanted something that I thought was pretty. This is the (verbose) code that I use:

<div style="width: 90%">
<!--
%CALC{"$SET(curtime, $IF($LENGTH(%URLPARAM{"year"}%) == 0, $TIME(), $TIME(%URLPARAM{"year"}%-%URLPARAM{"month"}%-01)))"}% %CALC{"$SET(curyear, $VALUE($FORMATTIME($GET(curtime), $year)))"}% %CALC{"$SET(prevyear, $EVAL($GET(curyear) - 1))"}% %CALC{"$SET(nextyear, $EVAL($GET(curyear) + 1))"}% %CALC{"$SET(curmonth, $VALUE($FORMATTIME($GET(curtime), $month)))"}% %CALC{"$SET(curmonthminusone, $EVAL($GET(curmonth) - 1))"}% %CALC{"$SET(curmonthplusone, $EVAL($GET(curmonth) + 1))"}% %CALC{"$SET(prevmonthtime, $IF($GET(curmonthminusone) == 0, $TIME($GET(prevyear)-12-01), $TIME($GET(curyear)-$GET(curmonthminusone)-01)))"}% %CALC{"$SET(nextmonthtime, $IF($GET(curmonthplusone) == 13, $TIME($GET(nextyear)-01-01), $TIME($GET(curyear)-$GET(curmonthplusone)-01)))"}%
   * Set CURYEAR = %CALC{"$GET(curyear)"}%
   * Set PREVYEAR = %CALC{"$GET(prevyear)"}%
   * Set NEXTYEAR = %CALC{"$GET(nextyear)"}%
   * Set CURMONTH = %CALC{"$GET(curmonth)"}%
   * Set PREVMONTH = %CALC{"$VALUE($FORMATTIME($GET(prevmonthtime), $month))"}%
   * Set PREVMONTHYEAR = %CALC{"$VALUE($FORMATTIME($GET(prevmonthtime), $year))"}%
   * Set PREVMONTHNAME = %CALC{"$FORMATTIME($GET(prevmonthtime), $mon)"}%
   * Set NEXTMONTH = %CALC{"$VALUE($FORMATTIME($GET(nextmonthtime), $month))"}%
   * Set NEXTMONTHYEAR = %CALC{"$VALUE($FORMATTIME($GET(nextmonthtime), $year))"}%
   * Set NEXTMONTHNAME = %CALC{"$FORMATTIME($GET(nextmonthtime), $mon)"}%
-->
  <div style="float: left;">
    <div style="float: left; padding: 1em 1.5em;">
      [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?year=%PREVYEAR%&month=%CURMONTH%][%ICON{"go_fb"}% %PREVYEAR%]]
    </div>
    <div style="float: left; padding: 1em 1.5em;">
      [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?year=%PREVMONTHYEAR%&month=%PREVMONTH%][%ICON{"go_back"}% %PREVMONTHNAME%]]
    </div>
  </div>
  <div style="float: right;">
    <div style="float: left; padding: 1em 1.5em;">
      [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?year=%NEXTMONTHYEAR%&month=%NEXTMONTH%][%NEXTMONTHNAME% %ICON{"go_forward"}%]]</span>
    </div>
    <div style="float: left; padding: 1em 1.5em;">
      [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?year=%NEXTYEAR%&month=%CURMONTH%][%NEXTYEAR% %ICON{"go_ff"}%]]</span>
    </div>
  </div>
  <div style="text-align: center; padding: 1em 1.5em;">
    [[%TOPIC%][Today]]
  </div>
  <div style="clear: both; width: 100%;">
%CALENDAR{topic="..." width="100%" cellheight="100" vcellalignment="top" showweekdayheaders="1" year="%CURYEAR%" month="%CURMONTH%"}%
  </div>
</div>

-- ChadParry - 01 Dec 2006

The error might be related to local server time vs GMT.

-- PeterThoeny - 01 Dec 2006

The server is in PST. The $TIME and $FORMATTIME spreadsheet variables returned the correct local time. But maybe the CalendarPlugin is set to use UTC.

BTW, I noticed that the $TIMEADD function often produced the wrong month also. The documentation warns that months are estimated, though, so that's fine. I guess that's a little background on why I stopped trusting the built-in date functions and implemented my own calendar arithmetic.

-- ChadParry - 04 Dec 2006

Thanks Chad and Diab for your valuable solutions! The Plugin & data entry work wonderfully now!

-- JosMaccabiani - 10 Jan 2007

Using CalendarPlugin and the AddEvent Comment template, when I insert an event and insert a blank line in the details, stuff goes wrong:

   * 11 Jan 2007 - 5:27 pm Test %TOOLTIP{TEXT="testerdetest testerdaeastt" TITLE="Test" STICKY="true" WIDTH="200" ABOVE="true"}% ...more %TOOLTIP{END}%
   * 12 Jan 2007 -  test 2 %TOOLTIP{TEXT="test test
<br //>;
<br //>;regel twee" TITLE="test 2" STICKY="true" WIDTH="200" ABOVE="true"}% ...more %TOOLTIP{END}%

Also, should this work? (because it doesn't, the end date for the recurring event is interpreted as the description)

   * 2 Sun Jan - 29 Jan 2009 -  test %TOOLTIP{TEXT="test regel bla bla bla" TITLE="test" STICKY="true" WIDTH="200" ABOVE="true"}% ...more %TOOLTIP{END}%
%COMMENT{type="AddCalendarEvent"}%

-- JosMaccabiani - 10 Jan 2007

I wrote a conversion-program from the standard ical-format to this TWiki-format. Presently it runs outside TWiki by cron, takes a local calendar-file or a remote calendar url and dumps the converted data directly to a TWiki-topic-file. Works like a charm.

  1. If anybody is interested in getting the program --- take a look at the attached file: Calendar.pl.txt: KlausFueller? 's conversion script CAL->CalendarPlugin

  1. I suppose it would be better to integrate the code into this CalendarPlugin -Module. One could simply add attributes like ics="filename" and webcal="url" and you could get a calendar directly out of the ical-data

I need some help to integrate the code into the plugin (or someone else could do it for me). I am somewhat able to hack some Perl-code but I never touched the TWiki-API.

-- KlausFueller - 26 Jan 2007

cool! now we're getting somewhere cool! !!

-- KeithHelfrich - 27 Jan 2007

I wonder if a fancy MashUp with the MailInContrib could allow for us to "invite" a favorite TWiki calendar to a meeting from MS Outlook ? The most potential power in TWiki that is yet to be unlocked, to me, is the MashUp of plugins to cover the middle ground that is shared between them.

-- KeithHelfrich - 28 Jan 2007

I tried MailReminderPlugin for email notification of calendar events but its not showing events under dates please advice

-- AnandSamuel - 15 Mar 2007

The link to

http://web.mac.com/klaus.fueller/Calendar.pl.txt
appears to be down (account inactive). Is anyone able to attach the script here?

-- ScottHoge - 19 Apr 2007

I cancelled my Dot-Mac-account. I've attached the file under Calendar.pl.txt.

-- KlausFueller - 07 May 2007

Has anyone installed this plugin on a Mac? I cannot get the CPAN lib recognized (not in @INC error). On Redhat I didn't have any problem.

-- ArthurClemens - 18 May 2007

See ZimbraPluginDev on idea of integrating the Zimbra calendar with TWiki.

-- PeterThoeny - 18 May 2007

I have combined CalendarPlugin and TimeTablePlugin to produce a combination monthly/weekly calendar. I also incorporated CalendarPluginAddEventCommentPluginTemplate (with some modifications). I've posted my notes on this setup in HowToIntegrateWeekAndMonthCalendar.

-- LynnwoodBrown - 08 Jun 2007

I would love to be able to set the weekend column widths to be a LOT narrower than weekays.. for doing calendars for work.

-- VickiBrown - 08 Jun 2007

It's been a while since I suggested the posibility of using CalendarPlugin with JSCalendarContrib (see comments from 23 Jan 2006) to create a better display of events, especially for heavily populated calendars.

I've finally managed to get some time to play with this. See Sandbox.CalendarPluginWithJSCalendarContrib for a basic prototype. Very little needs to be done in the plugin to make this work. See source for the code.

This would also address the "mini-calendar" request by SteffenPoulsen (on 15 Oct 2006).

-- PankajPant - 11 Jun 2007

I tried to use another plugin inside the date bullet list for Calendar Plugin

*  26 Jul 2007 - %Bug{1388984}%
it evaluated in the bullet list but not in the calendar. Is this a known limitation or did I miss some sneaky bit of syntactic syrup?

if it matters, the bullet list is in another table. Using InterwWiki plugin syntax solved the problem, although not as artistically.

-- VickiBrown - 07 Aug 2007

Perhaps you need to set the plugin order in configure? It might not work if they use different processing stages.

-- JustinLove - 08 Aug 2007

Our folks have rules about stuff happening on the Nth working day of the month. I've attached a patch to support this - it doesn't allow for holidays but works ok otherwise. Rules are of the form

   * W nn - Event description
where nn is the number of working days from the start of the month.

-- MartinRothbaum - 28 Nov 2007

Thanks Martin. This is tracked in TWikibug:Item5058

-- PeterThoeny - 02 Dec 2007

Looks like this plugin needs a bit more of TLC.

-- ArthurClemens - 14 Dec 2007

Arthur is right, TLC is needed for this plugin. Compare it with the Confluence Calendar+Plugin, especially the section about iCalShare. We don't have iCal support yet, do we?

-- FranzJosefGigler - 18 Dec 2007

Someone above has written an ical exporter. There are more gems on this page waiting to get implemented (or rejected).

-- ArthurClemens - 18 Dec 2007

Hi community. Is somebody able and interested in adding another calendar attribute? I’m looking for a relative day switch, similar to year="+yy" or "-yy". thanks for feedback.

-- ThomasEsau - 03 Jan 2008

I installed this plugin in TWiki 4.2. After installation, I got

Could not perform search. Error was: /bin/grep -F -i -l -H -- %TOKEN|U% %FILES|F% Grep for 'AdminToolsCategory' returned error

in the "All Admin Tools Category topics" section on TWiki/AdminToolsCategory.

The error disappeared after I deleted data/TWiki/CalendarPlugin.txt

-- ThYang - 31 Jan 2008

Besides, I got error on InstalledPlugins? page. CalendarPlugin is currently incompatible with TWiki 4.2.

TWiki::Plugins::CalendarPlugin could not be loaded. Errors were: Can't locate TWiki/Plugins/CalendarPlugin.pm in @INC (@INC contains: /home/www/twiki4/lib . ... deleted ...) at (eval 39) line 1. BEGIN failed--compilation aborted at (eval 39) line 1.

-- ThYang - 31 Jan 2008

Has anyone considered making Calendar Plugin support the ability to pull events from part of a topic. e.g. Calendar Sections ala INCLUDE sections?

-- VickiBrown - 06 Feb 2008

ThYang... I just ran a quick install of CalendarPlugin on 4.2 and don't see any of the errors you report. I suspect that there might be something else going on with your system. CalendarPlugin is working fine here.

-- GeorgeClark - 11 Feb 2008

Can I please ask, what are the security implications of not observing page permissions?

How would that compromise my wiki, how easy would it be to add permission functionality, and how much of a call is there for it? If it's not too hard, I wouldn't mind taking it on myself to explore the possibility of incorporating it, but only if there is demand.

-- ChrisCauser - 04 Apr 2008

@ ThYang:

Your permissions on the CalendarPlugin.pm file are incorrect. chown and chmod should sort it out for you wink

-- ChrisCauser - 09 Apr 2008

I just installed the newest version of CalendarPlugin, and relative years are no longer working. With just %CALENDAR{year="+yy"}%, I get "invalid year syntax"

Actually using "year=" anything gives me invalid year syntax.

-- MichelleHedstrom - 11 Apr 2008

I've hacked this plugin so that it now observes file permissions. Does anyone want it? I've attached the patch file.

-- ChrisCauser - 18 Apr 2008

Michelle: Oops, that isnot good. I hope someone will find time to investigate and merge the lost functionality soon.

Chris: In your patch you basically removed the page access check. Although it violates the permissions, in this case I do not see a big issue since "only" calendar event dates and descriptions get exposed. Possibly make the ignore access check configurable?

-- PeterThoeny - 19 Apr 2008

Sorry Peter, can you please clarify - What have I removed? I thought I hadn't made the plugin any less usable, and only made it slightly more secure for the security concious wink

-- ChrisCauser - 20 Apr 2008

Ah, sorry Chris, I was confused because the patch is backwards, minuses indicating stuff you added. So, reading your patch backwards you are adding more security, not less as I assumed. smile

-- PeterThoeny - 20 Apr 2008

You can tell I'm new to this programming game when I can't even write a proper patch! I'll write a new one and post it up later.

-- ChrisCauser - 20 Apr 2008

The patch has been updated...

-- ChrisCauser - 21 Apr 2008

@Michelle: Sorry to seem patronizing, but are you actually putting in year="+yy" rather than eg. year="+01"?

It seems to work OK for me.

-- ChrisCauser - 21 Apr 2008

Dear friends: iCal is here! I finally took the time to implement a very simple iCalendar "bridge" that works great for certain situations. With this "trick", you can actually map TWiki dates, calendars, etc. into your favourite iCal client (iCal, Evolution, Lightning). It even works through https and applies all normal TWiki access control since it is just like viewing a topic!

See all the details at LuziSchucan

Any help on improving the "trick" or even incorporating it into the Calendar Plugin will be greatly appreciated! wink

-- LuziSchucan - 27 Apr 2008

I got this pointer for a potential input selector for events: http://stephencelis.com/projects/timeframe

Alternative could be a custom JSCalendarContrib / CommentPlugin combo that shows a date picker and adds a bullet in the CalendarPlugin format upon submit. (For inspiration see the "Add new action item" form at Sandbox.EditActionItems. The form submit there creates a table row, but you get the idea.)

-- PeterThoeny - 28 Apr 2008

I have seen the "range date picker" as well. But I wonder how it copes with ranges extending several months. I could not infer this from the demo.

-- ArthurClemens - 28 Apr 2008

Chris, doing year="+yy" used to work. I'm just reporting for several groups at my company who were doing that, whose calendars broke once we upgraded to the new version. They all were doing year="+yy" and it used to work fine. If it was a bug that wasn't supposed to work previously, that's fine. I'm telling them all to fix their syntax, but like I said, since it used to work I'm reporting it here.

-- MichelleHedstrom - 29 Apr 2008

Help: Just installed latest TWiki (first time). Tried to use the configure script to add extensions, but it's horked for some reason (gotta check support) So, I downloaded Calendar plugin -- unpacked and placed all the files in their respective directories. Loaded the install .pl script at the top level /twiki and made sure that the permissions are all set correctly. When I ran "sudo perl CalendarPlugin_installer.pl " I get the following error:

Can't locate object method "findUser" via package "TWiki::Users" at CalendarPlugin_installer.pl line 563, <STDIN> line 1.

All of the dependencies check out, too.

-- RedByer - 06 May 2008

 
Topic attachments
I Attachment Action Size Date Who Comment
txttxt Calendar.pl.txt manage 2.0 K 07 May 2007 - 08:18 KlausFueller KlausFueller? 's conversion script CAL->CalendarPlugin
elsepatch CalendarPlugin.patch manage 1.4 K 21 Apr 2008 - 10:28 ChrisCauser Patch for Calendar to observe topic permissions
elsediff CalendarPlugin.pm.diff manage 1.7 K 06 Mar 2006 - 10:31 MarcLangheinrich fix for getting multidayformat to properly work with aslist; incorporated into version 1.020 (SVN 9113)
elsegz calendar-plugin-iso-8601-parser-2006-11-23.patch.gz manage 0.7 K 23 Nov 2006 - 10:02 MarcSCHAEFER Parsing of ISO-8601 dates
ziptgz calendarplugin-fwm-061006.tgz manage 26.4 K 06 Oct 2006 - 22:59 FredMorris Enhanced to read events in tabular format.
jpgjpg calplugin_snap.jpg manage 22.6 K 11 Oct 2006 - 17:37 VickiBrown header cells are not centered
elsediff maxlistdays.diff manage 1.3 K 03 Nov 2006 - 05:04 JonathanKamens Patch to add "maxlistdays" functionality to "aslist"
pngpng mini-calendar.png manage 14.3 K 15 Oct 2006 - 13:10 SteffenPoulsen Mini-calendar for saving screen estate
gifgif recurrent_events.gif manage 7.7 K 11 Feb 2006 - 20:48 FranzJosefSilli  
gifgif recurrent_events_web.gif manage 9.5 K 11 Feb 2006 - 20:57 FranzJosefSilli  
txttxt workingday_of_month.diff.txt manage 2.2 K 28 Nov 2007 - 08:14 MartinRothbaum Patch to allow rule for Nth working day of the month
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r363 < r362 < r361 < r360 < r359 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo