Welcome, visitor! Log in
 

KB Plugins blog

The best Wordpress plugins are free

KB Countdown v3.0

Completely rewritten using PHP 5 objects. This doesn’t change much for you if you use it as a widget as far as appearance goes, although it should run more efficiently now (i.e. faster). From a developer’s perspective, it’s now going to be MUCH easier to use in template files, or to reference it from another plugin.

If you aren’t using PHP 5, do not upgrade to v3.0 of the plugin. Stick with v2.3.4 at most. Version 3.0 of the plugin will not work if you aren’t using PHP 5.

Note that further development will occur exclusively within the v3+ branch of the plugin. So if you aren’t using PHP 5, why not upgrade now? Your system will only get more obsolete over time…

Download here .

Dazzled? Confused? Disagree? Write a comment »
There have been 14 comments so far.

14 Comments

  1. Posted July 12, 2007 at 1:25 am | Permalink

    Hi Adam,

    I appreciate your making and sharing this plugin. It works fine for me, but I have one annoyance with it. Everytime I do anything to any widget in the WordPress > Presentation > Widgets admin screen, your widget puts:

    It happened TIME_SINCE ago. It will happen in TIME_UNTIL.BARGRAPH

    back in. In other words, everytime I make any changes to any widget, I have to go to yours to take out this line, or I’ll get it below my China trip countdown.

    Is there any way to block the default from coming back?

    Thanks,

    Scott

  2. Posted July 14, 2007 at 12:10 pm | Permalink

    Scott,

    That shouldn’t happen, must be a bug. But I’m away from my regular computer and will be for a while, so it will probably be a couple weeks until I can look into it–sorry.

  3. Posted July 26, 2007 at 8:22 am | Permalink

    Scott, What version of WP, PHP, etc are you using?

  4. Posted July 28, 2007 at 5:44 am | Permalink

    Hi Adam,

    I’m using: WP 2.2.1 and PHP 4.4.6 I don’t know what else you need.

    I set up WP on bluehost.com, using fantastico, if that helps.

    Thanks for your attention,

    Scott

  5. Posted July 29, 2007 at 11:40 am | Permalink

    I have found a little bug in your plug-in…
    If one of the message for the widget starts with one of the keyword (like BARGRAPH), the bar was not displayed. This is because strpos (in the function “needed” of your plug-in) returns 0, which is the same value as FALSE.
    There is a trick that work with PHP 4 and above, it is to use the operator === or !==. So the code for needed should be:

    [Adam's note: this code was lengthy; removed for length]

    Nice plug-in anyway :)

  6. Posted July 29, 2007 at 11:41 am | Permalink

    Oops, of course remove the “echo” I have added, they were for debugging… ;-)

  7. Posted July 29, 2007 at 12:44 pm | Permalink

    ??!!?? I do not understand why one of my comment did not appear…
    :-(

    So I was telling that you had a bug in the use of strpos in the function “needed”.
    Basically if the message starts with one of the keyword, strpos will report 0. With the test in the function, this will evaluate as FALSE.
    Thus, if you have a message equal to “BARGRAPH” (without the double quotes), nothing will be displayed by the widget.

    PHP (since release 4) offers the === !== operators to test that the returned has the same type or not.
    So if strpos returns FALSE, and you use === FALSE, the test will be OK. If strpos returns 0 and you use === FALSE, it will consider 0 and FALSE different.

    I have thus corrected your function, see below:

    [Thanks Huygens. I cut out the rest because it was quite long.]

  8. Posted July 29, 2007 at 8:41 pm | Permalink

    Huygens-

    Your first try was picked up by Akismet for some reason and marked as spam. Thanks for catching my typo. The current version of the plugin is a complete rewrite–I converted the whole plugin to an object-oriented framework, so I’m sure that there are still other small bugs like this in there that will turn up. I’ll update the source code soon.

    Scott-

    from a quick glance at your website, I think I know what the problem is. You are using only the widget title, not the body. The plugin checks for body text and inserts the default text if it is blank. I’ll need to update the code to check both the title and the body, and insert the default only if BOTH are blank. Sorry about the bug. It may be a couple days until I make the change.

  9. Posted July 30, 2007 at 11:12 am | Permalink

    Scott and Huygens: Fixed and uploaded to wordpress.org.

  10. Posted August 1, 2007 at 7:48 pm | Permalink

    That did it! Thanks a lot, Adam.

  11. anji (Unregistered)
    Posted September 21, 2007 at 10:21 pm | Permalink

    Hi :) nice work! I have tried a few of your plugins and they all work great but when I set up a countdown on my site and for some reason the progress bar isn’t working. any thoughts? WP2.2.2 Thanks

  12. Posted September 22, 2007 at 9:46 am | Permalink

    anji:

    If you’re getting a broken image, then go into the plugin and tell it where the image file is (there’s a setting near the top). The plugin tries to find the image file itself, but sometimes it doesn’t.

    If you’re not seeing anything, then make sure you have both a start and an end date, and we are currently between them.

  13. Posted September 1, 2010 at 9:37 pm | Permalink

    Hello,

    Sorry to bother you but this plugin used to have a really great instruction page that no longer seems to be available. All the instructions I can find now are for coders who already understand most of the lingo.

    I was able to get the plugin to work really well before. Why is it now, that it’s so hard to find any basic instructions? Did they just get erased by accident or neglected, perhaps?

    Since the majority of people download this plugin from within wordpres, like me, we don’t have access to kb_countdown.php unless we open additional programs and ftp files and move them or open them in goofy text readers.

    It used to be SOOO easy. What happened?

    Is there an instructions page any more? Can you help with that?

    Thank you. It was such a cool plugin before – I hope I can still use it.

  14. Posted September 2, 2010 at 7:07 am | Permalink

    What happened is that wordpress changed but the plugin didn’t. Some features of the plugin no longer work, like the “help” tab, because of changes that the WP team made to the admin screens. At this time I have no intention of updating the plugin. But you’re welcome to take a crack at it if you want.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Guidelines
  • Yes, your comments will be visible to everybody. You can disagree, but civilly.
  • I have the right to delete abusive comments.
  • Allowed HTML: <a> <b> <blockquote> <cite> <code> <em> <i> <strong>
  • 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 I am now employed and not just a student, I provide only minimal support for my plugins. Sorry.

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.