Countdown 1.1 Update

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.


18 Responses to Countdown 1.1 Update

  1. Darrell Schulte 1969-12-31 19:00:00

    Works great Owen. Thanks for the tweaks.

  2. RaynerApe 1969-12-31 19:00:00

    Thanks fro me too, Owen. I just upgraded and all works fine.

  3. Rick T. from mid-atlantic-aroc.com 1969-12-31 19:00:00

    Thanks Owen - uda man!

  4. Keith Young from www.kyid.net 1969-12-31 19:00:00

    Hi Owen,

    I modified your original plugin to not parse comments in the dates.txt file. I posted about it here on my blog a while back.

    Not that it is a difficult code change, but if you are interested, I could run a diff on the files and send it to you if you want to add it in to the new version.

    Cheers,
    Keith.

  5. Owen from www.asymptomatic.net 1969-12-31 19:00:00

    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. :)

  6. Rick T. from mid-atlantic-aroc.com 1969-12-31 19:00:00

    Owen,

    I'm still not getting local time rollover. My date and time options in WordPress is 4 hours (from UTC), default date format (Fj,Y) and default time format (g:ia).

    Appreciate any ideas, thanks.

  7. Karl Bedingfield 1969-12-31 19:00:00

    Hi there,

    Great plug-in :)

    I am sure I am being pretty dumb here but here goes :)

    How do I show an event that happens every Thursday?

    I thoought I done this but it don't seem to work:

    thu all General Market. 8am - 4pm.

    Many thanks and keep up the good work.
    Karl

  8. Owen from www.asymptomatic.net 1969-12-31 19:00:00

    Karl:every week starting 2005-04-21

    Rick:
    I'm not sure why it's not rolling over. I'll look through my code again to see if there's something I overlooked. Of course, the difficulty is in waiting for the right time to roll around to test it... :)

  9. Karl Bedingfield 1969-12-31 19:00:00

    Hi Owen,

    Thanks for that :)

    Just one more date question! Is there a way I can show an event that occurs every 2nd and 4th saturday of the month?

    Thanks

  10. Darrell Schulte 1969-12-31 19:00:00

    Karl,

    I think if you put two events in the dates.txt file, it'll accomplish your goal.

    See Adding New Events

    2nd sat all This event occurs on the second Saturday of every month.
    4th sat all This event occurs on the fourth Saturday of every month.

    I don't think you can do it with a single entry though.

  11. Crow 1969-12-31 19:00:00

    I know I can give it a number to show, for example, the next five events coming up. Is there a way (or do you plan to include) a way to display all the events in a given time range. Would this be similar to the way to can show events from the past two weeks?

    Thanks!

    Crow

  12. Owen from www.asymptomatic.net 1969-12-31 19:00:00

    Hmm... I think this might be possible with a few changes. I'm not in development mode for new features on this plugin right now, but I'll keep a not of it here for the next iteration.

  13. Rick T. from mid-atlantic-aroc.com 1969-12-31 19:00:00

    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!

  14. Chris from chrisbunting.com 1969-12-31 19:00:00

    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.

  15. Olav from olav.vik.no 1969-12-31 19:00:00

    Hi, thanks for a great plugin.

    Having some problems localizing it into Norwegian though. Is there any way to do this, and if so, how?

  16. LHK 1969-12-31 19:00:00

    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?

  17. Owen from www.asymptomatic.net 1969-12-31 19:00:00

    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.

  18. Owen from www.asymptomatic.net 1969-12-31 19:00:00

    Please direct support and feature requests to the new support message board at RedAlt. Thanks!

1186