Dec 10
20
The jQuery T-minus Countdown has grown up from a little widget to a full featured WordPress Plugin, complete with shortcode as demonstrated below:
Some of the new features include:
- Multiple instance sidebar widgets
- HTML content areas located above and below the countdown
- Shortcode for placing countdown in a page or post
- Launch Event HTML that can replace the above, below or entire countdown areas
The Plugin
Download the jQuery T(-) CountDown Plugin from Twinpictures.
Download the jQuery T(-) CountDown Plugin from the WordPress Plugin Repository.
The Sidebar Widget
The [tminus] Shortcode
The shortcode is used to place a countdown in a post or page. In the simplest form the shortcode is: [tminus t="DD-MM-YYYY HH:MM:SS"/] but the shortcode can also be used to wrap HTML to be displayed on launch: [tminus t= "DD-MM-YYYY HH:MM:SS"]HTML to be displayed when the countdown reaches zero.[/tminus] A complete list of shortcode attributes follows:
T Attribute – Launch Date and Time
[tminus t="+1 hour 45 minutes"/]
The t attribute is used to assigned a date and time in almost any format. If no t value is assigned, the default launch date and time is assigned Nov 11, 2011 at 11:11:11 — mostly because it’s kind of a cool date.
Note: Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.
To avoid potential ambiguity, it’s best to use ISO 8601 (YYYY-MM-DD)
- DD-MM-YYYY HH:MM:SS
- DD.MM.YYYY HH:MM:SS
- MM/DD/YYYY HH:MM:SS
- YYYY-MM-DD HH:MM:SS
ID Attribute
[tminus t="31-12-2010 23:59:59" 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.
Weeks Attribute
[tminus t="01.01.2011" weeks="woche"/]
Replaces the default title for ‘weeks’.
Days Attribute
[tminus t="1/1/2011" days="tage"/]
Replaces the default title for ‘days’.
Hours Attribute
[tminus t="next Thursday" hours="stunden"/]
Replaces the default title for ‘hours’.
Minutes Attribute
[tminus t="10 September 2011" minutes="minuten"/]
Replaces the default title for ‘minutes’.
Seconds Attribute
[tminus t="2010-12-31 23:59:59" seconds="sekunden"/]
Replaces the default title for ‘seconds’.
Omitweeks Attribute
[tminus t="2011-01-01" omitweeks="true"/]
Omit the weeks ‘true’ or show the weeks ‘false’. Default is ‘false’.
Style Attribute
[tminus t="2011-01-01" style="carbonite"/]
Defines the style to be used by the countdown (carbonite, darth or jedi). Default is ‘jedi’.
Jsplacement Attribute
[tminus t="2011-01-01" jsplacement="inline"/]
Where to inject the required javascript (footer or inline). The default setting ‘footer’ is recommended.
Before Attribute
[tminus t="2011-01-01" before="<p>May the force...</p>"/]
The HTML to be displayed above the countdown.
After Attribute
[tminus t="2011-01-01" after="<p>...be with you.</p>"/]
The HTML to be displayed below the countdown.
Width Attribute
[tminus t="2011-01-01" width="300"/]
The pre-launch width in px of the countdown – default is ‘auto’.
Height Attribute
[tminus t="2011-01-01" height="200"/]
The pre-launch height in px of the countdown – default is ‘auto’.
Launchwidth Attribute
[tminus t="2011-01-01" launchwidth="400"/]
The post-launch width in px of the countdown – default is ‘auto’.
Launchheight Attribute
[tminus t="2011-01-01" launchheight="700"/]
The post-launch height in px of the countdown – default is ‘auto’.
Launchtarget Attribute
[tminus t="2011-01-01" launchtarget="below"/]
The area that the post-launch HTML is to be displayed in (above, below or countdown – default is ‘countdown’)
Rate & Vote
We are very happy to offer this plugin to this great community of open-source lovin’ WordPress users. Now go be a nice social netwookiee and visit the WordPress.org plugin page to rate the plugin. Don’t forget to let others know if everything worked for your configuration by voting in the compatibility section.
Blab To Others
Join the Twinpictures Facebook Page or hit us up on the Twitter. If you post a nice video review, let us know and we will be happy to include it on the Twinpictures YouTube Channel.
Flying Houseboat Fund
If this plugin really just floats-n-flys your boat, why not throw in a bean or two in the Twinpictures Flying Houseboat Fund!
The Flying Houseboat Project envisions an extremely efficient future flying abode, powered by sea and air.
This post is also available in: German




