I made some updates to my Countdown plugin. This plugin lets you easily maintain a "Dates To Remember" countdown in your sidebar.

Changes are mostly minor bugfixes, but could have a significant impact on your date display. Here's a short list:

  • Dates set like 1st sat all will now correctly fall on the following month (as opposed to December) when the date has passed for the current month.
  • When Countdown displays the number of days to go until an event, it will say "Today", "1 day", or "X days", respecting plurality.
  • You can specify %nocountdown% in an event name to display only the date and not a countdown for that event.
  • Code to display today's events should now correctly display all of today's events.
  • Dates are converted from GMT using the WordPress GMT settings.
  • The gettime() function call is now officially fixed.

I also added the Philadelphia WordPress Meetup date to the dates.txt file, and updated the readme.txt with info about the %nocountdown% flag.

You can find the new Countdown 1.1 download on the hacks page.

Comments

Comment by Owen on .
Owen
The new version doesn't parse comments either. It only parses lines that match the regular expression. This is a new thing, and was fixed because it was causing problems with the new flag system. Thanks for the offer of code, though. I'm not sure if you have trackbacks/pingbacks on, but I never noticed your post. Had I, I might have asked you for your changes earlier. :)
Comment by Rick T. on .
Rick T.
Owen, Nevermind about the time problem - I finally realized that my WP setting should have been -4 hours, not 4 hours. I did not input the original offset, so I assumed the the WP set-up knew what it was doing when it defaulted a 4 hr offset! Turns out the offset amount was right, but -4 and not +4. Thanks again!
Comment by Chris on .
Chris
Owen, I just wanted to leave a note to say thanks for this truly wonderful plugin. I, too, have tweaked the code slightly to better the fit within my site, but I'm greatly appreciative of your hard work. I did want to suggest a possible future enhancement. I noticed that you mentioned not being in "development mode", so this can be an idea for you at a later time, or for anyone else interested in this suggestion. I would like to see XMLHttpRequest() integrated to create a "live" plugin that could allow individuals to scroll through the dates to look beyond the timeframe set by the webmaster. Of course, the plugin would also allow for cycling backwards through the dates. I'm going to attempt to hack something together myself, but being an amateur with web design and coding, I may or may not accomplish this feat. ;) Thanks again for your donation to the WordPress community.
Comment by LHK on .
LHK
Hi there, Great plugin, but I need to localize the date format, as the blog is German. So, instead of an output like "Aug. 27" I'd need something like either "27.08." or "27. Aug" (with months localized as Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez). I'd prefer the first solution. The date format is localized in WP Options, but this doesn't reflect in your plugin. So how would I go about achieving that different date format?
Comment by Owen on .
Owen
In the countdown file, look for the two lines that say: $date_format = 'M. j'; Change the 'M. j' to 'd.m.' on both of these lines and the date August 27th will appear as "27.08." This is obviously something that the plugin could do better. There was another thing I wanted to improve, too; A new scheduling method. I'll have to think on that, and aybe I'll provide an update.