create new tag
, view all tags

HolidaylistPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on HolidaylistPlugin 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 report bugs below

Discussion on the HolidaylistPlugin

This is a very small plugin and relies on the Smilies plugin. It does not rely on the Calendar plugin but uses the same notation in case one wants to use a Calendar as well.

This is my first plugin so I can't promise that its 100% TWiki error free. However, there were actual user requests for such a page so I thought that I would post it as it may be useful for others.

-- PeterJones - 02 Jun 2005

Nifty plugin! I can't get it to work with %CALENDAR%, however. I took your sample date list and added it at the end like this:


   * 02 Jan 2005 - 30 Feb 2005 - Bill
   * 27 Mar 2005 - 20 Apr 2005 - Bob
   * 10 May 2005 - 01 Jun 2005 - Mary

Upon saving the topic I get this error:

This is with Date::Calc v5.4, btw.

-- CharlesOwens - 07 Jun 2005

The plugins work independantly and I only use the %CALENDAR% syntax in case the user wishes to use the same list for a Calendar.

Is the %CALENDAR% plugin installed on your server, and if so perhaps try it independantly of %HOLIDAYLIST%

-- PeterJones - 07 Jun 2005

Thanks Peter for contributing this Plugin to the TWikiCommunity. Interesting selection on the Smilies smile

I did some minor formatting on the Plugin topic, you can take that into the next release if you wish.

How about measuring and documenting the PluginBenchmarks?

-- PeterThoeny - 09 Jun 2005


I found that vacations that START today don't appear properly TODAY.

For example, today is 10 Jun 2005 :

If my vacation is from 09 Jun 2005 to 13 Jun 2005, then the 10th appears correctly as a holiday.
If my vacation is from 10 Jun 2005 to 13 Jun 2005, then the 10th doesn't appear correctly as a holiday.

If I have a single vaction, on today's date, it doesn't appear marked as a holiday.

Does anyone else see thie behaviour ?

Should be a useful plugin, though.

-- SteveJonesST - 11 Jun 2005

