Documentation

Brand: Twinpictures Plugin Oven | Category: WordPress Plugin | Author: Baden Coleman
Updated: 22 December, 2016

T(-)Countdown Control vs. T(-)Countdown

The T(-)Countdown Control plugin replaces the free T(-)Countdown plugin. Therefore it is recommended that if the free T(-)Countdown plugin is installed, it be de-activated before using T(-)Countdown Control.

Required Plugin: Meta-Box

Meta Box is a powerful plugin that many themes and plugins use to add meta boxes and custom fields in WordPress. The recommended method of including the Meta Box plugin in themes/plugins has changed, and as of version 1.6.0 T(-) Countdown Control uses this new recommended method. More information is available in the Preflight Check: T(-) Countdown Control v1.6.0 post.

T(-)Countdown Event

T(-) Countdown Events

T(-) Countdown Events

Once the plugin is activated, a new T(-) Countdown menu item will appear in the WordPress Dashboard Menu. This is where all countdown events are created and managed.

Countdown Title

T(-) Countdown Title

T(-) Countdown Title

Once a new countdown event has been created, a unique title should be assigned. Simply enter a title in the space provided.

Countdown Launch

Under the title is an ‘Countdown Launch’ section where launch date, time and type are defined.

Launch Date

Countdown Launch - Launch Date

Countdown Launch – Launch Date

Clicking on the Launch Date input field will pop up a jQuery Calendar for easy date selection. Simple click on the date the event is to take place. If the event is to repeat, simply select the next future date the event is to take place.

Once the date is selected, the jQuery Calendar will close and the selected date will be inserted in the correct YYYY-MM-DD format.

Launch Time

Countdown Launch - Launch Time

Countdown Launch – Launch Time

Clicking on the Launch Time input field will pop up a jQuery Time Picker Widget for easy time selection. Simply slide each slider to the desired time. Once the correct time is selected, click the Done button to close the Time Picker Widget.

Launch Strtotime

Countdown Launch - Launch Strtotme

Countdown Launch – Launch Strtotme

Countdown Launch - Launch Strtotme Active

Countdown Launch – Launch Strtotme Active

An alternative to inserting the date and time separately is to enter a valid PHP strtotime format.

This fields primary use is for setting a launch event based on the page load. For example, setting Launch Strtotime to +30 seconds would automatically set the countdown for 30 seconds after the page loads. An example of this can be seen here.

Once a value is entered into the strtotime input field, the Launch Date and Launch Time input fields will be hidden. To reactivate the Launch Date and Launch Time fields, simply clear any value in the Launch Strtotime field and the Date and Time fields will reappear. In most cases the Launch Strtotime field can be ignored.

Launch Target

Countdown Launch - Launch Target

Countdown Launch – Launch Target

Content target area that will be affected once countdown reaches zero. If a launch target is selected from the Drop-Down menu, a content edit area will be displayed. The content that is entered in this edit box will be displayed in the selected target area once the countdown ‘launches’, or reaches zero.

Available Launch Targets:

  • Above Countdown—The area directly above the countdown timer
  • Below Countdown—The area directly below the countdown timer
  • Entire Countdown—The entire countdown will be replaced with the launch content
  • Page Redirect—Redirect the entire page to on launch. If this value is selected, a new Redirect URL field will be available to enter the URL that the page will redirect to
  • Count Up—The countdown will start counting up, displaying time that has past since the launch event

Countdown Type

Countdown Launch - Countdown Type

Countdown Launch – Countdown Type

If this countdown will launch only once, select the radio button labeled Single Shot. If, however, the countdown will occur more than once, or is part of a series of countdowns (see Grouping Multiple Countdown Schedules below) then select the radio button labeled Recurring. When Recurring is selected, a new set of input fields will become available to define the exact schedule the countdown is to follow.

Countdown Cycle

If Countdown Type has been set to Recurring, a Countdown Cycle box will appear that holds two input fields: Cycle Unit Value and Time Unit. These fields are used in combination to set the amount of time the countdown will Pause after launching, or reaching zero.

Countdown Cycle

Countdown Cycle set to pause for 10 Minutes

Cycle Unit Value

The number of time units to pause before the next countdown starts.

Time Unit

Unit of time to be used in calculation with the Cycle Unit Value set above.

Recurring Launch Schedule

If Countdown Type has been set to Recurring, a Recurring Launch Schedule box will appear. Use the the fields in this box to control the launch schedule.

Schedule Type

Recurring Launch Schedule - Launch Type

Recurring Launch Schedule – Launch Type

Choose the Schedule Types preset that best fits the desired schedule. If none of the standard Schedule Types fit, then select Custom. As of version 1.5.1 Sat. & Sun. has been added as a standard schedule type. For more complex schedules setups, check out Grouping Multiple Countdown Schedules below.

Custom Schedule Type

Recurring Launch Schedule - Custom Schedule Type

Recurring Launch Schedule – Custom Schedule Type

Selecting Custom from the drop-down will display two input fields: Custom Recur Value and Custom Recur Time Unit. For more complex schedules setups, check out Grouping Multiple Countdown Schedules below.

Custom Recur Value

Number of time units between custom recurring launches.

Custom Recur Time Unit

Unit of time to be used in calculation with the Custom Recur Value set above.

