Resource Availability & Booking Calendar plugin for Wordpress allows you to show the availablity status of any resource on the Calendar to the visitors and allows the resource vendors (admin users in Wordpress) to change the booking states on the Calendar.
Background
One of my clients had requirement for a Calendar that shows the availability status of the resources such as Hotel rooms, Taxi for hire, etc. These resources belonged to multiple suppliers and the booking/reservation of the resources would be controlled by the respective resource vendors.
Solution
Upon discussing the use cases and the look & feel requirements with my client, we zeroed on using a AJAX implementation for the Calendar, so that we can fetch months of booking data without refreshing the resource details pages. Then we stumbled upon a free source, Ajax Availability Calendar developed by Christopher Bolson. Since my client’s existing website was built using Wordpress, I started adopting this cool code into a Wordpress plugin. The result is a Resource Booking & Availability Calendar plugin for wordpress.
Features in version 1.0
- Open Source and FREE to use in your site or application
- Unlimited Items (holiday homes, apartments etc.).
- Booking States: Available, Booked, Provisionally booked.
- Multiple administration users, with their own resource handling.
- Styled with CSS - easy to adapt to any design.
- Uses AJAX to change months viewed without reloading the page.
- All javascript handled by the Mootools library.
Download
You can download the latest version of this plugin from Wordpress Plugins database. The plugin is released under GPL2 license.
Installation and Usage
How to install the plugin and get it working?
Follow these simple steps:
- Download the plugin and extract it. Upon extraction, you will get `resource-booking-and-availability-calendar` folder.
- Upload `resource-booking-and-availability-calendar` folder to the `/wp-content/plugins/` directory
- Activate the plugin through the 'Plugins' menu in WordPress
How do I update the bookings in Calendar?
Go to edit post in Wordpress. Select the desired post. In the edit screen, you will see the option to enable Booking. If you enable booking, the Booking Calendar is displayed. Click through the desired dates to alter the booking status on each day.
How do I show the availability calendar to users?
Once you enabled the Booking on a post as said above, the users visiting that post will see the Availability Calendar at the end of the post content.
Screenshots
- Availability Calendar - This is the public view of Availability Calendar on the posts for which Booking is enabled.
- Booking Calendar - This is the Admin view of Calendar. If the Booking is enabled by checking the radio button, the Booking Calendar is loaded. Click on the desired date to change its booking status.
Change log
Version 1.0.1 – Snapshots uploaded in gif format
I have wp version 2.9.2 and the plugin seems to have problem with the ajax, Instead of the calendars I get only the png waiting image both on the admin side and on the post page.
ReplyDeleteIt seems that I cannot access the data on the database, how can I fix it?
Seems like javascript conflict. Can you share the URL?
ReplyDeleteYes thanks a lot,
ReplyDeletehttp://www.salentorental.com/uncategorized/hello-world/
Well, the best thing would be to isolate the problem by disabling un-used plugins. And just check once if it work on different theme (just a quick check)
ReplyDeleteNow I tried with a fresh install of wordpress and every other plugin disabled, also with the default theme. Try to have a look now
ReplyDeleteMarco,
ReplyDeleteDid you use my latest version? Did you see any issues while installation? Some reported that there were issues after upgrading from old version. Can you please do ftp and delete all my plugin related files and newly download the plugin from http://wordpress.org/extend/plugins/resource-booking-and-availability-calendar/ then unzip it and manually copy the folder to plugin directory. I am sure it works. I just tested it on default template in my localhost.
It worked!! Thanks a lot, I do not know why, but it seems that using the automated install from wp-admin panel it generates some errors during the installation.
ReplyDeleteMaybe was just a connection issue during the insallation process.
:) Yep.. Its a known issue since WP 2.8 (http://autoblogged.com/kb/installation/invalid-header/)
ReplyDeleteGREAT!! Its a very good plugin for me. Is it possible to put it on a page instead of post?...
ReplyDeleteHow could i do this?
Thanks,
ángel
It can be done by:
ReplyDelete1) adding an action to publish_post hook; It can be same as actions for draft_post, publish_post, save_post, and edit_form_advanced in the existing plugin. (Ref: cstart-Resource-booking-and-availability-calendar.php)
2) For the javascript, I am supplying the 'post_id' variable to identify the applicable calendar. You need to pass 'page_id' instead, incase of pages.
3) Its wise to create a shortcode to call the calendar in page. That needs to be implemented. Orelse, you can call function 'addPublicCalendar()' in the relevant page template.
Thanks so much for this, it is amazing! Is there any way to display calendars for multiple posts using a template file? Thanks again!
ReplyDelete@Danielle,
ReplyDeleteI think, you want to just maintain one site wide calendar and display it in all/many posts. If my understanding is right, you can't use it like that, right away.
The plugin is designed in such a way that each post represents a resource and each resource has its own calendar.
You need to modify a bit of my code and can get it working as per your use case. Do contact me if you wanna take up this task; I can help you understand my code.
Thank you for your response. I was actually referring to displaying multiple calendars on one page, for example a bed and breakfast site, have the ability to display calendars for all three rooms on one page. I thought something like "get_post_custom_values" or something like that might work but I am not a php expert... For now I will simply link to each room individually from the availability page - thanks so much for your help!
ReplyDelete@ángel, I had a fair bit of success with the following:
ReplyDelete1. Copied the 'publish_post' hook (line 462) and changed it to 'publish_page'.
2. Copied the 'edit_advanced_form' hook (line 464) and changed it to 'edit_page_form'.
3. Added the 'is_page()' conditional to the addContent() method (line 287).
Therefore, using version 1.0.1 of the plugin, do as follows (with line numbers):
287 if (/*$adminOptions['add_content'] == "true" && */ is_single() || is_page()) {
462 add_action('publish_post', array(&$cs_RBA_plugin,'store_post_options'),1);
463 add_action('publish_page', array(&$cs_RBA_plugin,'store_post_options'),1);
464 add_action('save_post', array(&$cs_RBA_plugin,'store_post_options'),1);
465 add_action('edit_page_form', array(&$cs_RBA_plugin,'post_options'),1);
466 add_action('edit_advanced_form', array(&$cs_RBA_plugin,'post_options'),1);
As far as I can tell, it works fine, so everything else can be left alone, including 'post_id' and 'page_id'. I didn't bother creating a shortcode, as it now fulfills my needs.
Thank you for the plugin, sir!
Paul d'Aoust
Hi
ReplyDeleteBrilliant plugin, do you intend to add the additional legend items to the plugin, such as Chris has in his e.g. booked AM, Provisional AM etc. I am using the plugin to show availability of holiday rentals.
Thanks for the great work.
@Paul, Well I would implement it once I get some time. But, its as simple as adding new 'states' in 'bookings_states' table. Refer to line num. 419 (in function: createTables()) of cstart-Resource-booking-and-availability-calendar.php
ReplyDeleteThere I am adding different states for bookings; you can extend it with your own states and associate CSS to it with color info.
This is perfect for my purposes in its simplicity. In reference to your last sentence in the comment above, where would I find the CSS with the color info for the Provisional booking state? I'd like to change it to green from the orange it currently is. Thanks!
ReplyDelete@Jen, the CSS element for Provisional Booking is "booked_pr" (You can see this linkage in: cstart-Resource-booking-and-availability-calendar.php line num. 419)
ReplyDeleteThe style for the element is in /css/avail-calendar.css line num. 154
There you can change the color code from 'background-color: #ff9700;' to 'background-color: orange;'
Hope it helps.
Thank you! I found it!
ReplyDeleteNow... I am wondering how to re-label "Provisional" as "Available" as I deleted the gray "available" label in the legend (grey is a nice default and I didn't want to be marked available every day of the year by default and it was really easy to delete that in the php) I am sure it is in the php functions somewhere.
Actually, I think I will relabel it as "Open" or something other than "Available" as I don't want to run into other functions that might use the same label.
ReplyDelete@Jen, well thats retrieved from DB. You need to modify in line no. 419 of cstart-Resource-booking-and-availability-calendar.php
ReplyDeleteInstead of 'desc_en' => 'Provisional', change it to 'desc_en' => 'Available or whatever'
@Jen, remember to recreate the DB. Reactivate the plugin.
ReplyDeleteRaghavendra, thank you for your help! I think I might be in a little over my head - I don't quite know how to do the last bit.. but I am so thrilled at what I've got so far! I am assuming DB=database and if so, which database do I need to recreate? I don't recall making one for the plug-in so is it the database that I originally set-up when I installed WordPress? Please forgive me - I do not really understand php. Also, if it's not too much trouble, could you point me in the direction of changing the start of the week to Sunday instead of Mondays?
ReplyDeleteI think an admin panel in WordPress for this plug-in with these customizable options would be fantastic for people like me. I know just enough to break the entire thing and have to re-install it from scratch! :-)
Thanks again for your helpfulness! If you want to see what I've done, you can view my test-post (eventually I do want to get it on a page instead of a post as mentioned above) here: http://www.jenbarnesphoto.com/2010/06/availability-as-of-june-27th/
@Jen, No Do not recreate the entire wordpress database.
ReplyDeleteIf you have access to phpMyAdmin, go to the wordpress database. And look for a table called "wp_bookings_states". Just 'drop' this table & re-activate the plugin.
Now, your new state names shall take effect.
You can tune it to start from Sunday by adding this line:
define ("AC_START_DAY","sun");
in /php/functions.inc.php at the begining, just after define("DATE_DISPLAY_FORMAT", "us");
Hello Raghavendra, I have a small problem. My calendar days are only displaying 6 rows across, so consequently Monday and Sunday occur in the same column. I've tried a fresh install and still have the same problem. Any ideas how I can amend this. Many thanks! Stuart.
ReplyDelete@stuart, Pls share the link to your post.
ReplyDeletehi, do have any example code or instuructions to display the calendar on a page instead of posts, I was the above comment saying it was possable but dont really understand what you ment by
ReplyDeleteRaghavendra, please find the link below as requested. http://www.eventphotographybristol.co.uk/?p=362
ReplyDeleteKind regards, Stuart.
@Stuart, Its CSS issue in your template. Here is a fix: in file /css/avail-calendar.css Please update the following style sheet elements:
ReplyDelete#cal_wrapper .cal_month ul {
clear:both;
color:#FFFFFF;
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin:auto;
padding:4px;
width:200px;
}
#cal_wrapper .cal_month {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
-moz-border-radius-bottomleft:6px;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
-moz-border-radius-topright:6px;
background:#FFFFEE none repeat scroll 0 0;
border:1px solid #006699;
color:#666666;
float:left;
line-height:20px;
margin-bottom:6px;
margin-right:6px;
min-height:194px;
padding-bottom:6px;
width:205px;
}
Hello,
ReplyDeleteI have the same problem like Marco.
My wp version is 3.0 and i can't see dates on the calendars.
Here is the link to the page: http://www.vivavert.eu/?p=86
I have also tryed the manual instal and disabled al plugins but its not working.
How can i fix the problem
I have the same issue : My wp version is 2.9.2 and i can't see dates on the calendars.
ReplyDeleteDo you have a solution to solve it ?
@pascal,@Sebastein,
ReplyDeleteIn sites that have jQuery, Prototype js, its known to cause some conflicts.
Before we conclude, I would ask you to revert to 'default' theme on wordpress and test the plugin. Let me know, whether it works there.
With the default theme, it works with the following errors :
ReplyDeleteDeprecated: Assigning the return value of new by reference is deprecated in C:\Program Files (x86)\EasyPHP-5.3.2\www\wordpress\wp-settings.php on line 646 / 661 / 668 / 675 / 711 and 18.
However, when we edit the post, the theme is not applicable because we are in the administration part and I keep the same isse : i can't see dates on the calendar.
Do you have idea ?
It's not working with the default theme.
ReplyDeleteThe plugging is working on my test site (wp 2.9.2) and its configured with the same theme (arras)
I spent hours checking out various booking/availability systems and this is by far the easiest to use and among the best.
ReplyDeleteI've tried following the instructions above for showing it on a page, but I can't find some of the text shown on there and can't seem to figure it out.
If you could add to this, and add booking to it, you'll have the best availability/booking plugin for WordPress.
Thank you very much indeed!
ReplyDeleteRegards,
Stuart.
@Paul d'Aoust - thank you for the detailed instructions for adding the resource to the page - simple and it works!
ReplyDelete@Raghavendra Deshpande - Thank you for the plugin. It was just what I was looking for. Simple and easy to use.
I am having trouble when not using the plugin on a post. It still shows the title 'Availability Calendar' at the bottom of the post.
ReplyDeleteIs there a way to get this to not show up?
Here is an example:
http://www.somerset.ws/uncategorized/quick-test/
I have the same problem with "Availability Calendar" showing on posts where it is disabled.
ReplyDeleteSame problem here with the "availability calendar".. Not understand php os much but I was trying to play with it. My best solution so far is to delete the line completely. It works for my purpose :p
ReplyDeleteI found out I have problem (conflict) with (probably) jQuery, prototype js, or something. I tried to revert to default theme and the calendar came out brilliantly.
Has this issue (conflict) resolved? Is there any workaround?
I am happy to drop the current theme and change to a friendlier theme as your calendar is PRICELESS!
Hi Raghavendra,
ReplyDeleteIs it possible to bring the calendar (and management) of the calendar out to a custom front-end? I'm looking at implementing the calendar on a template page that allows people to update a post listing without having to visit the wp-admin back end. Have you tried this yourself?
Calendar works great in the backend and displays nicely in the posts at the front end - what I'm trying to do is bring the admin side of the calendar out to the front-end of the site. Is that a possibility or are there any specific template calls or functions that could be called from a template page to make that happen?
This comment has been removed by the author.
ReplyDeleteI have the same problem of Availability Calendar showing on posts where the function is disabled.
ReplyDeleteDear Raghavendra, I have installed the plugin (as the only plugin) on a WordPress 3.0.1 site using the 2010 theme. It works fine except for one nasty error. When editing the dates it throws me a javascript error in Internet Explorer and does not save the changed state of the bookings.
ReplyDeleteAny chance you could have a look at that error. It says:
Messag: 'msg_state' is empty or no object
Line: 113
Character: 2
Code: 0
URI: .../plugins/resource-booking-and-availability-calendar/js/mootools-cal-admin.js?ver=1.2.4
PS It does work in FireFox....
Dear Raghavendra,
ReplyDeleteIs it possible to use your super plugin on pages instead of posts.
Sincerely,
Troels
Dear,
ReplyDeleteYour plugin has the power to become a giant killer. If you would make it more flexible like available on pages, translation page, block history months, custom colors to refer to prices...
But you need to have time to do so.
Good luck, I enjoyed the quality of your work.
Do you think you will be making a widget version anytime soon? Would like to be able to have the calendar up on a side bar at all times.
ReplyDeleteWordpress 3.0.1: the admin is not cliquable. You can set the calendar on and off, but nothing in the admin is cliquable.
ReplyDeleteAlso the first month display correctly, the second month is blank. Cannot change month as well as the 2 arrows are not cliquable too. Anyone go this issue?
Hi Raghavendra, I am having a CSS problem I think like Stuart above. I added the CSS code you suggested to Stuart above but that made no difference to mine. Could you please have a look?
ReplyDeletehttp://www.hotelsinscarborough.org/accommodation/bedroom-2/
thanks
Russ
Hi there Raghavendra! i am having a problem with your plugin, i can add a calendar to my post, but when i add them it doesn't show any dates and can't modify days. I am using wordpress 3.0.1 and chocotheme with jquery. Example here! http://crystalinagaucin.com/haeuser/example-3
ReplyDeleteThanks in advance, btw, i was trying it on other webpage and it worked with the same plugins and theme installed, example: http://gaucin.vacau.com/?p=42
Hello! Will there be an update for WP 3.0.1 in the near future? Any one know of a way to incorporate this with PayPal to be able to accept payments?
ReplyDeleteThanks!
Thanks so much for this plugin! I was looking for days for something like this and couldn't find anything. Finally I stumbled on to this and I am so happy and relieved. Thanks again for this great plugin :)
ReplyDeleteYour great plugin conflicts with
ReplyDeletemappress-google-maps-for-wordpress
It gives in mappres a javascript error.
In mappress_min.js
"Message: 'a[...].point.lat' is empty or no object
regards rob
Hi
ReplyDeleteHow to move the position of the calendar into some div or tab in post? How to change the php to do that? I would like to move it in one of my tabs.
Hi
ReplyDeleteI installed already the plugin under wp page but does not show in admin page any settigns for this plugin. Why? Where I should looking for? Thx
Hi,
ReplyDeletei'm trying to use your plugin in a project, but i can't figure out how to show only one month at a time.
Can anyone give me a hand please?
Regards
I really wish this had the ability to work on pages as well. I realize others have manually edited the code to do this but I'm not willing to bank a solution on stuff I've mucked with like that.
ReplyDeletehi, thanks for this plugin, works great, i would like to ask you, how can translate the legends? because i could transalate only Available but not Booked and Provisional, can you help me please?
ReplyDeletedoes it also support booked am and booked pm?
ReplyDeletedoes it work with wp3.1
Works like a charm. By reading ALL the above comments I now have the ability to add availability to pages instead of posts. I'm sure I can get other suggestions working once I read the comments.
ReplyDeleteRead the comments!
How can I remove the code from the_content() and call it inside the sidebar? Thanx.
ReplyDeleteSo sad that this plugin is no longer being developed, it had so much potential but is now a year old and no longer compatible with the current version of WordPress.
ReplyDeleteAs Raghavendra has been missing for over a year, it would be a wonderful if someone else could take over development of this GPL licensed plugin.
Great plugin! Can someone upload the version for pages please I read here how to do it but I didnt understand any one word. :-(
ReplyDeleteThanks a lot. Nice work here.
Good work, mate. I have one Question. Is it posible to use this calendar with multilanguage website (qTranslate for example. Thank U
ReplyDeleteHello,
ReplyDeleteWould be nice to be able to put the calendar inside of a post, in a user defined place, or in a widget.
Does anyone how to do this?
as a visitor not Admin can i make a request from this calendar or Not?
ReplyDeletehow we seprate calender from the_content in wordpress
ReplyDeleteHi: I need a booking calendar for my website - I am a hotel directory and have app. 125 hotels on my site.
ReplyDeleteI would like a booking calendar where people can add the dates on my site and when they hit the reservation OK button the info will immediately connect with the hotels and B&B's.
I don't want to do the bookings but direct the bookings to the pertinent hotel.
does this work with XML feed? and can i do what i want with this plug in please - thanks! Heather
Hello! Congratulations for your Availability calendar plugin. I have a technical question, I hope you can help me. The content of my post is shown by custom fields, and I need the calendar is displayed in a full position (not at the very end) is this possible? Thank you!
ReplyDeleteHi Is there any way that I can select a range of dates and set them to e.g. booked instead of having to select them day by day?
ReplyDeleteHi,
ReplyDeleteIs there a way to include calendar after the content and not inside?
I would like to open content and calendar in separate window with PrettyPhoto but I don't know how to separate them.
Thank You for answer,
Regards
hi dear how i will manage it ?
ReplyDeleteAmazing post dude.It will be very helpful for begginers like me.Thank you very much for this important post.Waiting for your next post.You can visit our site to get awesome html templates
ReplyDeleteI'll give you a pat on the back just for the sheer effort in screencapping all those blogs.Giving a blog talk to beginner bloggers in the not-too-distant future, I'll be pointing people in the direction of your efforts. Nicely put together dude.Here is our small effort about css templates
ReplyDeleteYour writers are enormously tremendous. premium wordpress themes
ReplyDeleteI never comment on blogs but your article is so best that I never stop myself to say something about it. You’re amazing Man, I like it WP-Database Issues ... Keep it up
ReplyDelete