NAME

Konstrukt::Plugin::calendar - Management of private and public calendar items

SYNOPSIS

        You may simply integrate it by putting
                
                <& calendar / &>
                
        somewhere in your website.
        

DESCRIPTION

This Konstrukt Plug-In provides calendar-facilities for your website.

You may simply integrate it by putting

        <& calendar / &>
        

somewhere in your website.

You may also create an .ihtml-file containing:

        <& calendar show="rss2" / &>
        

to export the latest calendar events to an RSS2 compliant file.

The RSS file will contain all events within the next X days, where X is specified in the HTTP-request and must not exceed 31:

        http://domain.tld/calendar_rss2.ihtml?preview=14
        

If not specified, the range will be set to 7 (1 week).

The HTTP parameters "email" and "pass" will be used to log on the user before retrieving the events. This will also return private events.

        http://domain.tld/calendar_rss2.ihtml?preview=14;email=foo@bar.baz;pass=23
        

You may also decide, whether the date and the time should be stated in the entry:

        http://domain.tld/calendar_rss2.ihtml?show_date=0;show_time=1

CONFIGURATION

You may do some configuration in your konstrukt.settings to let the plugin know where to get its data and which layout to use. Defaults

        #backend
        calendar/backend                  DBI

See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::calendar::DBI) for their configuration.

        #layout
        calendar/template_path            /templates/calendar/
        #user levels
        calendar/userlevel_write          2
        calendar/userlevel_admin          3
        #rss2 export
        calendar/rss2_template            /templates/calendar/export/rss2.template
 

METHODS

execute_again

Yes, this plugin may return dynamic nodes (i.e. template nodes).

init

Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.

install

Installs the templates.

Parameters:

none

prepare

We cannot prepare anything as the input data may be different on each request. The result is completely dynamic.

execute

All the work is done in the execute step.

Parameters:

  • $tag - Reference to the tag (and its children) that shall be handled.

add_entry_show

Displays the form to add an event.

add_entry

Takes the HTTP form input and adds a new event.

Displays a confirmation of the successful addition or error messages otherwise.

edit_entry_show

Displays the form to edit an event.

edit_entry

Takes the HTTP form input and updates the requested event

Displays a confirmation of the successful update or error messages otherwise.

delete_entry_show

Displays the confirmation form to delete an event.

delete_entry

Deletes the specified event.

Displays a confirmation of the successful removal or error messages otherwise.

show_month

Shows an overview of a month or error messages otherwise.

Displays a confirmation of the successful removal or error messages otherwise.

Parameters:

  • $year, $month - The month which should be displayed. If not specified, the month will be received from the HTTP-parameters. If still not specified, the current month of the system date will be taken.

    Note that events that occur every day will not mark every day for an event as this will lead into visual unclearlyness.

show_week

Shows an overview of a week with it's events or error messages otherwise.

Parameters:

  • $year, $week - The week which should be displayed. If not specified, the week will be received from the HTTP-parameters. If still not specified, the current week of the system date will be taken.

show_day

Shows an overview of a day with it's events or errpr messages otherwise.

Parameters:

  • $year, $month, $day - The day which should be displayed. If not specified, the day will be received from the HTTP-parameters. If still not specified, the current day of the system date will be taken.

show_entry

Displays an entry.

show_all

Shows an overview of all events or error messages otherwise.

show_last

Shows the last calendar view that has been saved in the session.

export_rss

Generates an RSS 2.0 compliant XML file with the content from the database.

The RSS file will contain all events within the next X days, where X is specified in the HTTP-request and must not exceed 31:

        http://domain.tld/calendar_rss2.ihtml?preview=14
        

If not specified, the range will be set to 7 (1 week).

The HTTP parameters "email" and "pass" will be used to log on the user before retrieving the events. This will also return private events.

prepare_events

Prepares the passed events for later use.

Private events that don't belong to the user that is currently logged on, will be eliminated.

Events with wildcard dates (e.g. year = 0) will be repeated within the given date range and inserted with absolute/fixed dates.

The event list will be sorted chronologically.

Returns the prepared event list as array reference of hash references

Parameters:

  • $events - Array reference of hash references containing the events

  • $start_year, $start_month, $start_day - Start date of the date range

  • $end_year, $end_month, $end_day - End date of the date range

AUTHOR

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO

Konstrukt::Plugin::calendar::DBI, Konstrukt::Plugin, Konstrukt