Schedule Starts/Ends

Recurring Launch Schedule - Starts & Ends

Recurring Launch Schedule – Starts & Ends

By default the countdown schedule will start now and never end. Both the start and end dates can be defined by selecting the radio button labeled Schedule and filling out the additional Date and Time fields that appear.

Last/Next Run

Recurring Launch Schedule - Last & Next Run

Recurring Launch Schedule – Last & Next Run

Two read-only fields display the last time the current countdown was launched and the next time the current countdown is scheduled to launch. Any changes made to either the Launch Date or Launch Time will reset both of these values to zero.

Above/Below Countdown

Above & Below Countdown HTML Areas

Above & Below Countdown Meta Boxes

Above & Below Areas Used in a Countdown

Areas Above & Below Countdown

The Above & Below Countdown meta boxes can be filled with HTML content that is to be displayed either above or below the countdown. These are also the areas that can be used as the Launch Target and be populated at countdown launch.

Grouping Multiple Countdown Schedules

As of 1.3 multiple child t-countdown schedules can be grouped and assign to a parent schedule. For example, to schedule countdowns to automatically cycle every Saturday at 5:00pm AND every Sunday at 9:30am AND 11:15am:

  1. Create a new T-Countdown and give it a title, such as ‘Multi Countdown’
  2. Create multiple T-Countdown schedules and set them to recur every week at the target times. Each child schedule must also have the ‘parent’ assigned as ‘Multi Countdown’.

Now, the ‘Multi Countdown’ schedule is actually a ‘Holder’ of all the child schedules. Assigning this schedule will actually cycle through all child schedules.

Shortcode

In addition to using a sidebar widget, the [tminus] shortcode may be used to place a countdown in a post or page. The only requirement is that a t-countdown event post be assigned by using either the cid, cslug or cname attributes.
[tminus cid="173"/]. A complete list of shortcode attributes are listed below.

cID/cSlug/cName Attribute

A t-countdown launch event must be assigned in the shortcode using one of the following attributes:

  • [tminus cid="173"/]
    Countdown ID. The post ID of the t-countdown event to use
  • [tminus cslug="super-cool-countdown"/]
    Countdown Slug. The post slug of the t-countdown event to use
  • [tminus cname="Super Cool CountDown"/]
    Countdown Name. The post name/title of the t-countdown event to use

ID Attribute

[tminus cid="173" id="new-years-eve"/]
A unique ID for the countdown element. If the id attribute is not defined, a unique, random number will be assigned.

No Flip Attribute

[tminus cid="173" no_flip="true"/]
If no_flip is set, the digits will not update with animated transitions.

Title Attributes

The following attributes can be used to replace default unit titles:

  • [tminus cid="173" weeks="woche"/]
    Weeks attribute replaces the default title for ‘weeks’
  • [tminus cid="173" days="tage"/]
    Days attribute replaces the default title for ‘days’
  • [tminus cid="173" hours="stunden"/]
    Hours attribute replaces the default title for ‘hours’
  • [tminus cid="173" minutes="minuten"/]
    Minutes attribute replaces the default title for ‘minutes’
  • [tminus cid="173" seconds="sekunden"/]
    Seconds attribute replaces the default title for ‘seconds’

Omitweeks Attribute

[tminus cid="173" omitweeks="true"/]
Omit the weeks ‘true’ or show the weeks ‘false’. Default is ‘false’.

Omitdays Attribute

[tminus cid="173" omitdays="true"/]
Hide the days ‘true’ or display the days ‘false’. Default is ‘false’. Note if the launch is more than 24 hours away, and the days are hidden, the days are not converted to hours, only hidden.

Omitsecs Attribute

[tminus cid="173" omitsecs="true"/]
Seconds are displayed by default. To omit seconds, set omitsecs=”true”.

Style Attribute

[tminus cid="173" style="carbonite"/]
Defines the style to be used by the countdown. Available styles are:

  • c-3po
  • c-3po-mini
  • carbonite
  • carbonite-responsive
  • carbonlite
  • cloud-city
  • darth
  • hoth
  • jedi
  • kapsicum
  • kapsicum-mini
  • leia
  • r2k2
  • sith
  • TIE-fighter

Default style is ‘jedi’.

Jsplacement Attribute

[tminus cid="173" jsplacement="inline"/]
Where to inject the required javascript (footer or inline). The default setting ‘footer’ is recommended.

Width Attribute

[tminus cid="173" width="300"/]
The pre-launch width in px of the countdown – default is ‘auto’.

Height Attribute

[tminus cid="173" height="200"/]
The pre-launch height in px of the countdown – default is ‘auto’.

Launchwidth Attribute

[tminus cid="173" launchwidth="400"/]
The post-launch width in px of the countdown – default is ‘auto’.

Launchheight Attribute

[tminus cid="173" launchheight="700"/]
The post-launch height in px of the countdown – default is ‘auto’.

Launchtarget Attribute

[tminus t="2012-12-20" launchtarget="below"/]
The area that is to be targeted with the shortcode’s content after launch. The valid values for launchtarget are:

  • above
  • below
  • countdown (default)
  • countup

Demos and Experiments

For demos and experimental tests, check out our T(-) Countdown Demos on SpaceDonkey