Learn about DokuWiki
Learn about DokuWiki
This is an old revision of the document!
Compatible with DokuWiki
No compatibility info given!
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
The Countdown Plugin shows a countdown to a specific (target) date.
Under new management since June 11, 2009.
Previously maintained by Ekkart Kleinod (since version 2.x).
Based on even earlier work by Ron Peters (version 1.0).
Which was itself a modified version of the nucleuswiki plugin by Trent Adams and Edmond Hui
Important: version 2.x is not compatible with version 1.0 (syntax change of date)
Due to changes in my homepage backend I no longer develop this plugin. I will host the plugin until a new maintainer is found. Please contact me if a new maintainer takes over the development.
Hi, Ekkart. I've already mailed you asking to take over the development. But of course you might want to wait JIC someone else applies too. Kind regards. — Luis Machuca B. 2009/05/26 06:09Hi Luis, sorry for not answering, I'm afraid, your mail was put into the spam folder. It's okay for me if you develop the plugin further. All files are in the zip archive. Regards, Ekkart.Thanks, Ekkart. As of June 11, 2009, I'm taking over the development of this plugin. As a first task I've implemented a demo and download page, and I'll start implementing the feature requests soon, starting with the language files. Anyone interested in contributing their language can send me patches as per Internationalisation. Thanks. – — Luis Machuca B. 2009/06/12 06:30
With this plugin you can insert a countdown into your page where it will display the number of days, and optionally hours and minutes, until or since the text that you include.
The format is:
This will be replaced with either
XX days [HH:MM] until description XX days [HH:MM] since description
[HH:MM] part is optional)
<COUNTDOWN:mm/dd/yyyy|day to remember> <COUNTDOWN:dd.mm.yyyy|Ereignis>
Download and install the plugin using the Plugin Manager using the above link which always points to the latest version. As of the date of September 2010, that is the version
2.5rc, with a 2.5 final planned for ends 2010.
If you are using a previous version of the plugin, it is recommended that you uninstall the previous version before installing the RC.
Download links for previous version:
Refer to Plugins on how to install plugins manually.
(Neo) Demo Site. The site is in Spanish, but usage should be pretty obvious and language is neutral enough that even Google Translator shall do fine. An English demo page will be made available for the next release of the plugin.
Examples of use and more information can be found on ekkart.de.
| The output of the
Mayan “End of Days” (
The plugin is configurable in some ways since version 2.0.
There are three parameters that are configurable, via either
local.php or the Configuration Manager:
Visibility of Countdown Date:
include_date is a Boolean that determines whether to show (
true) or not (
false) the target date in the output.
$conf['include_date'] = false;
XX days until description
$conf['include_date'] = true;
XX days until description (mm/dd/yyyy)
Short for for Today:
use_today is a Boolean that determines whether to switch the output of the countdown to the short, simple form “Today” if the countdown date is today (
$conf['use_today'] = true;
Today is description
Display hours and minutes:
with_hours is a Boolean that determines whether to show hours and minutes as well as days in the output (
true). It defaults to
false to maintain output compatibility with previous versions of the plugin.
$conf['with_hours'] = true;
XX days HH:MM until description (mm/dd/yyyy)
The output format of the date can be set in file
lang/xx/lang.php where xx stands for your preferred language.
This file contains the language dependent texts too.
Feel free to edit these files or create new ones for your language.
If you want your language file to be integrated into the plugin, please send them to me.
Please tag your email subject with [countdown].
The following languages are included:
Does this plugin work properly with leap years?
Yes it does — Geoffrey Roberts 2008-02-02 12:23
There is a small bug with the plugin. Basically it miscounts the number of days as it does not round hours correctly. This can be fixed by replacing:
ceilfor the new version 2.0. This works for me, can someone please confirm my results? Thanks, EK.
ceildoes the trick, even without abs()
How about <COUNTDOWN:mm/dd/yyyy&date|day to remember> or <COUNTDOWN:mm/dd/yyyy&nodate|day to remember> that can override the default config option?
Sounds good, depends on how much time I have these days. EK.
Is it possible to change the date input syntax to dd/mm/yyyy (for the UK) rather than mm/dd/yyyy? This would be much appreciated :)
And a french version too! if you find time for this…
XX jours avant
Just wanted people above to know that I have received two language packs for internationalization, and I'm working on a third of my own. With this and an attempt I'll make to incorporate the “business days” suggestion above, a new release will be ready by end of December 2009. — ryan.chappelle 2009/11/29 01:13
Done: version 2.5rc is now available. — ryan.chappelle 2009/12/21 19:56
Request: Add conditional formatting - e.g different hues from green to red, as deadline approaches? Or maybe just declare when up to e.g. 4 dates + the absolute deadline. for each date → new color. After deadline text becomes bold
Sounds interesting. I'll lift some code from a similar plugin at MediaWiki that seems to be capable of being formatted any way one wants, and check from there. — Luis 2010/06/03 21:01
Hi, is this an error? I´ve set the date to 8.9.2010 00:00 now is 07.09.2010 15:00 and the timer show 1 Day 09:00 but the event is in 9 houers. Is it posibel to show only the houers left if the event ist under 1 day away? I used this but i disable php on my wiki:
<php> $timestamp = time(); $event = mktime(0,1,0,1,22,2010); $day = ($event - $timestamp) / (60*60*24); $houers = ($event - $timestamp) / (60*60); $day= floor($day); $houers = (($event - $timestamp - ($tage * 24*60*60)) / (60*60)); $houers= round($houers, 1); echo $day," day ",$houers," houers left. "; </php>