We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

NEW Plugin - MB Countdown…

Development and Programming

Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith

Any chance you could add years and months to this plugin?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen
Any chance you could add years and months to this plugin?

Very quickly put together but try out version 1.3 at the top of this thread. Hopefully should be working correctly.

Best wishes,

Mark

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
15 years ago
Sean C. Smith's avatar Sean C. Smith

Mark,

Thanks works perfectly - you can see it in action in the header here - needs some styling, but it works. Off to a conference, be back in 2 days.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen
Mark, Thanks works perfectly - you can see it in action in the header here - needs some styling, but it works. Off to a conference, be back in 2 days.

No problem at all. Be sure to check out the messy yet grammatically correct version above 😉

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen

Plugin now updated to V1.4. Only change is now that the conditionals have been added in for each variable so instead of doing :

{if "{months}" > "2"}
Spit this out
{/if}

you can now do the more correct version of :

{if months > 2}
Spit this out
{/if}

Nothing really major but does help to keep the code a little leaner. Updated plugin in first post and also code shown above too.

Best wishes,

Mark

       
Simon Cox's avatar
Simon Cox
405 posts
15 years ago
Simon Cox's avatar Simon Cox

Mark - great little plug-in. I used it last Christmas to good effect and am again this year so thanks for the update. However I cannot work out how to set the countdown to be for a certain time of the day - say 13:00?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
15 years ago
Mark Bowen's avatar Mark Bowen

Hi Simon,

Mark - great little plug-in. I used it last Christmas to good effect and am again this year so thanks for the update. However I cannot work out how to set the countdown to be for a certain time of the day - say 13:00?

Thanks for the kind words. Glad it’s coming in of use for some people. As to the time thing I’m pretty sure (Don’t hold me to this though) that if you do something like this :

{exp:mb_countdown date="6th May 2010 13:00" event="My Birthday"}
<h2>Grammatically Correct Version</h2>
{if years > 0}{years} year{if years > 1}s{/if}, {/if}{if months > 0}{months} month{if months > 1}s{/if}, {/if}{if days > 0}{days} day{if days > 1}s{/if}, {/if}{if hours > 0}{hours} hour{if hours > 1}s{/if}, {/if}{if minutes > 0}and {minutes} minute{if minutes > 1}s{/if}{/if} left until {event}
{/exp:mb_countdown}

where you have specified date=”6th May 2010 13:00” as the full parameter then I’m pretty sure that should work.

Best wishes,

Mark

       
Simon Cox's avatar
Simon Cox
405 posts
15 years ago
Simon Cox's avatar Simon Cox

Thanks Mark that worked a treat - now all I have to do is work out what time its actually counting down to - not 13:00 GMT that’s for sure - looks like its the server time and on this particular website that’s Pacific time I think!

       
Richard Kiss's avatar
Richard Kiss
20 posts
15 years ago
Richard Kiss's avatar Richard Kiss

Mark,

this a great and useful plugin, thanks for it!

I would like to print out the message using ‘X weeks and Y days left’ format. Can I do it with this plugin?

Regards RIchard

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.