Table of contents

Brushtail Administrator's Guide

Web PC bookings, Web event bookings and online requests

Introduction

These scripts that allow PC bookings, event bookings and online requests to web users. A possible use is a bookings kiosk for library patrons to use or allowing patrons to book their next session from a library public access computer. These scripts can be moved to another directory or even another server.

PC bookings


Web calendar



Online requests



Content management

PC Bookings
For a computer to be booked via pcbookings.php, the computer must be allocated a booking type that has web bookings enabled. This is done through the content management area. The following 2 booking type parameters are relevant.

Event Bookings
For an event to be booked via webcalendar.php, there must be at least one calendar "event type" that has web bookings enabled. This is done by the intranet adminsitrator, in the "Intranet Administration" area, under the menu item "Calendars". The following event type parameter is relevant.

Online request form
This is a public interface to the helpdesk module. To enable the request form, edit the config section at the top of the page to the following:

  1. $enabled = true;
  2. $module_id=; You need to give this parameter the module ID of the helpdesk you want to submit to. This can be found Intranet administration > Navigation menu in the ID column.
  3. $banner This allows you to customize the banner text at the top of the page.
Multiple instances of the helpdesk module may be created by the intranet administrator. You can create a web interface for each module by making copies of the ask.php script. Each script will need a unique module_id.

Configuration


If the "web" folder (containing pcbookings.php and webcalendar.php) is moved to another server. You will need to accompany it with a copy of the "includes" folder.

Customize Look


Edit the web/bookings.css to cutomize the appearance of the web pc bookings, web calendar and online request form.

Authentication

There are a list of options for authenticating web bookings. This is configured in the includes/config.php
The $PCAUTHENTICATION parameter affects PC bookings via PC client & via web interface and has the following options.

The $EVENTAUTHENTICATION parameter affects event bookings via web interface and has the following options.

disabled

This is the default. Web bookings for PCs and events is disabled.

autoaccept

This setting allows users to book without being authenticated.

local

This setting allows users to be authenticated via passwords set by staff using the pc bookings module of the intranet.

web

This allows the bookings to be authenticated against a web login form. For example, most library web catalogues have a login form for patrons to be able to login and then reserve and renew books. Such a login in form can be used by Brushtail to authenticate patrons. This is a way of authenticating patrons via a library management system. It is not restricted to web catalogues, it could be used with any web login form.

The way it works is that Brushtail logs into the web catalogue using the supplied credentials. If the login works then the patron is authenticated.

This method of authentication does require you to look at the html source code of the form you want authenticate with. Then edit the following parameters in includes/config.php

$WEBHOST - This is the domain name/ip of the web catalogue server
$WEBPATH - This FULL directory path of the form action attribute.
The form source code may use a relative url, you will need to work out what the FULL url is.
$STRINGACTION - Accept or deny. Are you testing for login success or failure? It is best if you are testing for a successful login.
$STRING - Is there a distinctive string of text that a successful login page will contain?
$USERFIELD - This is the name of the username field.
$PASSWORDFIELD - This is the name of the password field.
$OTHERFIELDS - If the from has hidden fields this parameter can be used to create an array of hidden values. If there is more than one hidden field simply repeat the parameter.

Example web catalogue login form

<form action="/path/script" method="post">
<input type="text" name="username">
<input type="text" name="password">
<input type="hidden" name="library" value="banana">
<input type="submit">
</form>


$WEBHOST = 'webcatalogue';
$WEBPATH = '/path/script';
$STRINGACTION = "accept";
$STRING = "you are logged in";
$USERFIELD = "username";
$PASSWORDFIELD = "password";
$OTHERFIELDS["library"] = "banana";

To test these paramteters use the sql/webtest.php utility. This will actually display what is outputted in response to the web authentication. This will help you identify the "string" you will be looking for.

Some web catalogues have hidden input fields with temporary dynamic data. To solve this problem,Brushtail can download the opac login page, strip the hidden field values and submit these values with the barcode and PIN. For eaxmple, if the opac login is http://opacaddress/opacloginpage.htm, then the config parameter would be:

$OTHERFIELDS["formurl"] = "http://opacaddress/opacloginpage.htm";

If the intranet server cannot connect to the web catalogue directly, requiring a web proxy, then the proxy IP address and port number will need to be set with the following parameters:

$PROXY_IP = "";
$PROXY_PORT = "";

LDAP authentication

This allows the bookings to be authenticated against a ldap (windows) server. PHP needs to have ldap support enabled. The includes/config.php needs to have the $LDAPHOST parameter set. If authenticating windows users, the ldap username would be loginname@domainname. For testing LDAP authentication try using the main/ldaptest.php utility.

EMAIL authentication

This allows the bookings to be authenticated against a imap/pop3 email server. PHP needs to have imap support enabled. The includes/config.php needs to have the $MAILSERVER parameter set (see http://www.php.net/manual/en/function.imap-open for more information).
The email login name would be used for authentication.

Table of contents