Forum Replies Created

Viewing 12 replies - 31 through 42 (of 42 total)
  • Plugin Author dmonnier

    (@dmonnier)

    I’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.

    Plugin Author dmonnier

    (@dmonnier)

    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?

    Plugin Author dmonnier

    (@dmonnier)

    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.

    Plugin Author dmonnier

    (@dmonnier)

    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 expiryText parameter to an empty string or a <div> with display: none;.

    Do either of these answer your question?

    Plugin Author dmonnier

    (@dmonnier)

    Yay! Thank you for the bug-finding help!

    Plugin Author dmonnier

    (@dmonnier)

    Both 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 🙂

    Plugin Author dmonnier

    (@dmonnier)

    Quick 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/license

    That’s the version of jQuery that your admin panel is running.

    Bit convoluted, I know. Sorry :/

    Plugin Author dmonnier

    (@dmonnier)

    Interesting. 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).

    Plugin Author dmonnier

    (@dmonnier)

    I uploaded a new version 1.1 with the dropdown code rewritten. Please try it and see if it solves your problem.

    Plugin Author dmonnier

    (@dmonnier)

    What version of WordPress are you using?

    Plugin Author dmonnier

    (@dmonnier)

    That’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!

    Plugin Author dmonnier

    (@dmonnier)

    What version of PHP are you running?

Viewing 12 replies - 31 through 42 (of 42 total)