I have finally gotten around to cleaning up the quickie update I did to help out the Blog for America folks.
So, here is a summary of the changes in this version:
- Bugfixes:
- Changed time difference checking to look for
difference >= 0instead of justdifference > 0. This may have caused some odd behavior when time differences fell on exact boundaries.
- Changed time difference checking to look for
- New Attributes:
MTCountdown/MTCountup:count_only- A list of the specific time periods to check, seperated by a commas (e.g. "years,days,hours")
- Only periods from the following list will be considered:
- years
- weeks
- days
- hours
- minutes
- seconds
- Important: The time periods will be counted in the order they are given. If you put 'days' before 'years', the 'days' counter will gobble up all the time before checks for 'years' are performed.
Download it here:
Note: I know I have been asked this before, so I would like to head off the feature requests right now. I currently have no plans to incorporate 'months' into the list of periods checked, as months do not have a fixed length. If somebody else wants to put together the code to do that calculation, I would be happy to integrate it into the plugin, but I do not plan on doing it myself.
I'm unable to get this to work properly. Here's the code I've entered:
days,
hours,
minutes,
seconds
until I leave for Europe.
It's only outputting the hours and minutes but not the days or seconds. Can you see what I'm doing wrong?
Isn't Dean out of the running?
Isn't Dean out of the running?
This code:
<MTCountdown until="2004-12-25 00:00:00">
<MTCountdownIfDays><MTCountdownDays> days, </MTCountdownIfDays>
<MTCountdownIfHours><MTCountdownHours> hours </MTCountdownIfHours>
</MTCountdown>
Returns the following error:
Build error in template 'Left Column': Error in tag: '' does not match
MT::App::CMS=HASH(0x834a05c) Use of uninitialized value in substitution (s///) at plugins/countdown.pl line 87.
MT::App::CMS=HASH(0x834a05c) Use of uninitialized value in pattern match (m//) at plugins/countdown.pl line 94.
MT::App::CMS=HASH(0x834a05c) Use of uninitialized value in concatenation (.) or string at plugins/countdown.pl line 98.
Hey good job at Blog for America. The candidate didn't make it but the blog was a hit.
I get the following error message :(
Build error in template 'Main Index': Error in tag: '' does not match
Please help!
Does this plug-in still require the Storable.pm? Installed the plug-in (easy... ) then "Can't locate Storable.pm in @INC" up on the screen...
Does this work in MT 3.0?
I'm getting the same error as Doc. Any advice?
I'm having the same problem as Doc and Jenna. Anyone have any suggestions?
I had problems with the published template code, then tried using date= instead of until=
The code was published, but the count wrong.
It gave me 6 days until january!
Using MT3.2
By the way the sign-in for typekey seems suspect, I got an error.
The problem is a missing set of parentheses in some code around line 81. Change it to:
my $until = ($args->{'date'} or $args->{'until'}) or
return $ctx->error ("MTCount$tag requires a 'date' or 'until' argument");