$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
Technology at Geneseo Community School District 228
17 Dec // php the_time('Y') ?>
On our district website http://www.dist228.org we have online calendars used for a variety of purposes. Each School has their own calendar which contains events for the school year and every computer lab & mobile lab also have online calendars used to sign up and reserve the resource. To implement this we use PHP scripting based on that of Calendarix (http://www.calendarix.com/index.php) . These calendars are simple, functional and straightforward and are easily customizable as the code is done primarily in PHP. Unlike many other web calendar services – this product gives complete freedom to customize anything since you can easily just manipulate the PHP scripts. Calendarix has two versions available, one is the free basic calendar and the other is the advanced version which adds more PHP scripts enabling some nice added features – one such feature exporting to ICS and VCAL formats.
One great thing about PHP code is that it does a good job of embedding a website within a website. For Example with Calendarix a mini version of each calendar is available which appears as small website. Using the following PHP code you can insert this mini website into an existing website creating a nice mini calendar widget.
<?php
echo”<base href=http://www.dist228.org/calendars/ms/smallcal2.php>”;
?>
<?php
$remote = fopen(“http://www.dist228.org/calendars/ms/smallcal2.php?op=smallcal&date=2009-12-01&catview=0″, “r”);
fpassthru($remote);
?>
In addition to embedding the website using this PHP code I also modified the smallcal.php script removing the control options. I did this because this widgetized version of the calendar will not keep its links embedded in the windows so it gives an overall cleaner look removing this mini control panel.\
This screen shot shows the mini calendar embedded using the original smallcal.php script with the control panel below the calendar. I modified this script to exclude these options since CLOSE does not really make since in with an embedded webpage like this.
Here is finished product using embedded webcalendar fully working with control panel at the bottom.
Another nice feature of Calendarix is the ability to export an event or events into ICAL.
To do this only a few modifications are necessary of the Calendarix code. If using the Advanced version this can be accomplished by just changing a couple of preferences in the Admin Control Panel.
To settings need to be changed under the GENERAL Settings tab of the admin screen.
The first setting is the number of events of recent events. This is set to default to 10 events, this is not really that helpful because then the max number of events the can be batch exported to ICAL is 10. Here i set this number to 400 but you could really set this to 1000. The idea being that this way when you export you get all events for the entire year from this date forward.
The other item I changed is the default EXPORT format from
VCAL to ICAL – I have found the ICS format works better with ICAL and with Microsoft Outlook.
Leave a reply