I was asked by our new Library Director to find an alternative to our now out-of-date and somewhat cumbersome room/resource booking software. The software would need to allow staff to book various rooms, ICT resources, labs and mobile notebook trolleys throughout the school. A quick search came up with a number of positive reviews for MRBS as a school resource booking solution so I decided to try it out.
The prerequisites for MRBS are as follows:
- PHP 4/5
- MySQL or PostgreSQL
- A web server (such as Apache) that supports PHP
- PHP-LDAP Modules (optional for LDAP authentication)
Luckily enough I already had an Ubuntu Linux production server in place with these prerequisites installed so I was ready to go. The install process is as follows:
- Extract the contents of the MRBS.tar.gz file to your web servers storage folder (ie: Apache – htdocs, IIS -inetpub)
- Create a mrbs database in MySQL
CREATE DATABASE `mrbs` ; - Create the database table structure using the supplied tables.my.sql script
(Optional: Add sample data to the database using the supplied sample-data.sql script) - You must enter a timezone into the config.inc.php file before the system will function (ie: $timezone = “Sydney/Australia;)
At this point the system is ready to use. However, I recommend a few extra steps for ease of use in a school environment:
Enable period view and define school periods:
The default view for MRBS is time slots. Generally schools work to periods not time slots so a period view has been included in MRBS.
To enable the period view:
- Include the following line of code in your config.inc.php file:
$enable_periods = TRUE; - Define the periods in the config.inc.php file. Example:
- $periods[] = “Before School”;
$periods[] = “Mentor”;
$periods[] = “Period 1″;
$periods[] = “Period 2″;
$periods[] = “Recess”;And so on…
Activate LDAP authentication:
We endeavor to provide a single-sign-on environment for our staff and students which means that LDAP authentication is a must have for any system that we implement into our network. This process was by far the hardest part of the MRBS install and took my colleague and I sometime to complete mainly due to the PHP-LDAP modules.
To enable LDAP authentication:
- Install PHP-LDAP modules
I am not going to go into installing these modules in this post but am happy to lend a hand if you need help getting these working. - Define LDAP authentication commands in the config.inc.php file. Example:
$auth['only_admin_can_book_repeat'] = TRUE;$auth["type"] = “ldap”;$ldap_host = “yourdomain.com.au”;
$ldap_port = 389;
$ldap_v3 = true;
$ldap_tls = false;
$ldap_base_dn = “ou=Users,dc=yourdomain,dc=com,dc=au”;
$ldap_user_attrib = “sAMAccountName”;
$ldap_dn_search_dn = “cn=Admin,ou=Users,dc=yourdomain,dc=com,dc=au”;
$ldap_dn_search_attrib = “sAMAccountName”;
$ldap_dn_search_password = “Admin_Password”; - Define admin users from LDAP in the config.inc.php file
$auth["admin"] = “Admin”;
Being open source the opportunities to endless for you to critique this system to your individual needs. We have edited various files within the system to do the following:
- Only allow admins to create repeat bookings
- Change field labels by editing the language file (lang.en)
- Apply the users username to the end of the displayed booking so staff can easily see who has made the booking
- Add an “Override Creator” field for admins only so that they can make a booking on a staff members behalf
- Edit the Help page to be more school specific help
Andrew,
i have been given a similar task and came up with the same solution (MRBS), and got it going ok, pretty simple eh.
however not being super strong in PHP some of the customization elements are presently trialling me.
Specifically in the area of Only allow admins to create repeat bookings, Add an “Override Creator” field & Apply the users username to the end of the displayed booking.
Would you be able to make your amended code available?
Hi, thanks for that. Like the above request, I too would like to know it if would be possible to get documentation on the changes that you made?
I am also getting the following error
“[Warning: Server failed to set locale to "en_GB.utf-8" (Unix)]”
I have made the changes mentioned in the bug tracker but it has made no difference.
Any ideas?
I also needed to enter periods as follows:
$enable_periods = TRUE;
$periods[0]=”Period 1″;
$periods[1]=”Period 2″;
$periods[2]=”Period 3″;
$periods[3]=”Period 4 Snr”;
$periods[4]=”Period 4 Jnr”;
$periods[5]=”Period 5″;
$periods[6]=”Period 6″;
Hi!
I’m trying to setup MRBS but I’m very new to Linux. I’ve installed Ubuntu 10.10 server + LAMP + php5-ldap. I’ve only configured a static IP for this machine and nothing else.
I was able to copy MRBS file in /var/www/ and it seems to work with some of the customization I made in config.inc.php (logo, name, ecc).
The one thing I’m not able to do is activate LDAP authentication: I’ve copied your conf in config.inc.php and adjusted it to my environment but everytime I try to log in, the system respond “Unknown user”. What did I do wrong? Should the Ubuntu server join the AD directory?
Hi!
Can you please explain how to achieve this points:
- Apply the users username to the end of the displayed booking so staff can easily see who has made the booking
- Add an “Override Creator” field for admins only so that they can make a booking on a staff members behalf
Thank you!
Hi Laura
Sorry for the delay. I will try answer your questions tomorrow after going back over the changes that I made to achieve these points.
Andrew
Hi Laura
WordPress isn’t playing nicely tonight in regards to code examples within a comment so I have created the text file below with the answers to your questions (I will see if I can fix this up and get the information into a comment correctly soon):
Link to file…
I hope this all works for you and please let me know how you go!
Andrew
Hi!
I’ve tried following your instruction but I think I’m using a newer version of MRBS (1.4.6) and the code is fairly different….. Anyway, I’ll try downloading an older one and see if it’ll work.
I couldn’t edit my previous post about LDAP connection: I got it to work replacing double quotes (“) with single quotes (‘)… seems like my system doesn’t like double ones. Hope this helps other people struggling with LDAP!
As soon as I’ll get MRBS to work I’ll let you know!
Thank you so much!
Hi Laura
I meant to mention the version that we are currently using. I have downloaded a copy of the latest 1.4.6 release and should be able to let you know where to edit the code if you would like?
Andrew
Hi Andrew!
Could you really?
I tried to change the code myself to no avail…..I’m getting only “()” were there should be the username ($create_by)….I tried many changes but had no luck…..
I don’t want to further bother you but if you could help me out I’ll really appreciate it!
Thanks!
Hi Laura
I have installed a copy of the latest MRBS 1.4.6 release and have managed to make the edits work correctly. It was a combination of me missing a key element (that will teach me to do things late at night) and some code changes within MRBS. Below is a revised version of the instructions and a ZIP file containing the three files that we edited to achieve these changes:
- Instructions
- ZIP File
I hope this works for you this time around and again please let me know how you go!
Andrew
Hi Andrew, you’re great!
It works like a charm!! I thought I was missing some variable declaration for the Create_by problem but didn’t know where it was located.
Also the Override creator filed is displayed and works properly.
You really made my day!
Thank you so much for wasting your sleep time to help me out!
Laura
Hi Andrew,
Excellent article!!!. Thanks for your time. we have MRBS setup and heavily customized to our needs. We would like to add 2 more things;
Can we see some additional information in “view_entry.php” (when you click on the booking) such as;
1. “Edited/Updated By:” =so we can see who edited the record
2. “Entry Created Time;” = the time user made the booking
This is what I’ve got from Campbell Morrison (MRBS);
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
You’d have to create new fields in the entry and repeat tables to record the original creation time and also the name of the last editor and then you’d have to write these out to the database every time a booking was made/changed by modifying edit_entry_handler.php and also mrbs_sql.inc
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
But I’m not too familiar with mrbs_sql.inc. Your help in this matter is higly appreciated.
Additional info;
I’m using MRBS Version 1.4.4.1 so if you can edit the files on same version would be really good.
Thanks