1 (edited by Neck 2008-12-15 12:10)

Topic: [Release] Countdown (v0.2.1)

Countdown extension for PunBB 1.3
This extension let you display a countdown to a date in the annoucement.


Countdown 0.2.1


Installation:
Download the zip and extract it in your PunBB's extensions folder, then access administration and launch install.

Upgrade:
Replace content of ek_countdown folder (in extensions) with the one of the last version's zip, then launch upgrade in administration.


Use:
Simply put the following code in the announcement:

<span class="ek_countdown">01/01/2009 00:00 UTC</span>

It will be replaced by a countdown to the specified date.

Advanced:
You can pass additional parameters in the title attribute of the span:

<span class="ek_countdown" title="refresh:s|txtWhile: in #{cd}|date:12/29/2008 04:00 UTC">the 29th December !</span>

Available parameters are (bold is the default value):

  • refresh:m or s
    If the countdown is refreshed every second or minute.

  • txtWhile:#{cd}
    The text used while the countdown run, #{cd} is replaced by the value.

  • txtAfter:
    The text used once the date is passed, by default the span content is displayed.

  • date:
    If specified the date given is used rather than the span's content



Notes:
Without javascript enabled the visitors will see span's content.

Licensed under GPL.


HowTo...
...translate
Copy ek_countdown/media/js/lang/English.js and name it according to the language you want. Then open it in a text editor and replace the sentences on right by the translated ones.
If your text contains single quotes ( ' ) or backslashes ( \ ) you must add an additional backslash before ( \' or \\ ).
Feel free to send me your work at nk.punbb at eikylon.net (include your name and website/email for credits).


Old versions:
Countdown 0.2.0

Re: [Release] Countdown (v0.2.1)

I love it.  This is a perfect tool for giving motion and a sense of urgent anticipation to an announced important date.  Good call.

3 (edited by Neck 2008-12-15 12:11)

Re: [Release] Countdown (v0.2.1)

New version:
fixed a bug that would trigger if the date was already passed when the page is loaded.

@whatrevolution: thanks smile