KB Plugins

The best Wordpress plugins are free

Print this post

KB Countdown Widget v3.1

A major change: You can now use iCal data (think Google Calendar) with the widget. When a date has passed, it disappears from the widget and gets replaced by the next one in line. How cool is that?

Download it here .

You can post support questions if you want. iCal parsing is done by the iCal Events plugin , so if you’re having trouble getting your calendar data to parse correctly, you might need to contact those folks instead.

Be aware that this new iCal feature is very new. Consider that aspect of the plugin beta. Please inform of me of any bugs.

33 comments »

1
at 5:56 pm on August 3, 2007 #

I am running 2.34 on WP 204 running 3K2

I installed plugin and setup in widget control of K2 but get warning

Warning: Missing argument 1 for widget_kbcountdown_control() in /home/bonnie/public_html/wp-content/plugins/kb-countdown-widget/kb_countdown.php on line 140

I tried 3.1 but got same warning but it mention line 688. So I figured it was becasue of rev of PHP and backed down to 234 but same result different code line. Please advise. Tanks… lots of Tanks

2
Thus saith Adam
at 6:00 pm on August 3, 2007 #

The problem is K2. The K2 folks claim that any widget can work in their module system, but they are wrong. Widgets that allow multiple instances (like this one does) often fail on K2. Sorry.

3
Ryan opines
at 8:03 pm on August 11, 2007 #

Hi, love the widget, but I’m having a strange problem. For some reason, the countdown is shown both in my sidebar AND at the top of each page (view the problem at [link]. Can you suggest where I may have a mistake?

Thanks,

Ryan

4
Ryan contributes
at 8:19 pm on August 11, 2007 #

Never mind, I figured it out. Thanks!

5
Ziyun writes
at 7:14 pm on August 28, 2007 #

Can the KB countdown widget track weeks? If so, how? This is most useful for pregnancy and baby’s age.

6
Thus saith Adam
at 10:07 am on September 3, 2007 #

Ziyun, all the available tags are listed in the FAQ. Total weeks is not one of them, although you could add this with a little tweaking on your own.

I try to limit the number of tags available to avoid straining people’s servers. Obviously, adding one additional tag wouldn’t be a major problem, but adding a whole bunch of them could be.

7
Silke says
at 10:25 am on September 21, 2007 #

Something I would dearly love to see is a Progress Meter that works like your Countdown demo.
Numbers instead of dates. :)
It would be a perfect Writer’s WIP tool and if you could modify it to work like that… that would just rock.

i.e. Title, Date started, Words written / Words total. With various bars like the countdown ones… man… I’d love it. :)

8
Thus saith Adam
at 9:52 am on September 22, 2007 #

Not quite sure I follow, Silke…

9
webdzinez thinks
at 8:09 pm on November 5, 2007 #

This is one of the best plugins I have come accross!

Is it compatible with WP 2.2.3? The download page on WP says its compatible with w2.2.1, just wanted to confirm!

10
Thus saith Adam
at 8:20 pm on November 5, 2007 #

I don’t know, since I use WPMU. Give it a whirl and let me know, and I’ll upload the WP.org info if it works.

11
Ivan thinks
at 11:35 pm on November 12, 2007 #

