Jedi
Dealing with 2, 3 and 4 digits[tminus t="+1366 days +10 sec" omityears="true" omitmonths="true" omitweeks="true" style="jedi"/]
A Pluginoven Test Site
Dealing with 2, 3 and 4 digits[tminus t="+1366 days +10 sec" omityears="true" omitmonths="true" omitweeks="true" style="jedi"/]
we should only have to calculate year, month and week time units once, as they will likely change only one time per viewing. Even so, we will need to properly calculate the amount of days, weeks and months remain, depending on how many time units are currently being displayed. We use a test of +410 days and 10 seconds from now to test how the change over works for the larger time units.
This test should show everything: Years, Months, Weeks, Days… and the rest.[tminus t="+410 days +10 sec" style="TIE-fighter"/]
This test should show everything: Years, Months, Weeks, Days… and the rest.[tminus t="+396 days +10 sec" omitweeks="true" style="TIE-fighter"/]
This test should show everything: Years, Months, Weeks, Days… and the rest.[tminus t="+394 days +10 sec" omitmonths="true" style="TIE-fighter"/]
This test should show everything: Years, Months, Weeks, Days… and the rest.[tminus t="+394 days +10 sec" omitmonths="true" omityears="true" style="TIE-fighter"/]
This test should show: Years and days.[tminus t="+366 days +10 sec" omitmonths="true" omitweeks="true" style="TIE-fighter"/]
This test should show only days:[tminus t="+45 days" omityears="true" omitmonths="true" omitweeks="true"/]
This is a test of a countdown that will launch at a specific time.
The time should not affected on the visitors local computer time.
[ajax_dropdown 3171]
This post investigates issues with the width of a countdown that has the weeks omitted. Since the width should auto-adjust based on the displayed time units.
We’ll start with the c-3po style based on this issue on the WordPress Forums.
[tminus t="2018-04-11" omitweeks="true" style="c-3po"/]
[tminus t="2018-04-11" omitweeks="true" style="c-3po-mini" minutes="mins." seconds="secs."/]
[tminus t="2018-04-11" omitweeks="true" style="sith"/]
[tminus t="2018-04-11" omitweeks="true" style="carbonlite"/]
[tminus t="2018-04-11" omitweeks="true" style="cloud-city"/]
[tminus t="2018-04-11" omitweeks="true"/]
[tminus t="2018-04-11" style="circle" omitweeks="true"/]
Test of a new system of recalculating the remaining time to make sure timers stay in sync.
This is a test of the cloud-city style for T(-) Countdown to adjust the spacing issue on lower viewports.
What happens when we display two of the exact same T(-) Countdown Control shortcodes on the same page?
Here is the first countdown:
[tminus cid="2022"]
and Here is the second:
[tminus cid="2022" id="secondcountdown"]
This is a test to see if using t=’second tuesday’ will schedule a T(-) Countdown correctly:
[tminus t="second tuesday"]
Yup, looks like it works just fine.
It’s no T(-) Countdown Control, but in a pinch, it will work.
Edit.. nope, this will just countdown to the second Tuesday from today. To countdown to the second Tuesday of the MONTH you need to add the month and year.
[tminus t="may 2015 second tuesday"]
The following is the recommended method creating a completely new countdown style for both T(-) Countdown and T(-) Countdown Control. To demonstrate this, we are going to take an existing style (naboo) and use it as the base of a completely new style (womprat).
Step one, copy all of the css for naboo into the custom css section of the plugin’s option page and replace all instances of ‘naboo’ with our new style name, ‘womprat’:
.womprat-countdown {
background: #72aed3;
color: #fffff;
margin: 0 auto;
padding: 10px 0;
max-width: 360px;
text-align: center;
}
.womprat-countdown.omitweeks {
max-width: 295px;
}
.womprat-dashboard {
margin: 0 auto;
padding-bottom: 10px;
}
.womprat-tophtml, .womprat-bothtml {
margin: 0;
padding: 0;
font-family: "Gill Sans ", "Gill Sans MT", Calibri, sans-serif;
font-size: 16px;
text-align: center;
color: #ffffff;
}
.womprat-tophtml p, .womprat-bothtml p {
margin-bottom: 0;
}
.womprat-timer_icon {
display: none;
}
.womprat-dash, .womprat-tripdash {
display: inline-block;
padding: 5px;
margin-left: 10px;
height: 30px;
}
.womprat-digit {
display: inline-block;
float: left;
font-family: "Gill Sans ", "Gill Sans MT", Calibri, sans-serif;
font-weight: 100;
font-size: 42px;
line-height: 42px;
color: #ffffff;
}
.womprat-dash_title {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
font-size: 10px;
font-weight: 100;
color: #ffffff;
position: absolute;
margin-top: 10px;
margin-left: -20px;
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
}
.womprat-minutes_dash .womprat-dash_title, .womprat-seconds_dash .womprat-dash_title {
margin-left: -25px;
}
Once the settings have been saved, the womprat style will be available in the T(-) Countdown widget style dropdown, and as a valid style attribute value using the shortcode.
Now, we can go ahead and adjust this base style to fit our needs.
There are two options to to prevent plugin updates from overwriting your custom css.
Option one is to simply copy the custom CSS into the plugin’s Custom CSS area under Dashboard > Settings > T(-) Countdown. This way the custom CSS is saved in the database, and not in a file that will be overwritten during plugin updates.
Option two is to include the CSS into your theme’s style.css file, or better yet, into the style.css file of your child theme.