One of the most common requests I hear from MODx developers is an integrated calendar solution. There are a few good options, including one I spoke about in A MODx Calendar & Pilot Group recently (MXCalendar). While this project has definite promise, since it is a completely integrated MODx solution, I am still a little hesitant to whole heartedly adopt a solution that doesn’t meet the majority of my criteria for a commercial client calendar.
My Criteria
- The calendar must be easy to integrate into the site design.
- The calendar solution must allow for intuitive updating, by the end user, of dates/events.
- The calendar administration area must be accessible seamlessly from the MODx admin area.
It is the 2nd point that I almost always get stuck on. Based on my experience, end users understand and can function in a calendar best when they update from a graphical, month view. Documents and lists simply do not work for them. They need to see a “calendar”.
Easy PHP Calendar
Take a look at Easy PHP Calendar. Please understand that my experience with this solution constitutes 1 ongoing project, but my experiences so far have been so good enough that I felt the need to share them.
First of all, this is a licensed product and costs $19.95 per domain. There are additional options available (which I purchased) which brought the total cost to $49.90. In my opinion it is well worth it, especially given that the site seems to have a well attended support forum.
Integration into Site Design
The calendar has a great set of supporting documents that will walk you through the installation and site integration.
What it boils down to is that you can install the calendar in a directory (let’s say /calendar/) and then using 3 separate includes (you will find these in the supporting documents) you can call the calendar directly onto the page. I placed these includes in 3 separate snippet calls on my Calendar page.
That pretty much takes care of criteria #1.
Intuitive Updating
The calendar updating is done from the events (/calendar/events/) directory and these tasks are performed from a graphical, calendar view with some slick AJAX sprinkled in for usability. It’s as straight forward to update as any calendar solution I have seen.
That pretty much takes care of criteria #2.
Calendar Administration inside of MODx
Now, it gets interesting (thank you @swscripts!). The calendar allows you to bypass the calendar login screen by placing the appropriate Username and Password in the URL. I will again refer to the supporting documentation for setting up a user account within the calendar.
I also came across this MODx forum post by goldsky which outlines how to embed another script login inside of the MODx admin.
So, following the instructions above, a “Calendar Events” module was created using the following line of code:
header("Location: ". $modx->config['site_url'] . "calendar/events/index.php?name=yourusermane&pwd=yourpassword");
Now, with the module created, all my end users have to do is login to the MODx admin, click on the module and they are editing calendar events. The events manager is less than 700px wide, so it fits great inside of the frames of the MODx admin. All I had to do was change a couple of CSS attributes and edit a couple of images and the calendar admin looked completely integrated into the MODx admin area.
That pretty much takes care of criteria #3
One of my favorite aspects of this approach is that the end user is ultimately relying on MODx for authentication and MODx allows you to use the permissions system to control user access to modules as well.