Seems there is some problem using this plugin with WP2.3.1 :(
When I changed the End Date(only), saving changes, then checking whether the widget had changed or not, it didn’t. The End Date remains 1-1…
Could you help me figure out what was wrong? Thanks.

12
Ivan says
at 11:50 pm on November 12, 2007 #

Oops, got the answer..
The PHP version of the server is 4.4.6..

13
Ivan exclaims
at 11:56 pm on November 12, 2007 #

Sorry for bothering again & again..
KB Countdown Widget 2.3.4 is still not working with WP 2.3.1…
The configuration cannot be changed..

14
Thus saith Adam
at 9:15 am on November 13, 2007 #

Are you sure it’s this widget, or is it all your widgets? I’ve seen several people over in the wp.org forums complaining that they can’t update any of their widgets after the upgrade.

15
Ivan adds
at 2:46 am on November 14, 2007 #

Some of them can, but some of them cannot..
The plugin “StatPress”, and the original widgets of Archives, recent comments, recent posts, can be changed, while categories widget and this plugin cannot…

16
Thus saith Adam
at 10:54 am on November 15, 2007 #

Regarding your switch down to 2.3.4 of the widget–I should update the documentation. That’s no longer necessary–I modified the most recent version of the widget so it ought to work on PHP 4. (You would have seen a “fatal error” otherwise when you were using the latest version.)

As for the problem at hand…

Hmm. I’m hoping they didn’t screw around with the widgets API (again) in the new version of WP. They’ve done that on almost every one of the recent upgrades to WP, forcing me to rewrite part of the code each time.

Could you do me a quick favor? Try to change the widget. After hitting “save” on your widget’s admin, take a look at the HTML source. (In IE, I think you look at the “View” menu, then “Source.” In Firefox, it’s “View” then “Page Source.”) Look at the very end of the source. If the last few lines contain something that looks like an error message, then let me know.

That’s what happened last time they changed the widgets API with a WP upgrade–there was a PHP error that showed up in the source but wasn’t visible in the browser.

17
Mike remarks
at 3:55 am on December 4, 2007 #

Hi Adam,
Great work!
I have a little problem with multi date.
I would like to get two differnt events display with different dates
for example queen at 16 december 2007 an rolling stones on 17 december 2007
how can i do that.
Maybe stupid question didnt found the answer in google
Thx
Mike

18
Thus saith Adam
at 9:16 am on December 4, 2007 #

Mike,

The easy way is to use two separate countdown widgets, one for each event. Scroll down to the bottom of your widgets administration and you’ll see an option to increase the number of countdown widgets available.

The slightly more difficult way is to use an ical feed. That’s what the “multi-date” mode refers to in the widget. But for what you’re trying to do, it sounds like it would be easier to just use two widgets, both in single-date mode.

19
Mike contributes
at 3:39 am on December 5, 2007 #

Thank you for the quick answer Adam for the information.
I used the separate countdown widgets like you said.
Is it possible to link countdown with an event callender where you fill in the event and date and it automaticly come in countdown.
And thx again for the great widget.
Will make an article about your widget soon.

20
Thus saith Adam
at 8:38 am on December 5, 2007 #

Mike: “Is it possible to link countdown with an event callender where you fill in the event and date and it automaticly come in countdown.”

Yes, you can do that, but only if you have your dates entered into a calendar with an ical feed (think Google Calendar, which is free and easy to use, although there are also non-google options available).

You can read more in the FAQ under “Can I Enter in Multiple Dates?”

21
Mike proclaims
at 4:00 am on December 13, 2007 #

Hi Adam, me again ;)
Can i put somewhere htmlcode or php code to the countdown so i can add a link at the bottom of it. For example to sell tickets.
Here is a link to my site: [link]
It’s a great widget, code for my blog.
Love it.
Mike

22
Mike contributes
at 4:19 am on December 13, 2007 #

ok Adam i found the problem php didnt work for me, but html with simple the code with declareration of worked fine:
Keep up the good work

23
ovidiu comments
at 5:29 am on December 13, 2007 #

hi there, I am trying to get kb countdown 3.1 working with wp 2.3.1 but not using widgets, instead I use sidebar modules [link]

and I get the following error:

Warning: Missing argument 1 for widget_kbcountdown_control() in /var/www/web6/web/wordpress/wp-content/plugins/kb-countdown-widget/kb_countdown.php on line 688

can you maybe help me out with this? sidebar modules is a lot better and more flexiblen than the usual widgets…

24
Thus saith Adam
at 9:42 am on December 13, 2007 #

@Mike: Glad you got it.

@ovidiu: I only support the widget with the standard interface, but here’s a suggestion that will probably get it working for you pretty quickly with something sidebar modules:

Near the end of the code, you’ll find a bunch of calls to register_sidebar_widget() and similarly-named functions. You’ll also notice that I do a bunch of version checks in that part of the code to figure out which version of WP you’re on. The WP/Automattic folks kept changing the widgets API for awhile, so I kept needing to change how widgets are registered for each version of WP.

