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 allwill 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.
Works great Owen. Thanks for the tweaks.
Thanks fro me too, Owen. I just upgraded and all works fine.
Thanks Owen - uda man!
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.
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. :)
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.
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
Karl:
every week starting 2005-04-21Rick:
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... :)
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
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.
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
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.
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!
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.
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?
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?
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.
Please direct support and feature requests to the new support message board at RedAlt. Thanks!