webcalendar upcoming events list

I’ve been working on some basic integration of webcalendar and wordpress for the Guelph Students for Environmental Change site. It took a tiny bit of hacking, and I couldn’t find an answer anywhere else online, so I thought I’d post how I did it…

The idea I had was fairly simple – to have an online calendar where people in GSEC could login and add events, but that was publicly accessible to anyone visiting the site. Webcalendar seemed an obvious choice, but I also wanted an ‘Upcoming Events’ list on the home page. Webcalendar has some support for this, but the default upcoming.php spat out a complete html page, so the only way to integrate that to the site home page would have been with an iframe. Not ideal. The solution is quite simple, involving stripping all the superfluous html generation out of upcoming.php, so it just returns the definition list of events.

Here’s my version of upcoming.php

Instructions for use:

  1. If you’re using WebCalendar v0.9.45 (13 Dec 2004), the same version I customised, you should be able to download that file, rename it to remove the .txt extension, and drop it in as a replacement for upcoming.php. If you’re using a different version, who knows!
  2. On the page where you want the events list, add the following line, with the URI pointing to upcoming.php on your site:

    <?php include("http://example.com/webcalendar/upcoming.php"); ?>

This modification to the original Webcalendar file is released under the GNU GPL.

3 Responses to “webcalendar upcoming events list”

  1. Gravatar Image

    This is great! Works like a charm… Thanks!

  2. Gravatar Image

    And it still works fine after all these years. Thank you very much for the script.

  3. Gravatar Image

    I installed “time since” works great witout bugs thanks.

Leave a Response



XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



  • Search
  • Meta

  • Old Browser

    It seems you are using an old web browser (e.g. Internet Explorer 5 or below). This is a security risk to you, since Microsoft no longer releases updates for old versions of Internet Explorer. Also, note that this site is designed to modern internet standards, and the layout may appear strange or plain in older browsers. All the content is still accessible to you, but I strongly recommend you upgrade to a modern, safe, standards-complient browser, such as Firefox. For more information on getting the best experience surfing the web, see browsehappy.com.