enfrdeitptrues
Advertising

Counter

{Counter counter_type="enum" countdown="boolean" countdown_message="string" init_value="integer" date_time="time" counter_interval="float"/}

Displays a flipping counter or clock on you page.

You can display a countdown to a specific event or count the time up from an event in the past. For different durations you can use the appropriate counter i.e. for short running periods an hour counter or long running a year counter. It is also possible to count in other intervals than seconds (see the examples above). Another possiblity is to display a 12- or 24-hour clock. Based on FlipClock.

Params for Counter:

counter_type: Sepcifies the type of the counter.

possible values: Counter, MinuteCounter, HourlyCounter, DailyCounter, YearlyCounter, TwelveHourClock, TwentyFourHourClock

default: Counter

countdown: Defines if the counter should count down or up. (Only for the "counter_type"s "Counter", "MinuteCounter", "HourlyCounter", "DailyCounter" and "YearlyCounter")

possible values: true, false

default: false

countdown_message: A message that is displayed after the counter has reached 0. Also HTML is possible. (Only if parameter "countdown" is set to true)

default: none

init_value: Defines an initial value for an counter. (Only for "counter_type" "Counter")

possible values: all integer values

default: 0

date_time: Specifies a point in time from where the counter should start to count. (Only for the "counter_type"s "MinuteCounter", "HourlyCounter", "DailyCounter" and "YearlyCounter")

The given date and time must be in one of the following forms:

"YYYY-MM-DD" //i.e. 2017-03-22

"YYYY-MM-DD HH:mm:ss" //2017-03-22 17:02:00

"YYYY-MM-DD HH:mm:ss+HH:mm" //2017-03-22 17:02:00+01:00

+HH:mm defines the time shift from UTC. For Germany it is +1 hour, so "+01:00". For the time zone around New York you would specify -05:00.

possible values: all valid dates

default: current date and time

counter_interval: Specifies the interval in ms on which the counter should be in-/decremented. (Only for "counter_type" "Counter")

default: 1000

How to use it:

The actual time:
{counter counter_type="TwentyFourHourClock" /}

Time passed since the last atom accident on the world:
{Counter counter_type="YearlyCounter" date_time="2011-03-11 08:47:00"/}

Countdown to Rock am Ring:
{Counter counter_type="DailyCounter" countdown_message="It's over!" date_time="2017-06-02 14:25:00" countdown="true"/}

Tons of dust dumped to the sea since you loaded this page (~ 0.25 tons per second):
{counter counter_type="Counter" init_value="0" counter_interval="4000" countdown="false"/}

People born since you loaded this page (~ 4.27 people per second):
{counter counter_interval="235"/}

Example:

The actual time:

Countdown to "New Year":

Tons of dust dumped to the sea since you loaded this page (~ 0.25 tons per second):

People born since you loaded this page (~ 4.27 people per second):


Available for:

Advertising

© 2010 - 2017 FINWICK® UG

We have 8 guests and no members online

enfrdeitptrues