calendar1Add my vote for this tag tracker_apps1Add my vote for this tag create new tag
, view all tags


This plugin is used for reservation of any resource using mysql database .

For example, this can be used as library reservation system, where books can be reserved by users for a particular period and it allows to delete the reservations made ( by the user only) and retrieve the reservation list on particular date or paricular period.

One can also retrieve the free resources on a particular date or particular period , by which the user can make the decision of reserving the free resources according to his will. The plugin also facilitate the user to create and delete the tables ( which are used for maintaining reservations) from TWIKi only.

The pre-requiste for accessing mysql database is that the Admin has to create the database named Reservation.

Syntax Rules

Recognized Variables (for usage).

This is a list of all the variables available. The names should be self-explanatory. The table parameter in the following variables has to be created using the create option in the topic ResourceAdminstator.


This variable is used to show all the reservations done in the future and past. Parameters:
  • Table: The table where all reservations has been stored


This variable is used to reserve a resource from one date to another date.This variable takes following parameters
  • Table :The table where all reservations has to be stored
  • resource : The resource to be reserved
  • fromdate : The starting date of reservation
  • todate : The end date of reservation
  • username : On whom name, the reservation has to be made..Generally
    is enough
  • comment : Any comment to be attached to reservation The required parameters for the variable to get working is Table,resource,fromdate,todate,username


This variable is used to show free resources from a date to another date.The parameters required are given below
  • Table : The table where reservations are stored
  • ResourceList : The resources list
  • Fromdate : The starting date
  • Todate : The end date


This variable is used to generate all the reservations done from current date. The list contains all the reservation details along with the delete option. The parameters required are given below
  • Table : The table where reservations are stored
  • UserName : The reservtions done by the user will be displayed. If no username is given, all the reservations will be displayed.


This variable is used to show the reservations made from a particular date to another date. The parameters required are
  • Table : The table where reservations are stored
  • date :


This variable is used to delete the specified reservation.This variable has to be defined in a topic named DeleteResourceReservation. The following code should be there inorder to work as expected.
%DELETE_SPECIFIED_RESOURCE{ Table="ReservationTable" reservationid="%URLPARAM{"reservationid"}%"}%

Variables(For Adminstrator)

Mysql has been used for storing the reservations. For working of plugin, Reservation database has to be created. After that, the administrator has to create tables in the topic ResourceAdministrator.The username for the mysql should be root and the password is nil.

Variables(For display)

These variables has been defined inorder to lessen the burden of writing code, by which the variables for reserving the resources can be directly used. How to use these variables has been given along with the variable definition


The resource reservation form will be rendered as the output of this variable. The form will have the resource,from date , to date and comment fields which are named as Resource,=Rdate=,=Tdate=,=comment=.An example of usage of the variable is given.
The requirement of the ResourceList parameter is defined below in the Requirements header .


The search form will be rendered as the output of this variable. The form will have the fromdate and todate fields which are named as Fdate and Tdate.There are no parameters required. The usage of the variable is given in the CheckResources.


The requirements for the plugin to work is that Reservation database has to be created in mysql page. Then after wards tables has to be created using the
. The ResourceList parameter in SHOW_FREE_RESOURCE should be given a topicname. The topic should be in the following format
%STARTINCLUDE%<option>Resource1</option><option>Resource 2</option>%STOPINCLUDE%

The user can has many resources which can be embedded in the INCLUDE tags as specified above.


1. If properly installed you will see a form asking to check resources


2. Check the reservations on a particular date in the ReservationOnDate

Plugin Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Reservation system for resources using mysql database

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0


Here is the screen shot of Reservation Plugin Snapshot-Reservation.png

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.

  • Download the ZIP file from the Plugin Home (see below)
  • Unzip ReservationPlugin.zip in your twiki installation directory. Content:
File: Description:
data/TWiki/ReservationPlugin.txt Plugin topic
data/TWiki/ReservationPlugin.txt,v Plugin topic repository
lib/TWiki/Plugins/ReservationPlugin.pm Plugin Perl module
data/TWiki/ResourceAdministrator Administrator page
data/TWiki/CheckResources Sample page
data/TWiki/ReservationOnDate Reservation done on particular date
  • Configure the Plugin:
    • TWiki 4.0 and up: Run the configure script to enable the Plugin
  • Using mysql, create a database named "Reservation"
  • Then go to ResourceAdministrator and create all the tables required and reserve the resources as required. The plugin has been developed and tested using mysql 5.0.51.

Plugin Info

Plugin Author: TWiki:Main.SrikanthRevanuru
Copyright: 2007, TWiki:Main.SrikanthRevanuru
License: GPL (GNU General Public License)
Plugin Version: 09 Jul 2008 (V1.000)
Change History:
09 Jul 2008: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: DBD-mysql-4.007 ,Time::Local
Other Dependencies: JSCalendarContrib
Perl Version: 5.005
Benchmarks: GoodStyle nn%, FormattedSearch nn%, ReservationPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ReservationPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ReservationPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ReservationPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWiki:Main.SrikanthRevanuru - 09 Jul 2008

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatgz ReservationPlugin.tar.gz r2 r1 manage 20.5 K 2008-07-17 - 10:11 SrikanthRevanuru  
Compressed Zip archivezip ReservationPlugin.zip r1 manage 18.2 K 2008-07-17 - 10:15 SrikanthRevanuru  
PNGpng Snapshot-Reservation.png r1 manage 32.0 K 2008-07-17 - 12:05 SrikanthRevanuru  
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2012-12-03 - PeterThoeny
  • 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-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.