dmonnier
Forum Replies Created
-
Forum: Plugins
In reply to: [CSSable Countdown] Time optionI’m looking into why the shortcode is not performing correctly.
As for some CSS templates, that’s on my to-do list eventually.
I’ll be back, hopefully with an answer.
Forum: Plugins
In reply to: [CSSable Countdown] Expiry redirect in PHP.Thanks for the kind words 🙂
You can use HTML in the expiry text field, but in order to use the plugin as-is in a template, you’ll still have to use
do_shortcode().// check if the target date is expired if ( mktime( H,i,s,n,J,Y ) < mktime() ) { // do expired stuff } else { echo do_shortcode( '[countdown date="MM/DD/YYYY" ...]' ); }(Of course, this doesn’t take into account timezones or countup versions… you can modify as necessary with
gmmktime()and switch operands.)Alternatively, you can build the jQuery call yourself in templates. The plugin is built on top of Keith Wood’s jQuery Countdown (version 1.6.3), so if you have the plugin activated (or the jQuery scripts included), you can do something like this in your templates:
<div id="cssable-countdown" class="cssable-countdown layout-type_default"> <!-- do stuff you want showing regardless of countdown status --> </div> <script type="text/javascript"> jQuery(document).ready(function($) { $('#cssable-countdown').countdown({ until: new Date(2015, 12, 31, 0, 0, 0, 0), timezone: '-5', format: 'yOWD', alwaysExpire: 'true', expiryText: '<div id="timeExpired"><!-- stuff you only want showing if expired --></div>', }); }); </script>Does that help you?
Forum: Plugins
In reply to: [CSSable Countdown] Expiry date in shortcode?Yes, that’s how you set the expiry date. What version of the plugin are you using? The shortcode didn’t work correctly in earlier versions, so perhaps that’s what’s going on here.
If you’re using the most recent version of the plugin and it’s still giving you the wrong target date, let me know and we’ll debug from there.
Forum: Plugins
In reply to: [CSSable Countdown] Expiry date in shortcode?Yes. The FAQ tab has a detailed description of all the parameters the shortcode can use to fine-tune your countdown. This is the general syntax for setting a target date:
[countdown date="MM/DD/YYYY"]Or do you mean a way to not show the countdown when it’s expired? If so, you can set the
expiryTextparameter to an empty string or a<div>withdisplay: none;.Do either of these answer your question?
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesYay! Thank you for the bug-finding help!
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesBoth of you, please download version 1.2 and functionality should be restored. The javascript files weren’t in the right location in the SVN depository in 1.1, apparently. I apologize, I suck at SVN 🙂
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesQuick and dirty way is to open your admin panel and in your browser window go to View > Source (depends on which browser you have, but all browsers have a View Source option in the menus somewhere). You should see something like:
<script type='text/javascript' src='[YOUR URL]/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.8.1'></script>If your browser supports it, click the link, otherwise copy-and-paste that link into your browser window. You’ll see something like this:
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/licenseThat’s the version of jQuery that your admin panel is running.
Bit convoluted, I know. Sorry :/
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesInteresting. The new version uses 100% jQuery for toggling the options. Could you report on your installed version of jQuery and verify that it hasn’t been disabled for the admin panel?
Additionally, disable all other plugins and admin themes and see if CSSable Countdown works. If it does, one-by-one enable the other plugins until the options dropdown doesn’t work, then tell me which plugin it is and I’ll go have a peek at that plugin (assuming it’s on the repository).
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesI uploaded a new version 1.1 with the dropdown code rewritten. Please try it and see if it solves your problem.
Forum: Plugins
In reply to: [CSSable Countdown] Cannot access option pagesWhat version of WordPress are you using?
Forum: Plugins
In reply to: [CSSable Countdown] Plugin could not be activated: fatal errorThat’s what I thought. I researched a bit and PHP 5.3+ is required for anonymous inline functions. I’ll un-anonymize it for the next release. Thank you for the bug-find!
Forum: Plugins
In reply to: [CSSable Countdown] Plugin could not be activated: fatal errorWhat version of PHP are you running?