Bookings

Bookings Plugin ExampleBookings is a calendar and formular based plugin writen by Ricardo Serpell for CMSimple and meant to allow visitors to appoint or “book” a resource offered by the site.

It aims to provide all the functionality needed to adapt it to as many different uses and situations as posible, from room booking in public areas to on-line demo appointments. It can be used to book meetings or to offer scheduled on-site services. What ever you think of. As a work in progress sugestions and complaints are both welcome at the cmsimple forum.


What it does:

Bookings is a rather ambitious plugin that already implements the following features:

  • Appointable calendar rendered in the content area to select date/time when booking the resource (display is <TABLE> based, CSS driven).
  • Information for calendar rendering as well as booking information for a given month is stored in a single file (one file per month). This allows the plugin to render each month differently if needed.
  • Calendars are configurable through the plugin admin area and can include any number of appointable fields (times) per day. Fields are freely named (not only by their times). Administrator can add new fields or remove existing ones.
    • Month Editing
  • NEW Version 1.0 beta 5 Calendars are automaticaly generated based on a calendar template. This template is also configurable through the admin area of the plugin (it can be edited with any text editor since it is a PHP file). If the plugin needs to render a not yet created month then it creates it based on the template (see automatic render of relevant month further down).
  • A fully configurable formular is presented to the visitor to fill along with the calendar, with requested fields relevant for the appointment. The formular is configured in the plugin admin area (formular display is also <TABLE> based, CSS driven). This information is saved in the corresponding month file.
    • Formular editing
  • Upon appointing, the visitor receives an e-mail confirming reception of his request, with a copy of the information he or she provided. A similar e-mail is sent to a designated mailbox in the site-side warning about the new appointment. This e-mail contains a KEY-Link for the site-side user to approve or check the appointment request.
    • Confirmation Mail Options
  • Appointed fields (selected date/time/event) are marked as “provisionaly appointed” preventing other visitors from appointing the same resource.
  • Appointment requests are approved or rejected by editing the relevant month in the admin area of the plugin or via the links in the warning e-mail sent to the designated mailbox in the site-side.
  • Upon approve or rejection of “provisional” appointment visitor receives an e-mail warning him of the new status of his request. A similar mail is sent to the designated mailbox in the site-side with the information of the approved appointment.
  • Plugin can be called simultaneously in different areas of the content to show different months.
  • NEW Version 1.0 beta 5 The plugin can be called to show a particular month (a certain year/month) or to atomatically show a relative month based on current date. When using this feature the plugin can be instructed to show the month it was/is/will-be in “N” years/months/weeks/days before or ahead of current. Example:
    • #cmsimple $output.=rs_bookings('show=month, week=auto+1'); #
    • In this example the plugin will render the month it will be in one week from now. If this particular month file is not yet created the plugin will create it based on the month template.
  • Options to display the calendar according to different schemes are provided in the config area of the plugin.
    • Configuring Bookings
  • Only fields ahead of current date (plus a configurable number of non appointable days) are appointable.
  • There is language support provided through language files located in the “languages” sub-folder. Language files can be edited by the user and then selected in the admin area of the plugin.

Usage:

The plugin is called from within the content as in this example:

#cmsimple $output.=rs_bookings('show=month, day=auto+2'); #

Options:

show=month

Show is a required option and indicates how to render the calendar (by day, week or month). Currently the avaliable views are full month or single week (show=week), other views should be implemented soon.

optional parameters:

month=value (default value is auto)

Value can be any number, preferable between 1 and 12 for predictable results, or the month name (in english). From version 1.0 beta 5 you can use also the auto value. Whit the auto option the plugin selects the current month based on the php date() function. You can use the value auto+n or auto-n to indicate a relative month n months from or before current (example month=auto+1 shows the next month).

week=value (default value is auto)

Value can be any number, preferable between 1 and 52 for predictable results. From version 1.0 beta 5 you can use the auto week value. With the auto option the plugin selects the month to show based on the current date. You can use the value auto+n or auto-n to indicate a relative week n weeks from or before current (example week=auto+2 shows the month to be in two weeks). IMPORTANT: avoid using month and week options at the same time with auto+-n values since results may be difficult to interpret

day=value (default value is auto)

From version 1.0 beta 5 you can use the auto day value. With the auto option the plugin selects the month to show based on the current day number. You can use the value auto+n or auto-n to indicate a relative day n days after or before current day (example day=day+10 shows the month to be in 10 days). IMPORTANT: avoid using month and week and day options at the same time with auto+-n values since results may be difficult to interpret. ALSO: value for day option can be any number, preferable between 1 and 365 for predictable results.

Requirements

It requieres any of the avaliable pluginloaders to include itself into CMSimple and work properly. Bookings is currently in its version 1.0 beta 6, and is provided as is.

Compatibility and Technical Issues

From version 1.0 beta 4 Bookings plugin uses a single internal array for all it’s variables and configuration values called: $rs_bookings. This was done to prevent clashes with other plugins. All plugins I write from now on will use this same nomeclature ($rs_pluginname).

IMPORTANT: as of version 1.0 beta 6 bookings has not been tested with Pluginloader 3. Pluginloader 2 is supported as well as the included pluginloader in CMSimple version 3.

Installation:

After download of bookings.zip file, unzip it inside CMSimple‘s “plugins” folder. A new folder named bookings should now be visible inside “plugins” folder. Inside this folder there should be a file named index.php. If you have already installed any of the pluginloaders then that’s it, you may start calling the plugin from your content area as described in section Usage.

Configuration files are edited through the admin area of the plugin (whithin admin area of CMSimple).

There is no provision to edit the relevant CSS files yet. The relevant CSS files are included in the installation package to allow the user to edit them.

Important Note: All relevant plugin folder and files should have full read/write permissions (0777) for bookings to work propperly.

Download Links:

To download the latest version of the Bookings Plugin please visit:

Bookings plugin version 1.0 beta 5


back to plugins

plugins/bookings.txt · Last modified: 2007/12/09 22:06 by 190.44.157.213