WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

KB Countdown Widget

Displays years/months/days since, until, or between events. Great for tracking a pregnancy (with a bar graph!), time until an election, or whatever. U

It doesn't work!!

As of v3.0 of the plugin, you MUST be running PHP 5 or higher. If you are using PHP 4 (or older), you need to use v2.3.4 of the plugin. You can get this older version at the download page.

What code do I need to place in my sidebar?

None, this is a widget. If you are using pre-WP v2.2, you'll need to have WP the sidebar widgets plugin running. You also need to be using a widgetized theme. You can control all options for KB Countdown from the widgets administration menu.

If you want to use this plugin in a post/page or in your template somewhere, look in kb_countdown.php for instructions.

Do I need to specify both a start and an end date?

No. You need to specify only a start date or an end date. But if you want to have a bargraph, you need to specify both.

What happens if I give the program an invalid date?

If your start date hasn't happened yet or your end date has already passed, PERCENT_DONE will return 0 or 100 (respectively) and TIME_SINCE/TIME_UNTIL will say "0 days."

Exactly what tags can I include in my message?

  • Standard tags you can use: TIME_UNTIL, TIME_SINCE, PERCENT_DONE, BARGRAPH. The latter two require that you specify both a start and an end date.
  • Additional tags for power users: YEARS_UNTIL, YEARS_SINCE, MONTHS_UNTIL, MONTHS_SINCE, DAYS_UNTIL, DAYS_SINCE.
  • A note about the additional tags for power users. If your event is 1 year, 2 months, and 4 days away, then DAYS_UNTIL will return 4, MONTHS_UNTIL returns 2, and YEARS_UNTIL returns 1. Note that DAYS_UNTIL will not return 429 (or whatever it is); use TOTAL_DAYS_UNTIL or TOTAL_DAYS_SINCE instead.
  • In most cases, you'll do better sticking with the four standard tags, not the additional tags for power users. Why? Because TIME_UNTIL and TIME_SINCE will make "year," "month," and "day" plural or singular as needed. Also, these two standard tags will drop the "years" bit entirely if it's less than one year until/since your date. But you might want the additional tags if you're using a language with unusual singular/low-plural/high-plural grammar, like Russian, or if you don't want words to follow the numbers immediately.

How do I change the colors in the bargraph?

Override the default bargraph colors using the same red-green-blue system employed in CSS files, with one change. Instead of writing in hex (e.g. #ff00ff) write numerals between 0 and 255, separated by commas without spaces (e.g. 255,0,255). Even if you aren't familiar with this system, you can probably find colors that you like by just tinkering with the numbers. The first number gives you more red, the second is green, the third is blue. Red, for example, will be 255,0,0. And for gray, set all three numbers equal (e.g. 100,100,100).

The program isn't finding the bargraph URI correctly

You may override this manually. Look at the top of the kb_countdown.php file for a setting.

Can I Enter in Multiple Dates?

Only if you use an iCal file. Read on...

Can I use an iCal file?

Absolutely, as of version 3.1 of the plugin. You will also need the iCal Events plugin installed and activated, since it does the iCal processing. From the widget's control panel, look for a button that says "multi-date mode."

In iCal mode, you can only count down (using the _UNTIL tags), not up (with the _SINCE tags), and you can't use any bargraphs.

In addition to the counting tags discussed above, you can also use the following event tags: SUMMARY, DESCRIPTION, LOCATION, MONTH, DATE, YEAR. These tags will be replaced with corresponding information from the iCal file. Usually, SUMMARY is the event's title. An example of what you could write in the "message" box:

SUMMARY (MONTH-DATE-YEAR) will happen in TIME_UNTIL.

Which might produce something like this:

Halloween (10-31-2007) will happen in 4 months and 7 days.

Fiddle around with it, you'll figure it out.

My iCal file isn't being read right

Contact the iCal Events plugin people.

I have a question that isn't addressed here.

You may ask questions by posting a comment to the KB Countdown plugin page.

Support

Be advised: If you post your support questions as comments below, I probably won't see them. If the FAQs don't answer your question, you can post support questions at the KB Countdown plugin page on my site.

Requires: 2.0 or higher
Compatible up to: 2.5
Last Updated: 2008-3-31
Downloads: 35,102

Ratings

3 stars
3.5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
100,1,1
50,2,1
75,4,3
50,2,1
0,3,0
100,1,1