Google Calendar Events, 0.7 Beta

0.6 has been out for a while, long enough for a couple of bugs to appear! I expected a few, as a lot of code was changed in the last release. Also, my to-do list has been gradually filling up with lots of suggestions for little enhancements here and there. So, I’m going to combine these fixes and enhancements into a new version, 0.7.


Bugs

Here’s a list of the bugs that 0.7 will (hopefully!) address:

  • Timezone issues: The last release introduced a bug that causes times / dates to be displayed in UTC, regardless of the ‘Timezone adjustment’ setting. This can be worked around by ensuring that the WordPress timezone (Settings > General) is set to a city and not a UTC+/- offset, but that’s hardly an ideal solution. This also affects the [if-now], [if-started] and similar event display builder shortcodes. Some general faffing with date functions should have fixed this
  • [link-path] shortcode: This shortcode isn’t behaving correctly. It has been changed to [url] to fix this
  • Opera CSS issue: There is a stray content:none is the CSS. I can’t remember why it’s there, but it certainly shouldn’t be! It causes an odd bug in Opera, preventing page lists from appearing. I’ve removed it

Enhancements

The enhancements 0.7 will incorporate:

  • Descending order: The order of events in lists can be changed from ascending to descending, which is useful for lists of past events
  • [event-id] and [cal-id] shortcodes: These allow you to output the unique IDs that Google assigns to events and calendars. They’re useful for constructing links to iCal feeds, for the whole calendar or just individual events
  • CSS classes: The plugin will now add gce-day-past and gce-day-future classes to calendar grid cells, so you can style them differently. Also, depending on whether ‘today’ has some events, either gce-today-has-events or gce-today-no-events will be added (in addition to gce-today)
  • offset parameter: There’s a new offset parameter for the date / time event display builder shortcodes. This allows you to adjust the date / time (by a number of seconds) before it is displayed. This is most useful currently for changing the end date of all day events, so that they appear to end on the ‘correct’ day. It’s used like this: [end-date offset="-1"]
  • autolink parameter: URLs in the description field are currently automatically made into links. This is still the case by default, but can now be disabled with: [description autolink="false"]
  • Tidier CSS: There are a few !important declarations in the CSS, which makes overriding certain things difficult and is pretty bad practice. These have been removed. There’s a new general option that allows you to continue to include the ‘old’ CSS stuff, so that existing layouts don’t go wonky

I think that’s it. I might add a couple of other bits and bobs before release if I get chance. I’ll properly document all this stuff when 0.7 is released.


Also, I’m gradually going through the code and ensuring it conforms to the WordPress coding standards, so there may be a little inconsistency in coding style in various places at the moment. Sorry about that if you’re reading the source!

I’d really appreciate some feedback on any of the various bug fixes and enhancements. Testing the timezone stuff would be especially helpful. If anyone could test and give feedback on the following, that would be great:

  • The WordPress timezone should no longer have any effect on the display of dates / times
  • The WordPress timezone should have an effect on stuff that requires the current time as a reference, such as some event display builder shortcodes (below), but it should no longer matter whether it is set to a city or a UTC+/- offset
  • The ‘Timezone adjustment’ option in the feed settings should work correctly
  • The following event display builder shortcodes should work properly and be accurate:
    • [if-now]
    • [if-not-now]
    • [if-started]
    • [if-not-started]
    • [if-ended]
    • [if-not-ended]
    • [start-human]
    • [end-human]

To test the beta, please download the development version of the plugin. Leave comments below, or on the plugin homepage. You can send me an email too, if you like. Thanks!

9 Responses

  1. Hey! Great work – While configuring our calendar I noticed the time bug so I installed the Dev version that fixed it. Thank you for the ongoing development! I’ll keep my eyes open for other un-reported issues. I think this will work quite nicely for us.

    Thanks again!

    Reply
  2. i use the google calendar and it has really saved me from moments of sheer embarrassment,, i even once forgot the birthday of my gf but thanks heavens,,, i got the email in time,, thanks to google calendar :) the new enhancements though looks real great

    Reply
  3. Great! I’m checked the beta version, new functionality (descending/ascending) especially – I see, that is avaliable only in the widget’s option. How can I use this enhancement if I want to put calendar list to the post? Any shortcodes is available?

    Reply
  4. Hi Ross,

    Thanks for the time zone fix!!

    Another question for you. Is there a way to customize the date in the title? For instance I would like to display the day name such as “Events on Saturday, July 16, 2011″.

    Thanks,
    Greg

    Reply

Leave a Reply