Hi, it is a really nice Plugin but the implementation has many bugs and it is quite difficult to extend so I added a new complete reimplemented version of the HolidaylistPlugin to this topic ( http://twiki.org/p/pub/Plugins/HolidaylistPluginDev/HolidaylistPlugin-v20050610.zip).

This version fixes the bug reported by TWiki:Main.SteveJonesST and some other bugs (special characters in names; a name is part of an other name; illegal dates).

-- DanielRohde - 10 Jun 2005

Thanks Daniel for fixing some issues. FYI, this Plugin is labeled as PleaseFeelFreeToModify, e.g. you can package it and update the Plugin on TWiki.org's HolidaylistPlugin topic.

-- PeterThoeny - 12 Jun 2005

Hi! The attached pre-release of the HolidaylistPlugin (v20050613) comes with some rendered options, e.g. you can use smilies like ":-)" in icon options instead of HTML image tags. Some bugs are fixed too (white space bug in names; documentation bugs). If this pre-release is stable enough and I have enough time I package it and update the HolidaylistPlugin topic.

-- DanielRohde - 13 Jun 2005

Sorry, I found a bug in plugin preference handling (preferences was not read from the plugin topic). I attached the fixed version (v20050613A) to this topic.

-- DanielRohde - 13 Jun 2005

I updated the HolidaylistPlugin topic so feel free to download, install and try out the new version attached to the HolidaylistPlugin topic.

-- DanielRohde - 14 Jun 2005

Hi Daniel... I found what was causing making the CalendarPlugin unhappy (comment above 1 week ago). The first line of your sample date list from the HolidaylistPlugin topic references "30 Feb 2005"... Date::Calc just doesn't like unnatural dates it seems. I've fixed it. Thanks.

-- CharlesOwens - 14 Jun 2005

Hi Charles, it is a not really a good idea to change the example date because it was a good test for the HolidaylistPlugin. The better way is to fix the CalendarPlugin (what I do if I get CVS access to twikiplugins on SourceForge.net).

-- DanielRohde - 15 Jun 2005

Agreed that the CalendarPlugin bug (server error with invalid date) needs to be fixed. Not agreed to distribute the HolidaylistPlugin with a setting that crashes a dependent Plugin, because everyone who is installing your Plugin will face this issue.

BTW, if you take over the maintenance of the Plugin feel free to change the modification policy from PleaseFeelFreeToModify to ContactAuthorFirst.

-- PeterThoeny - 15 Jun 2005

Hi Peter, thanks for your comment. You found a documentation bug. The HolidaylistPlugin doesn't depend on the CalendarPlugin. I will fix it soon.

-- DanielRohde - 16 Jun 2005

Hi Daniel. Great work on the Plugin. Last week I had made a change to the original to satisify a new requirement. We have people who are not in work but not on holiday (this usually means that they are at a conference or travelling for work). I used a 4th field to flag this and used the indifferent icon :-|. Example

14 Jun 2005 - 29 Jun 2005 - John - DAC Conf

I want to use your new code and add this new requirement. Please advise on how best to make a change that will not screw up your work.

-- PeterJones - 16 Jun 2005

Hi! I attached the next release to the HolidaylistPlugin topic. The new release has some new features:

  • location support (thanks and sorry TWiki:PeterJones but a user requested a new feature and I could not wait for you).
  • today highlighting (todayfgcolor and todaybgcolor attributes; usefull for startdate)

-- DanielRohde - 16 Jun 2005

Hi again! I'm collecting ideas for the comming up release of HolidaylistPlugin.

For instance the next release will modify alt/title attributes of the smily images to display calendar or location entries as tooltips.

Has anybody other ideas or feature requests for the next release? Thanx in advance.

-- DanielRohde - 16 Jun 2005

Hi Daniel. It's excellent and thanks for implementing the notinwork option.

-- PeterJones - 20 Jun 2005

Hi! A new release is ready for download. I added some new features (headerformat attribute, ...) and made some performance fixes.

-- DanielRohde - 23 Jun 2005

This looks dammed good. Many have asked for exactly this. Before I put it into production - are you going to maintain it to ensure that it will also work in Dakar?

The plugins fails to display nicely of the name of the person is a Wiki name. It is quite normal with Twiki to use something like KennethLavrsen when displaying a name.

My error log got flooded with

<verbatim> Use of uninitialized value in substitution (s///) at /var/www/twikiexp/lib/TWiki/Prefs.pm line 636., referer: http://myhost/twikiexp/bin/edit/Sandbox/HolidaysTest </verbatim>

In my Cairo installation I edited the lib/TWiki/Prefs.pm like this (line 636)

<verbatim> sub formatAsFlag { my( $value ) = @_;

# Kenneth edited here return 0 unless defined( $value );

$value =~ s/^\s*(.*?)\s*$/$1/gi; $value =~ s/off//gi; $value =~ s/no//gi; if( $value ) { return 1; } else { return 0; } } </verbatim>

-- KennethLavrsen - 28 Jun 2005

Hi! A new release is published. Now you can use a TWiki:TWiki.WikiName as person name (I fixed the bug reported by TWiki:Main.KennethLavrsen).

Sorry Kenneth, but I don't have enough time to test against Dakar. Please feel free to test it and report bugs here. By the way your Cairo fix is a TWiki fix not a HolidaylistPlugin fix.

-- DanielRohde - 29 Jun 2005

I did not expect you to test the plugin during the development of Dakar. Not even I have tried the development code. I was just asking if you plan to update this plugin once Dakar gets released probably much later this year? I do not want my users to get dependent on a plugin that does not have a committed maintainer because that will block me from upgrading to Dakar when it arrives.

Thanks for making the quick fix on the plugin. It is really a nice plugin that falls just at a "sweet spot". So many have asked me for a vacation tracking topic on TWiki and your plugin can make this task very easy and very nice.

-- KennethLavrsen - 30 Jun 2005

Hi Kenneth, I've misunderstood you, sorry. Of course I will update this plugin if Dakar gets released.

-- DanielRohde - 30 Jun 2005

Daniel, if your Plugin only uses official function calls it should just work also in Dakar.

-- PeterThoeny - 03 Jul 2005

Peter, I hope I used only official function calls but this plugin should be tested with Dakar anyway.

-- DanielRohde - 05 Jul 2005

Hi! The new published release comes with exception handling and a compatibility mode that supports all TWiki:Plugins.CalendarPlugin event types. Some small performance improvements and minor bug fixes are also included in v1.010,

-- DanielRohde - 05 Jul 2005

Hi again! Please update the HolidaylistPlugin to version v1.011 if you have installed the version v1.010 (5 Jul 2005). I fixed a major bug (compatmode: periodic repeaters) and some minor bugs (compatmode). There are some new features like a parameter check (users are informed by HolidaylistPlugin if unknown parameters are used). Take a look at the Plugin Info section of the HolidaylistPlugin topic for more details.

This version is the last version with new features (for the next time). I will only fix bugs next time (in two weeks I will go on holiday for 4 weeks).

-- DanielRohde - 11 Jul 2005

Happy holidays! wink

-- FranzJosefSilli - 11 Jul 2005

:scull: isn't supported by SmiliesPlugin anymore, it has been replaced by the correct spelling :skull: ( dead! )

-- FranzJosefSilli - 03 Aug 2005

How do I show current month starting from the 1st no matter what date it is?

I have tried this

%HOLIDAYLIST{startdate="01 Jun 2018" month="0"}%

But here in August I do not get 31st of Augist.

-- KennethLavrsen - 05 Aug 2005

Hello Kenneth! The behavior of the HolidaylistPlugin is correct: it displays 30 days starting on your start date and ignores the month attribute ("0" is not a correct month - you mean a month offset like "+0" or "-0"). Just try this to display a complete month:

the complete August:
%HOLIDAYLIST{month="Aug"}% or %HOLIDAYLIST{month="08"}%

or the current month:
%HOLIDAYLIST{month="+0"}% or %HOLIDAYLIST{month="-0"}%

-- DanielRohde - 06 Aug 2005

Hi Daniel, how can I hide the bullet list below the time table?

-- SvenSevke - 23 Aug 2005

Don't HTML comments <!-- and --> work?

-- FranzJosefSilli - 23 Aug 2005

Sure it does. Thanks for the hint, I had not tried that to avoid confusing the Plugin.

-- SvenSevke - 24 Aug 2005

Hi Sven, HTML comments work and you can also put the time table to another topic and use the topic attribute, e.g.

%HOLIDAYLIST{topic="TimeTableTopic" tablecaption="Planned Holidays (data comes from TimeTableTopic"}%

-- DanielRohde - 24 Aug 2005

Nice plugin, very useful and simple to use. I'd like to suggest a feature - public holidays. I tried the attributes {compatmode="1" topic="PublicHolidays2005"} (PublicHolidays2005 being a topic I set up for a CalendarPlugin) but that adds the holidays I have listed as new users in the HolidayList.

Ideally, what I'd like is either to have a new attribute holidaytopic which would read another topic as public holidays, or that an entry could have 'ALL' or something as the name, so that that entry would apply to all users - eg

  • 25 Dec - ALL - Christmas Day

-- IlltudDaniel - 02 Sep 2005

I think that it would be better to enhance the CalendarPlugin with the special functions of the HolidaylistPlugin instead the other way round. wink

-- FranzJosefSilli - 02 Sep 2005

Hi! I published the next release (v1.012):

  • public holiday support (requested by TWiki:Main.IlltudDaniel)
  • documentation fixes and improvements
  • improved alt/title attributes handling in HTML img tags

TWiki:Main.FranzJosefSilli: Sorry, but I think the HolidaylistPlugin should be a separate plugin. There are many reasons why, some of them are implementation details (complete different event highlighting, event types with locations and icon fields ...)

-- DanielRohde - 05 Sep 2005

Note that this plugin does not work at all on Dakar (TWiki 4.0 which will be released round 1st of Feb). I have filed a bug http://develop.twiki.org/~develop/cgi-bin/view/Bugs/Item1440.

Update and good news. Dakar had a bug which prevented this and other plugins from working. The bug has been fixed. I have made a fix also to the plugin topic. The HolidaylistPlugin topic should be updated soon with the release of TWiki 4.0.0 (Dakar). The code is fine. If any updates are done - make sure you get the update checked in to the SVN.

-- KennethLavrsen - 19 Jan 2006

Daniel. This plugin as well as the ChecklistPlugin floods the Apache error logs with more than 20 errors per plugin and only when mod_perl is enabled (for view only). And it happens when you click edit and when you save. No other of the many plugins I have installed does this. See Bugs:Item1596

-- KennethLavrsen - 08 Feb 2006

Hi Kenneth, I cannot reproduce your problem. I tested it with Apache/2.0.54, mod_perl/2.0.0, SuSe Linux 9.3. Please send me your mod_perl configuration and version numbers (e-mail: see TWiki:Main.DanielRohde).

Do you have restarted your Apache after reinstallation of this plugin?

-- DanielRohde - 08 Feb 2006

Excellent! Just what I've been looking for. There's one thing, though: I would consider it very helpful if the table element would allow for a CSS "class" attribute. The reason is that in our standard style sheet we are using some padding in TD and TH which blows the holiday table way too much, and it is virtually impossible to exclude the holiday table from this padding. I'd think one could get enough benefit from a hardwired attribute like e.g. <table class="HolidayPluginTable", ...>= so no new attribute would be required. Should I try to create a patch?

-- HaraldJoerg - 08 Feb 2006

Hi Harald, you find a modified version in SVN: svn co http://svn.twiki.org:8181/svn/twiki/branches/DEVELOP/twikiplugins/HolidaylistPlugin

I used the class name HolidaylistPluginTable.

-- DanielRohde - 08 Feb 2006

Excellent! Many thanks! It is already in place and works as expected smile

-- HaraldJoerg - 08 Feb 2006

Class name HolidaylistPluginTable is a wiki word, and will be expanded to an url. Better use the convention holidaylistPluginTable.

-- ArthurClemens - 08 Feb 2006

The Apache error_log flooding (apache 2.0.55/mod_perl 2.0.2 and selective mod_perl only for view) seems to originate from the statement.

use warnings;

It is probably a good idea to only run with this directive during development and comment it out when you release it.

-- KennethLavrsen - 09 Feb 2006

Hi Kenneth, I removed the statement use warnings; from the release.

Hi Arthur, in fact a attribute in a table tag will not be expanded but I changed the class name to holidaylistPluginTable to follow the convention.

-- DanielRohde - 09 Feb 2006

It's a very helpful plugin to keep track who is when in the office! I just discovered one issue, when trying to embed a page (by INCLDUE) which is using the HolidaylistPlugin, the embedding page fails to render.

Example: Created the page HolidaySmallExample with following code:

%HOLIDAYLIST{startdate="1 Mar 2006"}%    * 18 Mar 2006 - 24 Mar 2006 - Chris 

And want to include this into a new page called HolidaySmallExampleInclude with following code:


HolidaySmallExampleInclude will fail to render (at least on my TWikiRelease04Sep2004). Any Ideas?

-- ChrisHausen - 22 Apr 2006

Hi Chris, thanx for reporting this bug. I've commited a new revision to SVN that fixes this bug.

-- DanielRohde - 24 Apr 2006

Please do not forget to post the new version on twiki.org so that people can find it.

-- PeterThoeny - 24 Apr 2006

Yes, Peter, I do it if the new version is stable enough ;-).

-- DanielRohde - 24 Apr 2006

Daniel, thanks for the awareness on that problem! In order to give you a better view, below you find more detailed information from the Apache-error.log. On my test-installation (Win2k) lots of lines like this appear, even without using INCLUDE

c:\\twiki\\bin\\view: Use of uninitialized value in numeric lt (<) at /twiki/lib/TWiki/UI/View.pm line 118.\n

On our productive server (Suse Linux, 2.6.5-7.244-Kernel) the INCLUDE caused a much more severe problem:

view: Deep recursion on subroutine "TWiki::Plugins::applyHandlers" at /.../twiki/lib/TWiki/Plugins.pm line 822., referer: http://..../TeamInfo?t=200604213917&breaklock=on

Many processes were started, which slowed the server so much down, that it needed to be rebootet. Our Sysadmin didn't like it frown

There might also be an interference with the installed NatSkin which I haven't checked yet in detail. Please let me now, if you need any more details. I like to get it running again, because its a very helpful plugin, perfect for tracking the absence of a widespread team.

-- ChrisHausen - 26 Apr 2006

Chris, I've submitted a fixed version on Monday. I've got the same Perl errors in Apache error log and fixed it. You can check out the fixed version:

svn co http://svn.twiki.org:8181/svn/twiki/branches/TWikiRelease04x00/twikiplugins/HolidaylistPlugin

-- DanielRohde - 27 Apr 2006

... or take a look at the HolidaylistPlugin topic. I 've published the next release.

-- DanielRohde - 27 Apr 2006

Daniel, perfect, it works, thank you very much! I'm completely amazed on how fast and profound the TWiki-community helps!

-- ChrisHausen - 27 Apr 2006

Great plugin! One suggestion, though: If a custom 'away icon' is not one of the smilies but say %ICON{led-red}% there will be no hover box with the entry's details with Opera. (Opera just takes title attributes and no alt attributes.)

The Plugin substitudes title and alt with the entry details if such attributes are existent. But the %ICON% s don't have that (i.e. title attributes). I added the following code to fix it (HolidaylistPlugin.pm near line 967):

# $icon=~s/(<img[^>]+title=")[^">]+("[^>]*>)/$1$location$2/is;
unless ($icon=~s/(<img[^>]+title=")[^">]+("[^>]*>)/$1$location$2/is) {
    $icon=~s/<img /<img title="$location" /is;

The regex is not really bullet proof, but all these image tag processing there is rather sloppy, so I didn't do better.

If one uses custom icons the icon image tags will end up in the hover box (in alt and titel ones) which looks not so nice. So I remove it near line 955:

$location=~s/<!--.*?-->//g; # remove HTML comments
$location=~ s/ - <img[^>]+>//ig; # throw image address away

-- UlfJastrow - 03 Aug 2006

Thanx Ulf. The published release v1.019 fixes this %ICON% bug.

-- DanielRohde - 07 Aug 2006

Hi Daniel! Your plugin is very nice, thank you for it. I have two questions (feature requests smile )
- is it possible to filter lines (users) that do not have entries that fall into the given time span? (e.g. Peter is out 1 Jan, and I do not want to see him during February)
- is it possible to display just one week startting with "Mo"?

-- JanFilipsky - 19 Sep 2006

Hi Jan! You can hide lines if you set the attribute removeatwork to 1 (e.g. %HOLIDAYLIST{removeatwork="1"}%). If you set the attribute days to 7 you see only one week but it is not possible to say "start at Monday" but you can set a startdate that hit this day wink

-- DanielRohde - 20 Sep 2006

Thank you for your quick reply and sorry I didn't notice the option. However, in my opinion, the week="+0" option would be usefull smile

-- JanFilipsky - 21 Sep 2006

done (see HolidaylistPlugin topic). SVN follows later because there is not a Bugs web yet.

-- DanielRohde - 21 Sep 2006

Thank you very much, you are very quick smile

-- JanFilipsky - 21 Sep 2006

Hi Daniel! Great Plugin!

Unfortunately, though, I cannot get icons working with %ICON%.

I used the following:

%HOLIDAYLIST{topic="HolidaysList" pubholidayicon="%ICON{led-red}%"}%

but all I get in the table cells is the text:

<img width=

Any ideas what I'm doing wrong? Do I need to escape the '%'s or something?

We're using 4.0.5 and I downloaded the Plugin 2 days ago.

Actually, can I suggest an enhancement? Perhaps, instead of using an icon for public holidays, it would be good to be able to specify a background colour for a public holiday, much like the weekends.


-- DuncanKinnear - 18 Dec 2006

Reason: The ICON expands before HOLIDAYLIST, so the latter sees this: %HOLIDAYLIST{topic="HolidaysList" pubholidayicon="<img width="16" alt="led-red" ... />"}%, meaning the pubholidayicon parameter stops at the first double quote. You can work around this by creating an image tag using single quotes, or by simply using the image URL, such as %PUBURL%/%TWIKIWEB%/TWikiDocGraphics/led-red.gif, which renders as led-red.gif.

-- PeterThoeny - 18 Dec 2006

Thanks, Peter. That works great.

Now another little request/query. What is the best way to represent half days off?

I thought about creating little half_am and half_pm icons, but it means you have to put the person in as if they are not at the office (i.e. with a location). I'm not sure how you would represent it in the CalendarPlugin syntax.

Any ideas would be greatly appreciated.


-- DuncanKinnear - 19 Dec 2006

Hi Duncan, I have some ideas to represent half day off events:

  1. fill the icon field of an event (e.g: * 8 Jan 2007 - Eve - half day away - %ICON{half-day-icon}%)
  2. write something into the location field and if you stay with the mouse over the icon the tooltip text contains all information
  3. use the TimeTablePlugin especially the %TTCM% tag (if you put it into the name field it creates a second entry in the HolidaylistPlugin table, e.g. * 8 Jan 2007 - Eva %TTCM{"9-11"}%)
  4. ... or any combination of that

-- DanielRohde - 08 Jan 2007

Hi Daniel/Peter,

I have a (change) request I would like to see for this plug in:

Add a possibility to repeat a free day for specific day(s) per time frame for a specified period. Example(s):

Add a free day, every Friday during the next 6 months. Add a free day on Monday and Wednesday every two weeks during 1 year.

Or is this already possible?

Regards, Mark

-- MarkStellaard - 18 Jun 2007

Hi Mark, I think it is possible. If you take a look at the CalendarPlugin documentation you find weekly and periodic repeaters, e.g.:

  • E Fri 18 Jun 2007 - 18 Dec 2007 - Test - every Friday during the next 6 month

  • E14 18 Jun 2007 - 17 Jun 2008 - Test - every second Monday next 12 month (start day should be a Monday!)
  • E14 20 Jun 2007 - 19 Jun 2008 - Test - every second Wednesday next 12 month (start day should be a Wednesday)

But you have to enable the compatmode, e.g. %HOLIDAYLIST{compatmode="1"}%

-- DanielRohde - 18 Jun 2007

Tested and fixed for TWiki 4.2.0. The 4.2.0 Wysiwyg adds a trailing space after bullets and the plugin did not like that. Easy small fix. Works perfectly under 4.2.0 now. Very popular plugin.

-- KennethLavrsen - 18 Jan 2008

I would also like to have a filter for users (passed as list).

-- ArthurClemens - 04 Mar 2008

I find it quite unhandy that the plugin does not understand a full date format like 10 March 2008. That is the default output from JSCalendarContrib (which default date format can be set on ly in Localsite.cfg). Every time you click on a date field icon you will get that format.

-- ArthurClemens - 04 Mar 2008

The required CPAN module Date::Calc is not listed in DEPENDENCIES.

-- ArthurClemens - 05 Mar 2008

Hi Arthur, the HolidaylistPlugin understands full date format like 10 March 2008.

%HOLIDAYLIST{lang="English" startdate="10 Mar 2008"}%
   * 10 March 2008 - Test

-- DanielRohde - 19 Mar 2008

First of all, thanks for the cool plugin! Second, I'm wondering if anyone has ever requested a "total" column to display at the end of whatever date range is visible so that you could quickly see how many days of a given month each person was out on vacation and/or out sick. I think that would pretty much make it perfect for my org's needs.

-- GarySprague - 02 Jul 2008

Hi Gary, please checkout and test the latest HolidaylistPlugin revision from SVN to get a summary column:

= svn co http://svn.twiki.org/svn/twiki/trunk/HolidaylistPlugin =

-- DanielRohde - 08 Jul 2008

... I've forgot: %HOLIDAYLIST{showsumcol="on"}%

-- DanielRohde - 08 Jul 2008

Hey Daniel, thanks for the quick reply. I just tried out the latest revision and noticed one bug. If you have a person out for a range of days that spans a weekend, it seems to count the weekend days in the sum.

Ideally, I think it would sum vacation days separate from sick days - or any other day types defined for the plugin - but this is a great start, and I think I could probably figure out how to tweak the code to create the different category totals. I'm just learning Perl through working with TWiki, so I'm still quite a novice, but trying to learn!

-- GarySprague - 08 Jul 2008

Hi Gary, it is not a bug to count days that spans a weekend. In some countries 'weekend' are working days. Please checkout the latest revision from SVN and change the sumcolformat attribute to "%hh", e.g. %HOLIDAYLIST{showsumcol="on" sumcolformat="%hh"}%

-- DanielRohde - 09 Jul 2008

Yep, that sumcolformat attribute works perfectly. I will let you know if I come up with a way to split out totals for sick vs. vacation days. Thanks again for all your work on this very useful plugin.

-- GarySprague - 09 Jul 2008

Hi Daniel, I'm not sure if this is the right place to ask about this, but I've been digging through the plugin code to try and figure out how to split out a sum of sick days versus vacation days, and I'm having trouble understanding the logic of the table, locationtable and icontable hashes - which variables get assigned to each, and then how the $i variable is used with them to sum the relevant number of days. Any help or hints in this regard would be greatly appreciated.

-- GarySprague - 15 Jul 2008

Hi Gary, what a kind of feature do you need? It's faster if I will implement it instead of explain the historically grown code.

-- DanielRohde - 16 Jul 2008

Hi Daniel, the feature I'm looking for is two separate sum columns - one for sick days and one for vacation days. Thanks for offering to do the implementation, and hopefully I can learn something from seeing how you code this.

-- GarySprague - 16 Jul 2008

Hi Gary, please take a look at SVN. The new revision has a statistics column feature, e.g:

%HOLIDAYLIST{startdate="18 Jul 2008" showstatcol="on" statcolformat="%{ll:sick} | %{ll:holidays}" statcolheader="sick | holidays"}%
   * 18 Jul 2008 - Sam - sick
   * 21 Jul 2008 - 23 Jul 2008 - Sam - holidays

-- DanielRohde - 18 Jul 2008

Hi again, next I will implement the statistics row feature with per day counters:

  • multiple rows with own format and title (tooltip) definitions
  • counters for locations, icons, 'at work' and 'not at work' days

-- DanielRohde - 18 Jul 2008

... ok: all things done: I've removed the summary column feature because the statistics column feature covers it completely. And I've added the summary row feature (new attributes: showstatrow, statrowformat, statrowtitle, statrowheader).

The improved example:

%HOLIDAYLIST{startdate="18 Jul 2008" showstatcol="on" statcolformat="%{ll:sick} | %{ll:holidays}" statcolheader="sick | holidays" showstatrow="on" statrowformat="%{ll:sick} | %{ll:holidays}" statrowheader="sick | holidays"}%
   * 18 Jul 2008 - Sam - sick 
   * 21 Jul 2008 - 23 Jul 2008 - Sam - holidays

-- DanielRohde - 18 Jul 2008

Hi again, the latest SVN revision (>=17092) is most complete (statistics + docs). Please try it ...

-- DanielRohde - 21 Jul 2008

ALERT!ALERT! TWiki:Main.SphanShewale changed the package files and uploaded very old docs and plugin files (I don't know why - maybe idiot at work) . Workaround: check out my latest revision (r17724) from SVN.

-- DanielRohde - 10 Dec 2008

This plugin does not work on TWiki-5.0.0. TWiki-5.0.0 implements tis own CGI.pm which is lacking the 'a' method. I changed the renderNav subroutine to use a string rather than call cgi->a (just before the end).

-- ThomasBAndersen - 2010-08-18

Thanks Thomas for reporting the issue.

DanielRohde: Could you fix the plugin? It has a ContactAuthorFirst policy.

-- PeterThoeny - 2010-08-18

I would appreciate the first column (containing the names) staying while I scroll in the time direction. Presently the first column scrolls off the screen an I have to keep in mind the numer of the row where the person of intersest is listed.

-- DetlefMarxsen - 2011-03-07

Or possibly repeat the table heading? The WebPreferences plugin has this parameter:

  • repeatheads - if set to a number, headings will be repeated every this number of rows. This is very useful when you have a lot of users and groups.

-- PeterThoeny - 2011-03-07

Hi, its possible to set namepos attribute to "both" and take a look at the tooltips (move the mouse over the row and wait a second).

-- DanielRohde - 2011-03-08

None of those really help ...

The most comfortable solution would still be to put the names outside the scrolling area ... which is the way almost all programs using data tables work: Keep the metadata in sight and scroll the data.

-- Detlef Marxsen - 2016-04-05

Back in 2011, when the problem was discussed, I'd have said "impossible" due to the incoherent CSS support between mainstream browsers. Now, in 2016, there might be a chance to implement such a comfortable solution... with sufficient fluency in CSS, and time at your hands smile

-- Harald Jörg - 2016-04-05

Look into the new TWikiSheetPlugin, it supports fixed columns on the left and fixed rows at the top. Here is an example that has a fixed row on top and two fixed columns on the left:

-- Peter Thoeny - 2016-04-06

Anyone taking the challenge? Then I will probably be not the only one shouting "hooray!" ...

-- Detlef Marxsen - 2017-02-02

Edit | Attach | Watch | Print version | History: r99 < r98 < r97 < r96 < r95 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r99 - 2017-02-02 - DetlefMarxsen
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.