T(-) Countdown - Version 1.6

Version Description

  • Added automatic 3-digit weeks and days.
  • Pimped out the Jedi css switcher to better handle user generated styles.
  • Added new carbonite style by Lauren at siliconstudio.com
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 T(-) Countdown
Version 1.6
Comparing to
See all releases

Code changes from version 1.5 to 1.6

countdown-timer.php CHANGED
@@ -1,338 +1,416 @@
1
- <?php
2
- /*
3
- Plugin Name: jQuery T Minus Countdown Widget
4
- Plugin URI: http://www.twinpictures.de/t-countdown-widget
5
- Description: Display and configure a jQuery countdown timer as a sidebar widget.
6
- Version: 1.5
7
- Author: Twinpictures
8
- Author URI: http://www.twinpictures.de
9
- License: GPL2
10
- */
11
-
12
- /* Copyright 2010 Twinpictures (www.twinpictures.de)
13
-
14
- This program is free software; you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License, version 2, as
16
- published by the Free Software Foundation.
17
-
18
- This program is distributed in the hope that it will be useful,
19
- but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- GNU General Public License for more details.
22
-
23
- You should have received a copy of the GNU General Public License
24
- along with this program; if not, write to the Free Software
25
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
- */
27
-
28
- //replace jQuery google's jQuery (faster load times, take advangage of probable caching)
29
- /* disabled - seems to disable the visual Visual Editor... instead use the "Use Google Libraries" Plugin
30
- function my_jQuery_init_method() {
31
- wp_deregister_script( 'jquery' );
32
- wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
33
- }
34
- add_action('init', 'my_jQuery_init_method');
35
- */
36
-
37
- wp_enqueue_script('jquery');
38
-
39
- //widgit scripts
40
- function countdown_script(){
41
- $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
42
- if (!is_admin()){
43
- //lwtCountdown script
44
- wp_register_script('countdown-script', $plugin_url.'/js/jquery.lwtCountdown-1.0.js', array (), '1.1' );
45
- wp_enqueue_script('countdown-script');
46
- }
47
- }
48
-
49
-
50
-
51
- // Inserts scripts into header
52
- add_action( 'wp_print_scripts', 'countdown_script' );
53
-
54
-
55
- //the widget
56
- function widget_countdown_timer_init() {
57
-
58
- if ( !function_exists('register_sidebar_widget') )
59
- return;
60
-
61
- function sanitizer($name) {
62
- $name = strtolower($name); // all lowercase
63
- $name = preg_replace('/[^a-z0-9 ]/','', $name); // nothing but a-z 0-9 and spaces
64
- $name = preg_replace('/\s+/','-', $name); // spaces become hyphens
65
- return $name;
66
- }
67
-
68
- //widget css
69
- function countdown_style($args){
70
- $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
71
- if (!is_admin()){
72
- //css
73
- $options = get_option('widget_countdown');
74
- if($options['style'] == 'light'){
75
- wp_register_style( 'countdown-css', $plugin_url.'/css/light-style.css', array (), '1.0' );
76
- }
77
- else{
78
- wp_register_style( 'countdown-css', $plugin_url.'/css/dark-style.css', array (), '1.0' );
79
- }
80
- wp_enqueue_style( 'countdown-css' );
81
- }
82
- }
83
-
84
- //insert some style into your life
85
- add_action( 'wp_print_styles', 'countdown_style' );
86
-
87
- // Options and default values for this widget
88
- function widget_countdown_options() {
89
- return array(
90
- 'title' => 'Countdown',
91
- 'description' => '',
92
- 'url' => '',
93
- 'urltarget' => '_blank',
94
- 'urltext' => '',
95
- 'urlpos' => 'bottom',
96
- 'day' => 8,
97
- 'month' => 11,
98
- 'year' => 2010,
99
- 'hour' => 13,
100
- 'min' => 30,
101
- 'sec' => 0,
102
- 'weektitle' => 'weeks',
103
- 'daytitle' => 'days',
104
- 'hourtitle' => 'hours',
105
- 'mintitle' => 'minutes',
106
- 'sectitle' => 'seconds',
107
- 'omitweeks' => 'false',
108
- 'style' => 'light'
109
- );
110
- }
111
-
112
- function widget_countdown($args) {
113
- extract($args);
114
- $options = array_merge(widget_countdown_options(), get_option('widget_countdown'));
115
- unset($options[0]); //returned by get_option(), but we don't need it
116
-
117
- //calc the inital difference
118
- //$now = time();
119
- $now = time() + ( get_option( 'gmt_offset' ) * 3600);
120
- $target = mktime(
121
- $options['hour'],
122
- $options['min'],
123
- $options['sec'],
124
- $options['month'],
125
- $options['day'],
126
- $options['year']
127
- );
128
-
129
- $diffSecs = $target - $now;
130
-
131
- $date = array();
132
- $date['secs'] = $diffSecs % 60;
133
- $date['mins'] = floor($diffSecs/60)%60;
134
- $date['hours'] = floor($diffSecs/60/60)%24;
135
- $date['days'] = floor($diffSecs/60/60/24)%7;
136
- $date['weeks'] = floor($diffSecs/60/60/24/7);
137
-
138
- foreach ($date as $i => $d) {
139
- $d1 = $d%10;
140
- $d2 = ($d-$d1) / 10;
141
- $date[$i] = array(
142
- (int)$d2,
143
- (int)$d1,
144
- (int)$d
145
- );
146
- }
147
-
148
- echo $before_widget;
149
- if($options['title']){
150
- echo $before_title . $options['title'] . $after_title;
151
- }
152
- if($options['description']){
153
- echo '<p>'. $options['description'] .'</p>';
154
- }
155
- if($options['url'] && $options['urlpos'] == 'top'){
156
- echo '<a href="'. $options['url'] .'" target="'. $options['urltarget'] .'">'. $options['urltext'] .'</a>';
157
- }
158
-
159
- echo '<div id="countdown_dashboard">';
160
-
161
- if($options['omitweeks'] == 'false'){
162
- echo '<div class="dash weeks_dash">
163
- <span class="dash_title">'.$options['weektitle'].'</span>
164
- <div class="digit">'.$date['weeks'][0].'</div>
165
- <div class="digit">'.$date['weeks'][1].'</div>
166
- </div>';
167
- }
168
-
169
- echo '<div class="dash days_dash">
170
- <span class="dash_title">'.$options['daytitle'].'</span>
171
- <div class="digit">'.$date['days'][0].'</div>
172
- <div class="digit">'.$date['days'][1].'</div>
173
- </div>
174
-
175
- <div class="dash hours_dash">
176
- <span class="dash_title">'.$options['hourtitle'].'</span>
177
- <div class="digit">'.$date['hours'][0].'</div>
178
- <div class="digit">'.$date['hours'][1].'</div>
179
- </div>
180
-
181
- <div class="dash minutes_dash">
182
- <span class="dash_title">'.$options['mintitle'].'</span>
183
- <div class="digit">'.$date['mins'][0].'</div>
184
- <div class="digit">'.$date['mins'][1].'</div>
185
- </div>
186
-
187
- <div class="dash seconds_dash">
188
- <span class="dash_title">'.$options['sectitle'].'</span>
189
- <div class="digit">'.$date['secs'][0].'</div>
190
- <div class="digit">'.$date['secs'][1].'</div>
191
- </div>
192
- </div>';
193
- if($options['url'] && $options['urlpos'] == 'bottom'){
194
- echo '<a href="'. $options['url'] .'" target="'. $options['urltarget'] .'">'. $options['urltext'] .'</a>';
195
- }
196
- //echo '<p>Phones riggin dude!</p>';
197
- echo $after_widget;
198
- }
199
-
200
- //add the script to the footer
201
- function jquery_countdown_js($args){
202
- $options = get_option('widget_countdown');
203
- $t = date( 'n/j/Y H:i:s', time() + ( get_option( 'gmt_offset' ) * 3600));
204
- ?>
205
- <script language="javascript" type="text/javascript">
206
- jQuery(document).ready(function() {
207
- //alert('Phones Ringin, Dude.');
208
- jQuery('#countdown_dashboard').countDown({
209
- targetDate: {
210
- 'day': <?php echo $options['day']; ?>,
211
- 'month': <?php echo $options['month']; ?>,
212
- 'year': <?php echo $options['year']; ?>,
213
- 'hour': <?php echo $options['hour']; ?>,
214
- 'min': <?php echo $options['min']; ?>,
215
- 'sec': <?php echo $options['sec']; ?>,
216
- 'localtime': '<?php echo $t; ?>'
217
- },
218
- omitWeeks: <?php echo $options['omitweeks']; ?>
219
- });
220
-
221
- });
222
- </script>
223
- <?php
224
- }
225
-
226
- add_action('wp_head','jquery_countdown_js');
227
-
228
-
229
- //add the widget control form
230
- function widget_countdown_control() {
231
- if(($options = get_option('widget_countdown')) === FALSE) $options = array();
232
- $options = array_merge(widget_countdown_options(), $options);
233
- unset($options[0]); //returned by get_option(), but we don't need it
234
-
235
- // If user is submitting custom option values for this widget
236
- if ( $_POST['countdown-submit'] ) {
237
- // Remember to sanitize and format use input appropriately.
238
- foreach($options as $key => $value){
239
- $options[$key] = strip_tags(stripslashes($_POST['countdown-'.sanitizer($key)]));
240
- }
241
-
242
- // Save changes
243
- update_option('widget_countdown', $options);
244
- }
245
-
246
- // title option
247
- echo '<p style="text-align:left"><label for="countdown-title">Title: <input style="width: 200px;" id="countdown-title" name="countdown-title" type="text" value="'.$options['title'].'" /></label></p>';
248
-
249
- //description
250
- echo '<p style="text-align:left"><label for="countdown-description">Description: <input style="width: 200px;" id="countdown-description" name="countdown-description" type="text" value="'.$options['description'].'" /></label></p>';
251
-
252
- //url
253
- echo '<p style="text-align:left"><label for="countdown-url">URL: <input style="width: 200px;" id="countdown-url" name="countdown-url" type="text" value="'.$options['url'].'" /></label></p>';
254
-
255
- //url target
256
- echo '<p style="text-align:left"><label for="countdown-urltarget">Link Target: <input style="width: 200px;" id="countdown-urltarget" name="countdown-urltarget" type="text" value="'.$options['urltarget'].'" /></label></p>';
257
-
258
- //url text
259
- echo '<p style="text-align:left"><label for="countdown-urltext">Link Text: <input style="width: 200px;" id="countdown-urltext" name="countdown-urltext" type="text" value="'.$options['urltext'].'" /></label></p>';
260
-
261
- //url position Slector
262
- $dom = '';
263
- $sub = '';
264
- if($options['urlpos'] == 'top'){
265
- $dom = 'CHECKED';
266
- }
267
- else{
268
- $sub = 'CHECKED';
269
- }
270
-
271
- //Is the link a top or a bottom?
272
- echo '<p style="text-align:left"><label for="countdown-urlpos">Link Position: <br/><input id="countdown-urlpos" name="countdown-urlpos" type="radio" '.$dom.' value="top" /> Above Counter </label><input id="countdown-urlpos" name="countdown-urlpos" type="radio" '.$sub.' value="bottom" /> Below Counter </label> </p>';
273
-
274
- //Target Date
275
- echo '<p style="text-align:left"><label for="countdown-day">Target Date (DD-MM-YYYY):<br/><input style="width: 30px;" id="countdown-day" name="countdown-day" type="text" value="'.$options['day'].'" /></label>-<input style="width: 30px;" id="countdown-month" name="countdown-month" type="text" value="'.$options['month'].'" />-<input style="width: 40px;" id="countdown-year" name="countdown-year" type="text" value="'.$options['year'].'" /></p>';
276
-
277
- //Target Time
278
- echo '<p style="text-align:left"><label for="countdown-hour">Target Time (HH:MM:SS):<br/><input style="width: 30px;" id="countdown-hour" name="countdown-hour" type="text" value="'.$options['hour'].'" /></label>:<input style="width: 30px;" id="countdown-min" name="countdown-min" type="text" value="'.$options['min'].'" />:<input style="width: 30px;" id="countdown-sec" name="countdown-sec" type="text" value="'.$options['sec'].'" /></p>';
279
-
280
- //weeks text
281
- echo '<p style="text-align:left"><label for="countdown-weektitle">How do you spell "weeks"?: <input style="width: 200px;" id="countdown-weektitle" name="countdown-weektitle" type="text" value="'.$options['weektitle'].'" /></label></p>';
282
-
283
- //days text
284
- echo '<p style="text-align:left"><label for="countdown-urltext">How do you spell "days"?: <input style="width: 200px;" id="countdown-daytitle" name="countdown-daytitle" type="text" value="'.$options['daytitle'].'" /></label></p>';
285
-
286
- //hours text
287
- echo '<p style="text-align:left"><label for="countdown-hourtitle">How do you spell "hours"?: <input style="width: 200px;" id="countdown-hourtitle" name="countdown-hourtitle" type="text" value="'.$options['hourtitle'].'" /></label></p>';
288
-
289
- //minutes text
290
- echo '<p style="text-align:left"><label for="countdown-mintitle">How do you spell "minutes"?: <input style="width: 200px;" id="countdown-mintitle" name="countdown-mintitle" type="text" value="'.$options['mintitle'].'" /></label></p>';
291
-
292
- //seconds text
293
- echo '<p style="text-align:left"><label for="countdown-sectitle">And "seconds" are spelled how?: <input style="width: 200px;" id="countdown-sectitle" name="countdown-sectitle" type="text" value="'.$options['sectitle'].'" /></label></p>';
294
-
295
-
296
- //Omit Week Slector
297
- $negative = '';
298
- $positive = '';
299
- if($options['omitweeks'] == 'false'){
300
- $negative = 'CHECKED';
301
- }
302
- else{
303
- $positive = 'CHECKED';
304
- }
305
-
306
- //Omit Weeks
307
- echo '<p style="text-align:left"><label for="countdown-omitweeks">Omit Weeks:<input id="countdown-omitweeks" name="countdown-omitweeks" type="radio" '.$negative.' value="false" /> No </label><input id="countdown-omitweeks" name="countdown-omitweeks" type="radio" '.$positive.' value="true" /> Yes </label> </p>';
308
-
309
- //style Slector
310
- $light = '';
311
- $dark = '';
312
- if($options['style'] == 'light'){
313
- $light = 'CHECKED';
314
- }
315
- else{
316
- $dark = 'CHECKED';
317
- }
318
-
319
- //Light or Dark Style? You choose!
320
- echo '<p style="text-align:left"><label for="countdown-style">What side of the Force are you on?: <br/><input id="countdown-style" name="countdown-style" type="radio" '.$light.' value="light" /> Jedi </label><input id="countdown-style" name="countdown-style" type="radio" '.$dark.' value="dark" /> Darth </label> </p>';
321
-
322
-
323
- // Submit
324
- echo '<input type="hidden" id="countdown-submit" name="countdown-submit" value="1" />';
325
- }
326
- // This registers our widget so it appears with the other available
327
- // widgets and can be dragged and dropped into any active sidebars.
328
- //register_sidebar_widget('jQuery T Minus CountDown', 'widget_countdown');
329
- wp_register_sidebar_widget( 'jquery-countdown', 'jQuery T Minus CountDown', 'widget_countdown');
330
-
331
- // This registers our optional widget control form.
332
- wp_register_widget_control('jquery-countdown', 'jQuery T Minus CountDown', 'widget_countdown_control');
333
- }
334
-
335
- // Run code later in case this loads prior to any required plugins.
336
- add_action('plugins_loaded', 'widget_countdown_timer_init');
337
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  ?>
1
+ <?php
2
+ /*
3
+ Plugin Name: jQuery T Minus Countdown Widget
4
+ Plugin URI: http://www.twinpictures.de/t-minus-countdown-widget/
5
+ Description: Display and configure a jQuery countdown timer as a sidebar widget.
6
+ Version: 1.6
7
+ Author: Twinpictures
8
+ Author URI: http://www.twinpictures.de
9
+ License: GPL2
10
+ */
11
+
12
+ /* Copyright 2010 Twinpictures (www.twinpictures.de)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License, version 2, as
16
+ published by the Free Software Foundation.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+ */
27
+
28
+ //replace jQuery google's jQuery (faster load times, take advangage of probable caching)
29
+ /* disabled - the google jQuery library seems to disable the visual Visual Editor...instead use the "Use Google Libraries" Plugin
30
+ function my_jQuery_init_method() {
31
+ wp_deregister_script( 'jquery' );
32
+ wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
33
+ }
34
+ add_action('init', 'my_jQuery_init_method');
35
+ */
36
+
37
+ wp_enqueue_script('jquery');
38
+
39
+ //widgit scripts
40
+ function countdown_script(){
41
+ $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
42
+ if (!is_admin()){
43
+ //lwtCountdown script
44
+ wp_register_script('countdown-script', $plugin_url.'/js/jquery.lwtCountdown-1.0.js', array ('jquery'), '1.1' );
45
+ wp_enqueue_script('countdown-script');
46
+ }
47
+ }
48
+
49
+ //folder array
50
+ function folder_array($path, $exclude = ".|..") {
51
+ if(is_dir($path)){
52
+ $dh = opendir($path);
53
+ $exclude_array = explode("|", $exclude);
54
+ $result = array();
55
+ while(false !==($file = readdir($dh))) {
56
+ if( !in_array(strtolower($file), $exclude_array)){
57
+ $result[] = $file;
58
+ }
59
+ }
60
+ closedir($dh);
61
+ return $result;
62
+ }
63
+ }
64
+
65
+
66
+ // Inserts scripts into header
67
+ add_action( 'wp_print_scripts', 'countdown_script' );
68
+
69
+ //the widget
70
+ function widget_countdown_timer_init() {
71
+
72
+ if ( !function_exists('register_sidebar_widget') )
73
+ return;
74
+
75
+ function sanitizer($name) {
76
+ $name = strtolower($name); // all lowercase
77
+ $name = preg_replace('/[^a-z0-9 ]/','', $name); // nothing but a-z 0-9 and spaces
78
+ $name = preg_replace('/\s+/','-', $name); // spaces become hyphens
79
+ return $name;
80
+ }
81
+
82
+ //widget css
83
+ function countdown_style($args){
84
+ $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
85
+ if (!is_admin()){
86
+ //css
87
+ $options = get_option('widget_countdown');
88
+ //migrate from the old style system
89
+ if($options['style'] == 'light'){ $options['style'] = 'jedi'; }
90
+ if($options['style'] == 'dark'){ $options['style'] = 'darth'; }
91
+ //new style system
92
+ wp_register_style( 'countdown-css', $plugin_url.'/css/'.$options['style'].'/style.css', array (), '1.0' );
93
+ wp_enqueue_style( 'countdown-css' );
94
+ }
95
+ }
96
+
97
+ //insert some style into your life
98
+ add_action( 'wp_print_styles', 'countdown_style' );
99
+
100
+ // Options and default values for this widget
101
+ function widget_countdown_options() {
102
+ return array(
103
+ 'title' => 'Countdown',
104
+ 'description' => '',
105
+ 'url' => '',
106
+ 'urltarget' => '_blank',
107
+ 'urltext' => '',
108
+ 'urlpos' => 'bottom',
109
+ 'day' => 11,
110
+ 'month' => 11,
111
+ 'year' => 2011,
112
+ 'hour' => 11,
113
+ 'min' => 11,
114
+ 'sec' => 11,
115
+ 'weektitle' => 'weeks',
116
+ 'daytitle' => 'days',
117
+ 'hourtitle' => 'hours',
118
+ 'mintitle' => 'minutes',
119
+ 'sectitle' => 'seconds',
120
+ 'omitweeks' => 'false',
121
+ 'style' => 'jedi'
122
+ );
123
+ }
124
+
125
+ function widget_countdown($args) {
126
+ extract($args);
127
+ $options = array_merge(widget_countdown_options(), get_option('widget_countdown'));
128
+ unset($options[0]); //returned by get_option(), but we don't need it
129
+
130
+ //calc the inital difference
131
+ $now = time() + ( get_option( 'gmt_offset' ) * 3600);
132
+ $target = mktime(
133
+ $options['hour'],
134
+ $options['min'],
135
+ $options['sec'],
136
+ $options['month'],
137
+ $options['day'],
138
+ $options['year']
139
+ );
140
+
141
+ $diffSecs = $target - $now;
142
+
143
+ $date = array();
144
+ $date['secs'] = $diffSecs % 60;
145
+ $date['mins'] = floor($diffSecs/60)%60;
146
+ $date['hours'] = floor($diffSecs/60/60)%24;
147
+ if($options['omitweeks'] == 'false'){
148
+ $date['days'] = floor($diffSecs/60/60/24)%7;
149
+ }
150
+ else{
151
+ $date['days'] = floor($diffSecs/60/60/24);
152
+ }
153
+ $date['weeks'] = floor($diffSecs/60/60/24/7);
154
+
155
+ foreach ($date as $i => $d) {
156
+ //echo $d.'<br/>';
157
+ $d1 = $d%10;
158
+ //53 = 3
159
+ //153 = 3
160
+
161
+ if($d < 100){
162
+ $d2 = ($d-$d1) / 10;
163
+ //53 = 50 / 10 = 5
164
+ $d3 = 0;
165
+ }
166
+ else{
167
+ $dr = $d%100;
168
+ //153 = 53
169
+ //345 = 45
170
+ $dm = $d-$dr;
171
+ //153 = 100
172
+ //345 = 300
173
+ $d2 = ($d-$dm-$d1) / 10;
174
+ //153 = 50 / 10 = 5
175
+ //345 = 40 / 10 = 4
176
+ $d3 = $dm / 100;
177
+ }
178
+ //here is where the 1000's come to play.
179
+ //now assign all the digits to the array
180
+ $date[$i] = array(
181
+ (int)$d3,
182
+ (int)$d2,
183
+ (int)$d1,
184
+ (int)$d
185
+ );
186
+ }
187
+
188
+ echo $before_widget;
189
+ if($options['title']){
190
+ echo $before_title . $options['title'] . $after_title;
191
+ }
192
+ if($options['description']){
193
+ echo '<p>'. $options['description'] .'</p>';
194
+ }
195
+ if($options['url'] && $options['urlpos'] == 'top'){
196
+ echo '<a href="'. $options['url'] .'" target="'. $options['urltarget'] .'">'. $options['urltext'] .'</a>';
197
+ }
198
+
199
+ //open the dashboard
200
+ echo '<div id="countdown_dashboard">';
201
+
202
+ if($options['omitweeks'] == 'false'){
203
+ //set up correct style class for double or triple digit love
204
+ $wclass = "dash weeks_dash";
205
+ if($date['weeks'][0] > 0){
206
+ $wclass = "tripdash weeks_trip_dash";
207
+ }
208
+
209
+ echo '<div class="'.$wclass.'">
210
+ <span class="dash_title">'.$options['weektitle'].'</span>';
211
+ //show third week digit if the number of weeks is greater than 99
212
+ if($date['weeks'][0] > 0){
213
+ echo '<div class="digit">'.$date['weeks'][0].'</div>';
214
+ }
215
+ echo '<div class="digit">'.$date['weeks'][1].'</div>
216
+ <div class="digit">'.$date['weeks'][2].'</div>
217
+ </div>';
218
+ }
219
+
220
+ //set up correct style class for double or triple digit love
221
+ $dclass = "dash days_dash";
222
+ if($options['omitweeks'] == 'true' && $date['days'][3] > 99){
223
+ $dclass = "tripdash days_trip_dash";
224
+ }
225
+
226
+ echo '<div class="'.$dclass.'">
227
+ <span class="dash_title">'.$options['daytitle'].'</span>';
228
+ //show thrid day digit if there are NO weeks and the number of days is greater that 99
229
+ if($options['omitweeks'] == 'true' && $date['days'][3] > 99){
230
+ echo '<div class="digit">'.$date['days'][0].'</div>';
231
+ }
232
+ echo '<div class="digit">'.$date['days'][1].'</div>
233
+ <div class="digit">'.$date['days'][2].'</div>
234
+ </div>
235
+
236
+ <div class="dash hours_dash">
237
+ <span class="dash_title">'.$options['hourtitle'].'</span>
238
+ <div class="digit">'.$date['hours'][1].'</div>
239
+ <div class="digit">'.$date['hours'][2].'</div>
240
+ </div>
241
+
242
+ <div class="dash minutes_dash">
243
+ <span class="dash_title">'.$options['mintitle'].'</span>
244
+ <div class="digit">'.$date['mins'][1].'</div>
245
+ <div class="digit">'.$date['mins'][2].'</div>
246
+ </div>
247
+
248
+ <div class="dash seconds_dash">
249
+ <span class="dash_title">'.$options['sectitle'].'</span>
250
+ <div class="digit">'.$date['secs'][1].'</div>
251
+ <div class="digit">'.$date['secs'][2].'</div>
252
+ </div>
253
+ </div>'; //close the dashboard
254
+
255
+ if($options['url'] && $options['urlpos'] == 'bottom'){
256
+ echo '<a href="'. $options['url'] .'" target="'. $options['urltarget'] .'">'. $options['urltext'] .'</a>';
257
+ }
258
+ //echo '<p>Phones riggin dude!</p>';
259
+ echo $after_widget;
260
+ }
261
+
262
+ //add the script to the footer
263
+ function jquery_countdown_js($args){
264
+ $options = get_option('widget_countdown');
265
+ $t = date( 'n/j/Y H:i:s', time() + ( get_option( 'gmt_offset' ) * 3600));
266
+ ?>
267
+ <script language="javascript" type="text/javascript">
268
+ jQuery(document).ready(function() {
269
+ //alert('Phones Ringin, Dude.');
270
+ //only trigger the countdown if one actually exists.
271
+ if(jQuery('#countdown_dashboard').length){
272
+ //alert('Clocks Tickin, Dude.');
273
+
274
+ jQuery('#countdown_dashboard').countDown({
275
+ targetDate: {
276
+ 'day': <?php echo $options['day']; ?>,
277
+ 'month': <?php echo $options['month']; ?>,
278
+ 'year': <?php echo $options['year']; ?>,
279
+ 'hour': <?php echo $options['hour']; ?>,
280
+ 'min': <?php echo $options['min']; ?>,
281
+ 'sec': <?php echo $options['sec']; ?>,
282
+ 'localtime': '<?php echo $t; ?>'
283
+ },
284
+ omitWeeks: <?php echo $options['omitweeks']; ?>
285
+ });
286
+ }
287
+ });
288
+ </script>
289
+ <?php
290
+ }
291
+
292
+ add_action('wp_head','jquery_countdown_js');
293
+
294
+
295
+ //add the widget control form
296
+ function widget_countdown_control() {
297
+ if(($options = get_option('widget_countdown')) === FALSE) $options = array();
298
+ $options = array_merge(widget_countdown_options(), $options);
299
+ unset($options[0]); //returned by get_option(), but we don't need it
300
+
301
+ // If user is submitting custom option values for this widget
302
+ if ( $_POST['countdown-submit'] ) {
303
+ // Remember to sanitize and format use input appropriately.
304
+ foreach($options as $key => $value){
305
+ $options[$key] = strip_tags(stripslashes($_POST['countdown-'.sanitizer($key)]));
306
+ }
307
+
308
+ // Save changes
309
+ update_option('widget_countdown', $options);
310
+ }
311
+
312
+ // title option
313
+ echo '<p style="text-align:left"><label for="countdown-title">Title: <input style="width: 200px;" id="countdown-title" name="countdown-title" type="text" value="'.$options['title'].'" /></label></p>';
314
+
315
+ //description
316
+ echo '<p style="text-align:left"><label for="countdown-description">Description: <input style="width: 200px;" id="countdown-description" name="countdown-description" type="text" value="'.$options['description'].'" /></label></p>';
317
+
318
+ //url
319
+ echo '<p style="text-align:left"><label for="countdown-url">URL: <input style="width: 200px;" id="countdown-url" name="countdown-url" type="text" value="'.$options['url'].'" /></label></p>';
320
+
321
+ //url target
322
+ echo '<p style="text-align:left"><label for="countdown-urltarget">Link Target: <input style="width: 200px;" id="countdown-urltarget" name="countdown-urltarget" type="text" value="'.$options['urltarget'].'" /></label></p>';
323
+
324
+ //url text
325
+ echo '<p style="text-align:left"><label for="countdown-urltext">Link Text: <input style="width: 200px;" id="countdown-urltext" name="countdown-urltext" type="text" value="'.$options['urltext'].'" /></label></p>';
326
+
327
+ //url position Slector
328
+ $dom = '';
329
+ $sub = '';
330
+ if($options['urlpos'] == 'top'){
331
+ $dom = 'CHECKED';
332
+ }
333
+ else{
334
+ $sub = 'CHECKED';
335
+ }
336
+
337
+ //Is the link a top or a bottom?
338
+ echo '<p style="text-align:left"><label for="countdown-urlpos">Link Position: <br/><input id="countdown-urlpos" name="countdown-urlpos" type="radio" '.$dom.' value="top" /> Above Counter </label><input id="countdown-urlpos" name="countdown-urlpos" type="radio" '.$sub.' value="bottom" /> Below Counter </label> </p>';
339
+
340
+ //Target Date
341
+ echo '<p style="text-align:left"><label for="countdown-day">Target Date (DD-MM-YYYY):<br/><input style="width: 30px;" id="countdown-day" name="countdown-day" type="text" value="'.$options['day'].'" /></label>-<input style="width: 30px;" id="countdown-month" name="countdown-month" type="text" value="'.$options['month'].'" />-<input style="width: 40px;" id="countdown-year" name="countdown-year" type="text" value="'.$options['year'].'" /></p>';
342
+
343
+ //Target Time
344
+ echo '<p style="text-align:left"><label for="countdown-hour">Target Time (HH:MM:SS):<br/><input style="width: 30px;" id="countdown-hour" name="countdown-hour" type="text" value="'.$options['hour'].'" /></label>:<input style="width: 30px;" id="countdown-min" name="countdown-min" type="text" value="'.$options['min'].'" />:<input style="width: 30px;" id="countdown-sec" name="countdown-sec" type="text" value="'.$options['sec'].'" /></p>';
345
+
346
+ //weeks text
347
+ echo '<p style="text-align:left"><label for="countdown-weektitle">How do you spell "weeks"?: <input style="width: 200px;" id="countdown-weektitle" name="countdown-weektitle" type="text" value="'.$options['weektitle'].'" /></label></p>';
348
+
349
+ //days text
350
+ echo '<p style="text-align:left"><label for="countdown-urltext">How do you spell "days"?: <input style="width: 200px;" id="countdown-daytitle" name="countdown-daytitle" type="text" value="'.$options['daytitle'].'" /></label></p>';
351
+
352
+ //hours text
353
+ echo '<p style="text-align:left"><label for="countdown-hourtitle">How do you spell "hours"?: <input style="width: 200px;" id="countdown-hourtitle" name="countdown-hourtitle" type="text" value="'.$options['hourtitle'].'" /></label></p>';
354
+
355
+ //minutes text
356
+ echo '<p style="text-align:left"><label for="countdown-mintitle">How do you spell "minutes"?: <input style="width: 200px;" id="countdown-mintitle" name="countdown-mintitle" type="text" value="'.$options['mintitle'].'" /></label></p>';
357
+
358
+ //seconds text
359
+ echo '<p style="text-align:left"><label for="countdown-sectitle">And "seconds" are spelled how?: <input style="width: 200px;" id="countdown-sectitle" name="countdown-sectitle" type="text" value="'.$options['sectitle'].'" /></label></p>';
360
+
361
+
362
+ //Omit Week Slector
363
+ $negative = '';
364
+ $positive = '';
365
+ if($options['omitweeks'] == 'false'){
366
+ $negative = 'CHECKED';
367
+ }
368
+ else{
369
+ $positive = 'CHECKED';
370
+ }
371
+
372
+ //Omit Weeks
373
+ echo '<p style="text-align:left"><label for="countdown-omitweeks">Omit Weeks:<input id="countdown-omitweeks" name="countdown-omitweeks" type="radio" '.$negative.' value="false" /> No </label><input id="countdown-omitweeks" name="countdown-omitweeks" type="radio" '.$positive.' value="true" /> Yes </label> </p>';
374
+
375
+ //style Slector
376
+ //grab all folder names from the css directory
377
+ /*$light = '';
378
+ $dark = '';
379
+ if($options['style'] == 'jedi'){
380
+ $light = 'CHECKED';
381
+ }
382
+ else{
383
+ $dark = 'CHECKED';
384
+ }*/
385
+
386
+ //Light or Dark Style? You choose!
387
+ //echo '<p style="text-align:left"><label for="countdown-style">What side of the Force are you on?: <br/><input id="countdown-style" name="countdown-style" type="radio" '.$light.' value="jedi" /> Jedi </label><input id="countdown-style" name="countdown-style" type="radio" '.$dark.' value="darth" /> Darth </label> </p>';
388
+
389
+ echo '<p style="text-align:left"><label for="countdown-style">Select your style: <br/>';
390
+ echo '<select name="countdown-style" id="countdown-style">';
391
+ $styles_arr = folder_array('../'.PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) ).'/css');
392
+ foreach($styles_arr as $style){
393
+ $selected = "";
394
+ if($options['style'] == $style){
395
+ $selected = 'SELECTED';
396
+ }
397
+ echo '<option value="'.$style.'" '.$selected.'>'.$style.'</option>';
398
+ }
399
+ echo '</select>';
400
+
401
+ // Submit
402
+ echo '<input type="hidden" id="countdown-submit" name="countdown-submit" value="1" />';
403
+ }
404
+ // This registers our widget so it appears with the other available
405
+ // widgets and can be dragged and dropped into any active sidebars.
406
+ //register_sidebar_widget('jQuery T Minus CountDown', 'widget_countdown');
407
+ wp_register_sidebar_widget( 'jquery-countdown', 'jQuery T Minus CountDown', 'widget_countdown');
408
+
409
+ // This registers our optional widget control form.
410
+ wp_register_widget_control('jquery-countdown', 'jQuery T Minus CountDown', 'widget_countdown_control');
411
+ }
412
+
413
+ // Run code later in case this loads prior to any required plugins.
414
+ add_action('plugins_loaded', 'widget_countdown_timer_init');
415
+
416
  ?>
