HolidaylistPlugin
The HolidaylistPlugin handles the tag %HOLIDAYLIST% that inserts a vacation list on the current page. Smilies are used to indicate if a person is in work or on holiday.
The plugin creates a table filled with Smilies and today's date will be the first column. There is a row in the table for each person and each day is flagged as either:

(in work),

(a day off) or

(absent for some time),

(not at work; used if you type a location). You can also use other smilies (like :skull:).
Example (image):
Usage Examples
To insert vacations into the table, create a bullet list. Three spaces and then a *.
The syntax is described below (
Syntax).
Example1: To list that John will be away on 1-July-2005
* 01 Jul 2005 - John
Example2: To list that Mary will be away from 3-Sep - 9-Sep 2005
* 03 Sep 2005 - 09 Sep 2005 - Mary
Example3: To list that Jill will be in Paris from 10-Sep - 11-Sep 2005 and in Tokyo on 15 Sep 2005
* 10 Sep 2005 - 11 Sep 2005 - Jill - Paris
* 15 Sep 2005 - Jill - Tokyo
Example4: To list that Eve will be ill from 12-Sep - 20-Sep 2005 with her own 'smily'
* 12 Sep 2005 - 20 Sep 2005 - Eve - is ill - :skull:
Example5: To list that Lisa will by not at work from April to June and the complete December 2005:
* Apr 2005 - Jun 2005 - Lisa
* Dec 2005 - Lisa
Example6: To list in all time table entries that anybody will be not at work on Christmas Day:
* 25 Dec 2005 - Christmas Day @all
Example7: There are several attributes (see
Attributes) like
days (defaults to 30days) and
tablecaption (defaults to null).
%HOLIDAYLIST{days="90" tablecaption="Planned Holidays"}%
Syntax
The syntax follows that of the CalendarPlugin. See
TWiki:Plugins.CalendarPlugin for more details.
| Entry type | Syntax | Example |
| Single entry | * dd MMM yyyy - name | * 01 Jul 2005 - Jane |
* dd MMM yyyy - name - location | * 01 Jul 2005 - Sarah - in Paris |
* dd MMM yyyy - name - location - icon | * 01 Jul 2005 - Eve - ill - :skull: |
| Interval entry | * dd MMM yyyy - dd MMM yyyy - name | * 01 Aug 2005 - 22 Aug 2005 - EvaMaria |
* dd MMM yyyy - dd MMM yyyy - name - location | * 02 Sep 2005 - 10 Sep 2005 - JohnDo - in London |
* dd MMM yyyy - dd MMM yyyy - name - location - icon | * 02 Oct 2005 - 22 Oct 2005 - Fred - is ill - :skull: |
* MMM yyyy - name | * May 2005 - Carl |
* MMM yyyy - name - location | * Jun 2005 - Sam - in Sidney |
* MMM yyyy - name - location - icon | * Nov 2005 - Lisa - is ill for a complete month - :skull: |
* MMM yyyy - MMM yyyy - name | * Jun 2005 - Jul 2005 - Lily |
* MMM yyyy - MMM yyyy - name -location | * Feb 2005 - Apr 2005 - Lisa - is not at work |
* MMM yyyy - MMM yyyy - name - location - icon | * Nov 2005 - Dec 2005 - Lola - is 2 month not at work - :yes: |
| Exception | insert the following before the name field and after a date (range): X { dd MMM yyyy, dd MMM yyy - dd MMM yyyy } | * Dec 2005 X { 5 Dec 2005 - 7 Dec 2005, 12 Dec 2005 } - Sarah - will be away for the complete december except between 5 Dec and 7 Dec and on 12 Dec 2005 |
| Public Holidays | just type '@all' in the name field | * 25 Dec 2005 - Christmas Day @all |
Notes and hints:
- At least one space character have to stay before and after a seperator ('-'). This allows you to use a '-' in names, locations or icons, e.g. if you have a composite name like Eva-Maria.
- If you enable the compatmode (see Attributes) you can use all event types of the TWiki:Plugins.CalendarPlugin
- If you change the default language ('lang' attribute; see Attributes) you can use your language specific month and day names or the abbreviations for any entry type (including TWiki:Plugins.CalendarPlugin event types).
- If you change the month names or day names ('monthnames' and 'daynames' attributes; see Attributes) you can use it for your entries (including TWiki:Plugins.CalendarPlugin event types).
- You can hide all calendar entries if you put them into HTML comments, e.g:
%HOLIDAYLIST%
<!--
* 24 Dec 2005 - Sam - @home
-->
- You can put the entries to another topic and use the topic attribute, e.g:
%HOLIDAYLIST{topic="TimeTableDataTopic" tablecaption="Planned Holidays (see TimeTableDataTopic)"}%=
- You can hide '@all' in an entry if you put it into HTML comments, e.g:
* 25 Dec 2005 - Christmas Day <!--@all-->
Attributes
| Attribute | Comment | Default / Example |
| Behavior |
| compatmode | if set to "1" all TWiki:Plugins.CalendarPlugin event types are supported (related: compatmodeicon) | compatmode="0" |
| daynames | costum daynames (a list separated by a '¦' and starting on Monday; overwrites lang attribute) | daynames="M¦T¦W¦T¦F¦S¦S" |
| days | number of days to show | days="30" |
| enablepubholidays | enables/disables public holidays (bullet list entries with a @all in a person field; related: showpubholidays, pubholidayicon) | enablepubholidays="1" |
| lang | language (related: daynames, monthnames) | lang="English" |
| month | set a month (e.g. Jan, Feb ... or 01, 02, ... 12 ) or a month offset (e.g. +0, +1, -2,...) Note: If you use this month attribute the days attribute will be ignored (days will be set to the duration of the month). | month="+1" |
| monthnames | costum month names (a list separated by '¦' and starting on January; overwrites lang attribute) | monthnames="J¦F¦M¦A¦M¦J¦J¦A¦S¦O¦N¦D" |
| removeatwork | set to "1" to remove persons without calendar entries from table | removeatwork="0" |
| showpubholidays | show public holidays as separate lines (rows) in table (related: enablepubholidays, pubholidayicon) | showpubholidays="0" |
| showweekends | show weekends if set to 1 | showweekends="0" |
| startdate | a start date (e.g. '1 Oct 2005') or a day offset (e.g. '10', '+30' or '-30') | startdate="+0" |
| topic | a comma separated list of source topics | topic="%TOPIC%" |
| year | set a year (e.g. 2005, 2006 ...) or a year offset (e.g. +0, +1, -1, ...) | year="0" |
| Icons |
| adayofficon | a day off icon | adayofficon=":ok:" |
| compatmodeicon | icon used for TWiki:Plugins.CalendarPlugin event types (only used if compatmode is enabled) | compatmodeicon="8-)" |
| holidayicon | holiday icon | holidayicon="8-)" |
| notatworkicon | not at work icon (only used if you type a location) | notatworkicon=":-I" |
| pubholidayicon | public holiday icon (related: enablepubholidays, showpubholidays) | pubholidayicon=":-)" |
| workicon | in work icon | workicon=" " |
| Table Formatting |
| border | table border | border="1" |
| cellpadding | table cell padding | cellpadding="1" |
| cellspacing | tabel cell spacing | cellspacing="0" |
| daynames | costum daynames (a list separated by a '¦' and starting on Monday; overwrites lang attribute) | daynames="M¦T¦W¦T¦F¦S¦S" |
| headerformat | table header format of a day; a subset of strftime conversion specifiers is supported (only date not time specificiers; see manual page or TWiki:Codev.ConvergeDateTimeFormattingModels) | headerformat="<font size=\"-2\">%b<br/>%a<br/>%e</font>" |
| lang | language (related: daynames, monthnames) | lang="English" |
| monthnames | costum month names (a list separated by '¦' and starting on January; overwrites lang attribute) | monthnames="J¦F¦M¦A¦M¦J¦J¦A¦S¦O¦N¦D" |
| name | header content of the first cell header | name="Name" |
| nwidth | cell width of the first column | nwidth="120px" |
| tablebgcolor | table background color | tablebgcolor="white" |
| tablecaption | table caption | tablecaption=" " |
| tablecaptionalign | table caption alignment (top, bottom, left, right) | tablecaptionalign="top" |
| tableheadercolor | color of the table header | tableheadercolor="%WEBBGCOLOR%" |
| tcwidth | width of the icon table cells | tcwidth="33px" |
| todaybgcolor | background color for today cells (usefull if you use startdate attribute) | todaybgcolor="white" |
| todayfgcolor | foreground color for today cells (usefull for a dark todaybgcolor) | todayfgcolor="black" |
| weekendbgcolor | background color of weekend header and data table cells | weekendbgcolor="%WEBBGCOLOR%" |
| width | width of table in pixels or percent | width="100%" |
Hints:
- You can use Text Formatting Rules for some attribute values: tablecaption, name, holidayicon, adayofficon, workicon, notatworkicon, compatmodeicon, pubholidayicon
- Every attribute of %HOLIDAYLIST% can also be used as plugin setting. You only have to use capital letters.
Example
%HOLIDAYLIST{startdate="1 Jun 2005"}%
- 02 Jan 2005 - 28 Feb 2005 - Bill
- 27 Mar 2005 - 20 Apr 2005 - Bob
- 10 May 2005 - 01 Jun 2005 - Mary
- 13 Jun 2005 - 12 Jun 2006 - Jill's Motherhood
- 08 Jun 2005 - Bill
- 10 Jun 2005 - 15 Jun 2005 - Bob
- 12 Jun 2005 - 14 Jun 2005 - Alice - Paris
- 17 Jun 2005 - Bob - is ill -
- 10 Jul 2005 - Mary
- 20 Jul 2005 - 02 Sep 2005 - Bob
- 15 Sep 2005 - 15 Oct 2005 - Mary
- 30 Oct 2005 - Jane
- 19 Nov 2005 - Bob
- 29 Nov 2005 - 20 Dec 2005 - Bill
- 25 Dec 2005 - Bob
Plugin Settings
- One line description, is shown in the Text Formatting Rules topic:
- Set SHORTDESCRIPTION = Create a table with a list of people on holidays
- Days to show (default: 30)
- Language (default: English - see manual page of Date::Calc perl module, e.g: English, Deutsch, Français, Español, Nederlands, Dansk, suomi, ...).
- Content of the first cell (default: Name):
- Set work icon (default: - old behavior:
:mad: ):
- # Set WORKICON =
- Set compatibility mode (default: 0; disables all TWiki:Plugins.CalendarPlugin event types) and icon (default:
8-))
- # Set COMPATMODE = 1
- # Set COMPATMODEICON =
- Set unknown parameter message (default:
%RED% Sorry, some parameters are unknown: %UNKNOWNPARAMSLIST% %ENDCOLOR% <br/> Allowed parameters are (see TWiki.HolidaylistPlugin topic for more details): %KNOWNPARAMSLIST%)
- # Set UNKNOWNPARAMSMSG = Following parameter(s) is/are unknown: %UNKNOWNPARAMSLIST%
- Enable/Disable public holiday support (default: 1; public holiday support is enabled), show public holidays as separate lines in table (default: 0; public holidays are not shown as separate rows in table); public holiday icon (default:
:-))
- # Set ENABLEPUBHOLIDAYS = 1
- # Set SHOWPUBHOLIDAYS = 0
- # Set PUBHOLIDAYICON =
Note: Every attribute of %HOLIDAYLIST% can also be used as plugin setting. You only have to use capital letters.
Plugin Installation Instructions
- Install required CPAN modules (e.g.
perl -MCPAN -e "install Date::Calc" and perl -MCPAN -e "install HTML::Entities")
- Download the ZIP file from the Plugin web (see below)
- Unzip
HolidaylistPlugin.zip in your twiki installation directory. Content:
| File: | Description: |
data/TWiki/HolidaylistPlugin.txt | Plugin topic |
lib/TWiki/Plugins/HolidaylistPlugin.pm | Plugin Perl module |
pub/TWiki/HolidaylistPlugin/example.gif | Example image |
- Test if the plugin is correctly installed: Copy the example above into a new topic and change the year number to the current year.
Plugin Info
| Plugin Author: | TWiki:Main.PeterJones, TWiki:Main.DanielRohde |
| Plugin Version: | v1.017 (31 May 2006) |
| Change History: | |
| v1.017 (31 May 2006) | TWiki:Main.DanielRohde: fixed minor bug (periodic repeater) |
| v1.016 (27 Apr 2006) | TWiki:Main.DanielRohde: fixed some major bugs: deep recursion bug reported by TWiki:Main.ChrisHausen; exception handling bug (concerns Dakar) |
| v1.015 (9 Feb 2006) | TWiki:Main.DanielRohde: added class attribute (holidaylistPluginTable) to table tag for stylesheet support (thanx TWiki:Main.HaraldJoerg and TWiki:Main.ArthurClemens); fixed mod_perl preload bug (removed 'use warnings;') reported by TWiki:Main.KennethLavrsen |
| v1.014 (23 Jan 2006) | TWiki:Main.DanielRohde: incorporated documentation fixes by TWiki:Main.KennethLavrsen (Bugs:Item1440) |
| v1.013 (8 Nov 2005) | TWiki:Main.DanielRohde: added Perl strict pragma; |
| v1.012 (5 Sep 2005): | TWiki:Main.DanielRohde: added public holiday support requested by TWiki:Main.IlltudDaniel; improved documentation; improved forced link handling in alt/title attributes of img tags; fixed documentation bug reported by TWiki:Main.FranzJosefSilli |
| v1.011 (11 Jul 2005): | TWiki:Main.DanielRohde: improved performance; fixed major periodic repeater bug; added parameter check; fixed flag parameter handling; allowed language specific month and day names for entries; fixed minor repeater bugs; added new attributes: monthnames, daynames, width, unknownparamsmsg |
| v1.010 (5 Jul 2005): | TWiki:Main.DanielRohde: added exception handling; added compatibility mode (new attributes: compatmode, compatmodeicon) with full Calendar Plugin event type support; added documentation |
| v1.009 (29 Jun 2005): | TWiki:Main.DanielRohde: fixed major bug (WikiNames and forced links in names) reported by TWiki:Main.KennethLavrsen; fixed documentation bugs; added INCLUDE expansion (for topics in topic attribute value); added name rendering |
| v1.008 (23 Jun 2005): | TWiki:Main.DanielRohde: added new attributes (nwidth,tcwidth,removeatwork,tablecaptionalign,headerformat); performance fixes; allowed digits in month attribute |
| v1.007 (17 Jun 2005): | TWiki:Main.DanielRohde: personal icon support; new attributes (month,year); icon tooltips with dates/person/location/icon; fixed '-' bug |
| v1.006 (16 Jun 2005): | TWiki:Main.DanielRohde: added new features (location support; today(fg/bg)color) |
| v1.005 (16 Jun 2005): | TWiki:Main.DanielRohde: added new features (start date support; weekendbgcolor); fixed documentation bugs; |
| v1.004 (14 Jun 2005): | TWiki:Main.DanielRohde: some performance improvements; code cleanup; documentation |
| v1.003 (13 Jun 2005): | TWiki:Main.DanielRohde: fix plugin preference handling; rename some subroutines |
| v1.002 (13 Jun 2005): | TWiki:Main.DanielRohde: renders some options; fixes some documentation bugs and a white space bug |
| v1.001 (10 Jun 2005): | TWiki:Main.DanielRohde: A complete reimplementation with many bug fixes and some new features. |
| v1.021 (01 Jun 2005): | TWiki:Main.PeterJones: Initial version |
| CPAN Dependencies: | required: CPAN:Date::Calc optional: CPAN:HTML::Entities |
| Other Dependencies: | Smilies Plugin |
| Perl Version: | 5.0 and up |
| TWiki:Plugins/Benchmark: | Good Style 100%, Formatted Search 100%, Holidaylist Plugin 99% |
| Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/HolidaylistPlugin |
| Feedback: | http://TWiki.org/cgi-bin/view/Plugins/HolidaylistPluginDev |
| Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/HolidaylistPluginAppraisal |
Related Topics: Smilies Plugin,
T Wiki Plugins,
TWiki:Plugins.CalendarPlugin
--
TWiki:Main.PeterJones - 01 Jun 2005
--
TWiki:Main.DanielRohde - 10 Jun 2005