I suspect you can fix the problem by fiddling with which version of the registration functions get used. I’m not sure how good you are with PHP, but all you need to do is comment out one block of registration functions, then try the next block, and so on, until you find one that works.

25
ovidiu thinks
at 11:55 pm on December 13, 2007 #

@adam
thx. I cannot create anything with PHP, but I am pretty good at altering stuff ;-)
I’ll have a look later on what I can do…

26
Tony contributes
at 1:37 pm on March 31, 2008 #

I’ve found an error in your total days since/until calculation: 84600 should be 86400 on line 290 in the calculate function (where you convert seconds to days).
60×60x24 = 86400 not 84600

27
Thus saith Adam
at 3:15 pm on March 31, 2008 #

Thanks for catching that Tony. That’s only a 30 minute difference, so it shouldn’t be causing major problems. It will be fixed in the next update.

28
MarkyGee comments
at 11:58 pm on April 7, 2008 #

Hi - I must admit that I am new to using plugins but was hoping to get the KB Countdown one working. Installed it OK. Activated it OK. In the Design->widgets menu, I added it to Sidebar1 but am unable to enter any details. When I try to edit, the majority of the page is obscured by the list of available widgets. I can see the details of the editable fields by moving the widget around by it’s title bar but can’t enter anything. I am on WordPress 2.5 and PHP 5.2.5.

Any help appreciated.

Cheers

Mark

29
Thus saith Adam
at 11:07 am on April 8, 2008 #

MarkyGee,

When testing in WP 2.5, I noticed that errors similar to what you describe would sometimes arise when I added a new countdown widget to the sidebar. But if I clicked “save changes” (without editing the widget’s options first), then came back to the widgets menu and tried to open the widget’s options, it generally worked at that point.

30
MarkyGee contributes
at 6:20 am on April 9, 2008 #

Hi Adam, My Home PC seemed to be OK with this. The difference between the Home PC and my work laptop is that the laptop only has IE6 installed and I’m using IE7 at home.
Having just tried it out with Safari, this seems fine too. it may just be something to do with IE6. Any thoughts?

Mark

31
ronald thinks
at 1:11 am on April 20, 2008 #

Hi, thanks for the widget, but is there also an option NOT to use the bargraph? I tried setting all pixelsizes to 0, but the widget restores them automatically to 10,1,1.

32
Robert adds
at 9:51 am on May 4, 2008 #

Hello Adam,

First off; excellent work with this widget! I’ve installed it a couple of minutes ago on my WP 2.5 site and it’s working perfectly.
I have however one question as asked earlier; is it possible for you to add weeks_since / weeks_until into it?
Not hindered by my sincere lack of PHP knowledge, I’ve had a play around but can’t seem to get it working (I managed to delay the pregnancy to a due date of 16 years and 7 months … I wish! :P)
Or any hints/tips would be much appreciated as well

Robert

33
steo exclaims
at 10:16 am on May 9, 2008 #

Hi Adam,
Thanks for this usefull and nice plugin.
I have a question for you regarding the language in the message.
I try to change it in the list you give at the begining of the script (# translation from English, if desired) but can’t work.
Can you explain me if I need to change something else ?

Leave a comment

Comment Guidelines
  • Yes, your comments will be visible to everybody. (Unless you use the private contact form.)
  • Allowed HTML: <a> <b> <blockquote> <cite> <code> <em> <i> <strong>
  • Code: Put code in `backticks` (above your "Tab" key) or it won't display well
  • Gravatars: To override the default image by your comment, use a gravatar
  • Links: If you include more than one link, your comment will go into the spam queue

Please read before commenting: Because my real job has me swamped at the moment, I am not supporting my plugins at this time. Sorry. This may last several weeks.

If you have a bug report, feature request, or other general feedback about a plugin, please leave a comment—but do not expect an immediate response. If you are requesting help, though, please check the plugin's documentation thoroughly rather than ask your question as a comment.

Thank you for your understanding.