images/dark_bg_dash.png DELETED
Binary file
images/dash.png DELETED
Binary file
images/light_bg_dash.png DELETED
Binary file
images/loading.gif DELETED
Binary file
js/jquery.lwtCountdown-1.0.js CHANGED
@@ -1,15 +1,17 @@
1
  /*!
2
  * jQuery Countdown plugin v1.1
 
3
  * http://www.littlewebthings.com/projects/countdown/
4
  *
5
- * Copyright 2010, Vassilis Dourdounis, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
9
  * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
 
13
  *
14
  * The above copyright notice and this permission notice shall be included in
15
  * all copies or substantial portions of the Software.
@@ -22,6 +24,7 @@
22
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
  * THE SOFTWARE.
24
  */
 
25
  (function($){
26
 
27
  $.fn.countDown = function (options) {
@@ -31,12 +34,10 @@
31
 
32
  diffSecs = this.setCountDown(config);
33
 
34
- if (config.onComplete)
35
- {
36
  $.data($(this)[0], 'callback', config.onComplete);
37
  }
38
- if (config.omitWeeks)
39
- {
40
  $.data($(this)[0], 'omitWeeks', config.omitWeeks);
41
  }
42
 
@@ -58,12 +59,10 @@
58
  $.fn.setCountDown = function (options) {
59
  var targetTime = new Date();
60
 
61
- if (options.targetDate)
62
- {
63
  targetTime = new Date(options.targetDate.month + '/' + options.targetDate.day + '/' + options.targetDate.year + ' ' + options.targetDate.hour + ':' + options.targetDate.min + ':' + options.targetDate.sec + (options.targetDate.utc ? ' UTC' : ''));
64
  }
65
- else if (options.targetOffset)
66
- {
67
  targetTime.setFullYear(options.targetOffset.year + targetTime.getFullYear());
68
  targetTime.setMonth(options.targetOffset.month + targetTime.getMonth());
69
  targetTime.setDate(options.targetOffset.day + targetTime.getDate());
@@ -84,11 +83,9 @@
84
 
85
  $.fn.doCountDown = function (id, diffSecs, duration) {
86
  $this = $('#' + id);
87
- if (diffSecs <= 0)
88
- {
89
  diffSecs = 0;
90
- if ($.data($this[0], 'timer'))
91
- {
92
  clearTimeout($.data($this[0], 'timer'));
93
  }
94
  }
@@ -96,13 +93,12 @@
96
  secs = diffSecs % 60;
97
  mins = Math.floor(diffSecs/60)%60;
98
  hours = Math.floor(diffSecs/60/60)%24;
99
- if ($.data($this[0], 'omitWeeks') == true)
100
- {
101
  days = Math.floor(diffSecs/60/60/24);
102
  weeks = Math.floor(diffSecs/60/60/24/7);
103
  }
104
- else
105
- {
106
  days = Math.floor(diffSecs/60/60/24)%7;
107
  weeks = Math.floor(diffSecs/60/60/24/7);
108
  }
@@ -111,41 +107,38 @@
111
  $this.dashChangeTo(id, 'minutes_dash', mins, duration ? duration : 1000);
112
  $this.dashChangeTo(id, 'hours_dash', hours, duration ? duration : 1000);
113
  $this.dashChangeTo(id, 'days_dash', days, duration ? duration : 1000);
 
114
  $this.dashChangeTo(id, 'weeks_dash', weeks, duration ? duration : 1000);
 
115
 
116
  $.data($this[0], 'diffSecs', diffSecs);
117
- if (diffSecs > 0)
118
- {
119
  e = $this;
120
  t = setTimeout(function() { e.doCountDown(id, diffSecs-1) } , 1000);
121
  $.data(e[0], 'timer', t);
122
  }
123
- else if (cb = $.data($this[0], 'callback'))
124
- {
125
  $.data($this[0], 'callback')();
126
  }
127
 
128
  };
129
 
 
130
  $.fn.dashChangeTo = function(id, dash, n, duration) {
131
- $this = $('#' + id);
132
-
133
- for (var i=($this.find('.' + dash + ' .digit').length-1); i>=0; i--)
134
- {
135
- var d = n%10;
136
- n = (n - d) / 10;
137
- $this.digitChangeTo('#' + $this.attr('id') + ' .' + dash + ' .digit:eq('+i+')', d, duration);
138
- }
139
  };
140
-
141
  $.fn.digitChangeTo = function (digit, n, duration) {
142
- if (!duration)
143
- {
144
  duration = 500;
145
  }
146
- if ($(digit + ' div.top').html() != n + '')
147
- {
148
-
149
  $(digit + ' div.top').css({'display': 'none'});
150
  // $(digit + ' div.bottom').css({'border-top': '1px solid #666'});
151
  $(digit + ' div.top').html((n ? n : '0')).slideDown(duration);
@@ -155,8 +148,6 @@
155
  $(digit + ' div.bottom').css({'display': 'block', 'height': ''});
156
  // $(digit + ' div.bottom').css({'border-top': 'none'});
157
  $(digit + ' div.top').hide().slideUp(10);
158
-
159
-
160
  });
161
  }
162
  };
1
  /*!
2
  * jQuery Countdown plugin v1.1
3
+ * http://www.twinpictures.de/t-countdown-widget
4
  * http://www.littlewebthings.com/projects/countdown/
5
  *
6
+ * Copyright 2010, Twinpictures, Vassilis Dourdounis
7
  *
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
9
  * of this software and associated documentation files (the "Software"), to deal
10
  * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, blend, trade,
12
+ * bake, hack, scramble, difiburlate, digest and/or sell copies of the Software,
13
+ * and to permit persons to whom the Software is furnished to do so, subject to
14
+ * the following conditions:
15
  *
16
  * The above copyright notice and this permission notice shall be included in
17
  * all copies or substantial portions of the Software.
24
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
  * THE SOFTWARE.
26
  */
27
+
28
  (function($){
29
 
30
  $.fn.countDown = function (options) {
34
 
35
  diffSecs = this.setCountDown(config);
36
 
37
+ if (config.onComplete){
 
38
  $.data($(this)[0], 'callback', config.onComplete);
39
  }
40
+ if (config.omitWeeks){
 
41
  $.data($(this)[0], 'omitWeeks', config.omitWeeks);
42
  }
43
 
59
  $.fn.setCountDown = function (options) {
60
  var targetTime = new Date();
61
 
62
+ if (options.targetDate){
 
63
  targetTime = new Date(options.targetDate.month + '/' + options.targetDate.day + '/' + options.targetDate.year + ' ' + options.targetDate.hour + ':' + options.targetDate.min + ':' + options.targetDate.sec + (options.targetDate.utc ? ' UTC' : ''));
64
  }
65
+ else if (options.targetOffset){
 
66
  targetTime.setFullYear(options.targetOffset.year + targetTime.getFullYear());
67
  targetTime.setMonth(options.targetOffset.month + targetTime.getMonth());
68
  targetTime.setDate(options.targetOffset.day + targetTime.getDate());
83
 
84
  $.fn.doCountDown = function (id, diffSecs, duration) {
85
  $this = $('#' + id);
86
+ if (diffSecs <= 0){
 
87
  diffSecs = 0;
88
+ if ($.data($this[0], 'timer')){
 
89
  clearTimeout($.data($this[0], 'timer'));
90
  }
91
  }
93
  secs = diffSecs % 60;
94
  mins = Math.floor(diffSecs/60)%60;
95
  hours = Math.floor(diffSecs/60/60)%24;
96
+
97
+ if ($.data($this[0], 'omitWeeks') == true){
98
  days = Math.floor(diffSecs/60/60/24);
99
  weeks = Math.floor(diffSecs/60/60/24/7);
100
  }
101
+ else{
 
102
  days = Math.floor(diffSecs/60/60/24)%7;
103
  weeks = Math.floor(diffSecs/60/60/24/7);
104
  }
107
  $this.dashChangeTo(id, 'minutes_dash', mins, duration ? duration : 1000);
108
  $this.dashChangeTo(id, 'hours_dash', hours, duration ? duration : 1000);
109
  $this.dashChangeTo(id, 'days_dash', days, duration ? duration : 1000);
110
+ $this.dashChangeTo(id, 'days_trip_dash', days, duration ? duration : 1000);
111
  $this.dashChangeTo(id, 'weeks_dash', weeks, duration ? duration : 1000);
112
+ $this.dashChangeTo(id, 'weeks_trip_dash', weeks, duration ? duration : 1000);
113
 
114
  $.data($this[0], 'diffSecs', diffSecs);
115
+ if (diffSecs > 0){
 
116
  e = $this;
117
  t = setTimeout(function() { e.doCountDown(id, diffSecs-1) } , 1000);
118
  $.data(e[0], 'timer', t);
119
  }
120
+ else if (cb = $.data($this[0], 'callback')){
 
121
  $.data($this[0], 'callback')();
122
  }
123
 
124
  };
125
 
126
+
127
  $.fn.dashChangeTo = function(id, dash, n, duration) {
128
+ $this = $('#' + id);
129
+ //loop through each digit and chage that dude
130
+ for (var i=($this.find('.' + dash + ' .digit').length-1); i>=0; i--){
131
+ var d = n%10;
132
+ n = (n - d) / 10;
133
+ $this.digitChangeTo('#' + $this.attr('id') + ' .' + dash + ' .digit:eq('+i+')', d, duration);
134
+ }
 
135
  };
136
+
137
  $.fn.digitChangeTo = function (digit, n, duration) {
138
+ if (!duration){
 
139
  duration = 500;
140
  }
141
+ if ($(digit + ' div.top').html() != n + ''){
 
 
142
  $(digit + ' div.top').css({'display': 'none'});
143
  // $(digit + ' div.bottom').css({'border-top': '1px solid #666'});
144
  $(digit + ' div.top').html((n ? n : '0')).slideDown(duration);
148
  $(digit + ' div.bottom').css({'display': 'block', 'height': ''});
149
  // $(digit + ' div.bottom').css({'border-top': 'none'});
150
  $(digit + ' div.top').hide().slideUp(10);
 
 
151
  });
152
  }
153
  };
readme.txt CHANGED
@@ -1,16 +1,17 @@
1
- === Plugin Name ===
 
2
  Contributors: Twinpictures, G2, littlewebthings
3
- Donate link: http://www.twinpictures.de/t-minus-countdown-widget
4
  Tags: countdown, timer, clock, ticker, widget, event, counter, count down, t minus, t-minus, twinpictures, G2, spaceBros, littlewebtings, jQuery, javascript
5
  Requires at least: 2.7
6
  Tested up to: 3.0.1
7
- Stable tag: 1.5
8
 
9
- jQuery T Minus CountDown Widget is a sidebar widget that will display a sweet-n-sexy pure javascript countdown timer clock based on littlewebtings CountDown plugin.
10
 
11
  == Description ==
12
 
13
- jQuery T Minus CountDown Widget will display a sweet, sexy and totally flash-free countdown timer clock based on littlewebthings CountDown jQuery plugin. Perfect for informing website visitors of an upcomming event, such as a new post or even a pending space voyage. As yes, there is also a css jedi mindtrick for your viewing pleasure--intergalactic planatary thanks to G2 (Gagarin2) of SpaceBros. Own your time and space.
14
 
15
  == Installation ==
16
 
@@ -25,6 +26,12 @@ jQuery T Minus CountDown Widget will display a sweet, sexy and totally flash-fre
25
 
26
  == Frequently Asked Questions ==
27
 
 
 
 
 
 
 
28
  = How does one pronounce T Minus? =
29
 
30
  1. Tee - As in Tea for Two, or Tee off time
@@ -42,6 +49,11 @@ The Daily Show with John Stewart
42
 
43
  == Changelog ==
44
 
 
 
 
 
 
45
  = 1.5 =
46
  * Cleaned up code that was throwing array_merge warning errors on some systems.
47
 
@@ -62,11 +74,14 @@ The Daily Show with John Stewart
62
 
63
  == Upgrade Notice ==
64
 
 
 
 
65
  = 1.5 =
66
  Version 1.5 cleans up code that was causing array_merge errors on some systems. NOTE: if a custom CSS is being used, be sure to back up your css and image files before updating. Updating will overwrite custom css styles.
67
 
68
  = 1.4 =
69
- Version 1.4 refers to your local WordPress Timezone for time caluclations. In case the server is hosted outside of the website's local timezone. It happens.
70
 
71
  = 1.3 =
72
  Version 1.3 fixes the issue no before/after widget/title issues due to lack of sleep during v. 1.2.
1
+ === Plugin Name ===
2
+
3
  Contributors: Twinpictures, G2, littlewebthings
4
+ Donate link: http://www.twinpictures.de/t-minus-countdown-widget/
5
  Tags: countdown, timer, clock, ticker, widget, event, counter, count down, t minus, t-minus, twinpictures, G2, spaceBros, littlewebtings, jQuery, javascript
6
  Requires at least: 2.7
7
  Tested up to: 3.0.1
8
+ Stable tag: 1.6
9
 
10
+ jQuery T Minus CountDown Widget displays a highly customizable, sweet-n-sexy flash-free countdown timer in the sidebar.
11
 
12
  == Description ==
13
 
14
+ jQuery T Minus CountDown Widget will display a sweet, sexy and totally flash-free countdown timer clock based on littlewebthings' CountDown jQuery plugin. Perfect for informing one's website visitors of an upcoming event, such as a pending space voyage. Using Jedi Mindtricks and CSS... but mostly CSS, the countdown timer is highly customizable for your viewing pleasure. Intergalactic planetary thanks to G2 (www.g2.de) and Lauren (www.???) for the included css flavors.
15
 
16
  == Installation ==
17
 
26
 
27
  == Frequently Asked Questions ==
28
 
29
+ = How do I create custom styles? =
30
+
31
+ 1. create a new sub-folder in the plugin's css folder
32
+ 1. name the css file style.css
33
+ 1. select the new style in the widget settings, save and that's it.
34
+
35
  = How does one pronounce T Minus? =
36
 
37
  1. Tee - As in Tea for Two, or Tee off time
49
 
50
  == Changelog ==
51
 
52
+ = 1.6 =
53
+ * Added automatic 3-digit weeks and days.
54
+ * Pimped out the Jedi css switcher to better handle user generated styles.
55
+ * Added new carbonite style by Lauren at siliconstudio.com
56
+
57
  = 1.5 =
58
  * Cleaned up code that was throwing array_merge warning errors on some systems.
59
 
74
 
75
  == Upgrade Notice ==
76
 
77
+ = 1.6 =
78
+ Version 1.6 brings much love to the countdown user. First, automatic triple digit weeks and days have been added. Next, the Jedi style switcher has been revamped to better handle user generated css. Finally, a third default style has been added called Carbonite designed by Laruen at siliconstudio.com.
79
+
80
  = 1.5 =
81
  Version 1.5 cleans up code that was causing array_merge errors on some systems. NOTE: if a custom CSS is being used, be sure to back up your css and image files before updating. Updating will overwrite custom css styles.
82
 
83
  = 1.4 =
84
+ Version 1.4 refers to your local WordPress Timezone for time calculations. In case the server is hosted outside of the website's local timezone. It happens.
85
 
86
  = 1.3 =
87
  Version 1.3 fixes the issue no before/after widget/title issues due to lack of sleep during v. 1.2.