Printable Version of Topic
Click here to view this topic in its original format
Celtic Radio Community > Tutorials > Add a Count Down to your post!


Posted by: Paul MacArthur On: 2003-08-30 20:47:14
A popular feature that is gaining interest on many websites today is a countdown script.

At CelticRadio.net we have made it easy for your to include your own countdown script without the need of any programming skills!

The [COUNTDOWN] tag lets you initiate a countdown to a specific date. It displays the number of days, hours, and minutes to the "event" and also an optional description.

You may not only use the [countdown] tag in posts, but also in Topic titles and descriptions and news.

SYNTAX:
[COUNTDOWN=day,month,year,description(optional),DHM optional flags)]
Example: [COUNTDOWN=26,08,2004,I get married,DH]

In posts this will displayed as: (today is 02/05-2003)

There are 481 days and 13 hours left until I get married.

If you put the same TAG in the Topic Title it would display like this (now the time is 2 minutes later):
481 days, 13 hours left

The reason for this shorter version in Topic Titles is to avoid them becoming too long! Also the error message for an invalid [COUNTDOWN] tag is shorter in Topic Titles.

If no description is entered into the tag:
Example: [COUNTDOWN=26,08,2004]

The shorter version is also shown in posts:
481 days, 13 hours and 1 minute left

When the Event has reached the target day, this is shown:
The countdown has stopped! The event occures today!

If a description is entered into the tag, this is shown:
The countdown for "moon is crashing down" has stopped! The event occurs today!

If that happened yesterday, this would be shown:
The countdown for "moon is crashing down" has stopped! The event took place yesterday!

If it happened 85 days ago, this would be shown:
The countdown for "moon is crashing down" has stopped! The event took place 85 days ago!

The flags: DHM, is used for customizing the displayed time values:
If you have a D, then only days are shown, if you add a H after the D you also get the hours... M is for minutes, but if you add the whole DHM, you get the same result as if you didn't add anything...

Also, if you enter the FLAGS into the description field like this example:
[COUNTDOWN=26,08,2004,D] it will treat the D as a flag and only display the days:
481 days left

We have also included COUNTDOWN button when you post your posts! This countdown button when pressed will prompt you for the information needed thereby making it easier to use the COUNTDOWN tag!