fergbrain
Forum Replies Created
-
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] Removing line break in timerThis will be fixed in the next release. Solution is to add the following CSS to your CSS files:
.fergcorp_countdownTimer_timeUnit {white-space: nowrap;}@plovgren:
The reason that “+100” is added to the end of your event is because you are in the UTC+1 timezone (as set in your General Settings). So really, you actually want/need the +100 there. However, it doesn’t take into account when DST begins and Sweden goes to UTC+2 (DST in Sweden starts on March 27) before your event takes place, which I think is where your issue is. Thus, technically speaking there is an extra hour that exists.For example:
Assume today is March 1 at 5pm.
If I have an event set for March 2 at 5pm, the actual difference in hours is 24 and the calculated difference in hours is 24.Assume today is March 26 at 5pm.
If I have an event set for March 27 at 5pm, the actual difference in hours is 23 and the calculated difference in hours is 24.A potential solution would be to input the time and make sure you designate the UTC offset as +0200. It will modify the time to report it in terms of UTC+0100, however the countdown will be numerically correct.
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] Error on activationDisable all other plugins and then attempt to re-enable this plugin. If that works, start re-enabling your other plugins until you get the same error. If you can let me know what that plugin is, I might be able figure out what’s going on.
Can you send me a URL to look at?
Perhaps not the end of the world, but still annoying…and I don’t like annoying.
Solution:
There’s a regex replace at the end of the JS file that needs to be modified to:
return s.replace(/(, <\/span> *)$/, "<\/span>"); //...and return the result (a string)I think that’s right….regex can be tricky (https://www.xkcd.com/208/).
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] – Leading Zeros Option?There currently is not functionality for this. However, I don’t think it’s too complex to include and it does make sense. I’ll see if I can include this in the next version.
@bborman: Do you mean something more than the “Strip non-significant zeros” options? If so, can you start a new thread?
Yes. You can also modify js/fergcorp_countdownTimer_java.js the same way you modified the PHP. I did my best to port the script from PHP to JS, so things should look familiar.
You’ll need to modify strings where the “s” variable is set, which is between lines 113 and 207.
Using the above example, you’d modify:
s = s + sprintf(_n(fergcorp_countdownTimer_js_language['minute'], fergcorp_countdownTimer_js_language['minutes'], resultantMinute), resultantMinute) + ' ';to
s = s + '<span class="fergcorp_countdownTimer_min">' + sprintf(_n(fergcorp_countdownTimer_js_language['minute'], fergcorp_countdownTimer_js_language['minutes'], resultantMinute), resultantMinute) + '</span> ';Two things:
1) I think that “id” should actually be “class”, especially if you have more than one timer.
2) Try disabling JS updating for the timer. The time is updated by re-writing the inner HTML of abbr with a given unique id (e.g. xa93f086a6806c83f405519636a9ec090).
Can you pass along the URL you’ve implemented this on so I can take a look at the HTML output?
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] Removing line break in timerThere’s not an easy way to accomplish this without modifying the code to prevent line break from occurring at specific point. I may elect to fix this issue in a future release though: http://plugins.trac.wordpress.org/ticket/1269
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] Er, How to add events? Part DeuxSorry, it’s been a crazy couple of weeks.
Anyway, I’m not sure what the issue is and it kind of has me stumped. The only other thing I can do is, if you grant me access to your blog, I can take a look first hand.
Forum: Plugins
In reply to: [Countdown Timer] [Plugin: Countdown Timer] Seperate events.fergcorp_countdownTimer_event_li{ margin: 2em; }You can tweak the
2emto make the spacing bigger or smaller.December 2 is a Thursday, not a Monday.
The key phrase you want to focus on is “will parse about any English textual datetime description.” That, essentially, means that you can write it in just about anyway that makes sense and the system will figure it out.
Thus, if you wanted to count down to your birthday, you would enter:
[fergcorp_cdt_single date="July 28, 1962"]