Heal Your Church WebSite

Teaching, rebuking, correcting & training in righteous web design.

Calendar of Events

Forgive the ‘pure geek’ nature of today’s post. I’ve been doing alot of late-night work Programming the Perl DBI to import a comma delimited file from the calendar associted with MS Outlook. People were complaining that the ‘old Redland Site’ was looking even more dated because I neglected to update the Calendar of Events with the re-write and all.

That said, it is not time wasted as most of the code will find its way into taking the same comma separated file from our Church Office and pushing into a MySQL table. Then pushing it back into HTML. Why this way and not some XML/XHTML coolness? Why the two-step process? Time. Actually Date and Time. The data came to me categorized by event description, not date/time – the database takes care of that for me w/out entering hash hell. Moreover, I can now ‘cron‘ a job to dump the data on a regular basis to keep the calendar looking fresh … so long as we have future dates in the database.

Since the import will occur with less frequency – that is, since the comma separated file will usually occur on a quarterly basis – and since I want to generate an up-to-date calendar for the current month, plus a week on either side of that, it makes sense to two-step this process. Even more sense to only cron the second part of the job – page generation. Good thing the old site uses server side includes for the ‘body’ of the text – in this case the actual dates!

Here are a few more links I found useful … and don’t worry, as always, I’ll post the code a bit later this week.”

As I think on it, I’ll probably cron the job late Sunday/early Monday nights – 0 1 * * 1 – and since Christmas is coming, better include ALL of December. Yet another convenience of using a database in this situation. The code change is minimal – and could be data-driven if I really wanted to be slick.

One Comment

  1. Regarding: putting a calendar on the church website:

    The church administrator maintains several calendars in Microsoft Outlook. I am experimenting with two open source programs (Outlook2VCal
    and outlook2ical
    http://www2.et.byu.edu/~njones/share/outlook2ical/ ) and a $10 commercial program (Outlook2Mac
    http://www.littlemachines.com/help.html ) to convert Microsoft Outlook calendars into industry standard calendar data files called vcal or ics files. Supposedly I can then ftp these vcal or ics fils onto any PHP enabled webserver (no Webdav required). Next, the open source PHP iCalendar, which just came out in version 2 is installed on the web server. It allows the website visitor to select weekly, monthly, yearly and daily views. It will serve up printer-friendly views. A visitor can select individual calendars (children’s religious education, sunday services, adult classes) or select “all combined” to get a comprehensive calendar. The visitor can even to subscribe to a calendar with an RSS feed.

    Googling on PHP iCalendar brings up quite a few calendars most of which are the default colors. Some, however, evidence a careful attention to branding and customization.

    Thought I’d email you and let you know, and then when I get things sorted out I can let you know that too. Might make for an interesting follow-up to your article about putting your calendar on your church website.

    - Dan Ashley