Forum Replies Created

Viewing 15 replies - 16 through 30 (of 42 total)
  • Plugin Author dmonnier

    (@dmonnier)

    Yep, but since it’s dynamic per-user you’ll have to code it in the template(s) for wherever the user will see it. Something like this in, say, header.php:

    if ( {user is logged in} )
    {
    	$subscription_expires_date = date( 'm/d/Y', {timestamp from database} );
    	$subscription_expires_time = date( 'H:i:s', {timestamp from database} );
    	do_shortcode( '[countdown date='" . $subscription_expires_date . "' time='" . $subscription_expires_time . "' ...]' );
    }

    It’s completely doable, you just need to know a little code. 🙂 Does this answer your question?

    Plugin Author dmonnier

    (@dmonnier)

    You can run shortcodes in a PHP template through the WordPress function do_shortcode like so:

    <?php do_shortcode( '[countdown date="MM/DD/YYYY" ...]' ); ?>

    If, for some reason, you’re completely unable to use shortcodes at all, you’d be better off removing my plugin (to reduce overhead) and installing the source and building the countdown yourself: Keith Woods jQuery Countdown (currently version 2.0.0, the next version of the script that my plugin is currently using)

    Plugin Author dmonnier

    (@dmonnier)

    Yeah, a skeleton sample CSS is on my list for next release.

    Plugin Author dmonnier

    (@dmonnier)

    In your CSS, set .hasCountdown to display: inline; or display: inline-block;.

    Ex:

    <p>This offer expires in: [countdown ...]</p>

    Plugin Author dmonnier

    (@dmonnier)

    Static countdowns on page reload are not available in this plug-in (yet), but in the meantime you can use PHP in a page template to generate and hard-code the expiration date based on the page load time. Something like:

    $add_time = 300; // 5 minutes = 300 seconds
    $target_timestamp = time() + $add_time;
    $target_time = date( 'H:i:s', $target_timestamp );
    $target_date = date( 'm/d/Y', $target_timestamp );
    
    echo do_shortcode( '[countdown date="' . $target_date . '" time="' . $target_time . '"]' );

    I didn’t test this, so be careful if you copy-paste.

    Since two of you have now requested this feature, I’ll add it to the list for the next version 🙂

    Plugin Author dmonnier

    (@dmonnier)

    Keith Wood’s jQuery script didn’t specify a way to include milliseconds. You’re welcome to suggest it to him via his webpage (bottom of the page).

    Static countdowns on page reload are not available in this plug-in (yet), but in the meantime you can use PHP in a page template to generate and hard-code the expiration date based on the page load time. Something like:

    $add_time = 300; // 5 minutes = 300 seconds
    $target_timestamp = time() + $add_time;
    $target_time = date( 'H:i:s', $target_timestamp );
    $target_date = date( 'm/d/Y', $target_timestamp );
    
    echo do_shortcode( '[countdown date="' . $target_date . '" time="' . $target_time . '"]' );

    I didn’t test this, so be careful if you copy-paste.

    Thanks for the suggestion, I’ll add it to the list for the next version 🙂

    Plugin Author dmonnier

    (@dmonnier)

    You can copy and/or add to the existing stylesheets from

    path_to\cssable-countdown\includes\css\

    The non-admin CSS files have comments to tell you which element styles what.

    To add your own stylesheet independent of the plugin, see the FAQ under How do I add my own CSS?

    You’re looking for the font-family: Arial, sans-serif property.

    Plugin Author dmonnier

    (@dmonnier)

    You can copy and/or add to the existing stylesheets from

    path_to\cssable-countdown\includes\css\

    The non-admin CSS files have comments to tell you which element styles what.

    To add your own stylesheet independent of the plugin, see the FAQ under How do I add my own CSS?

    Plugin Author dmonnier

    (@dmonnier)

    This will be supported in version 2.0 of my plugin to match the original jQuery author’s version 2.0.0, which has a padZeroes option. I have no timeframe on this upgrade yet, sorry.

    Plugin Author dmonnier

    (@dmonnier)

    Well, that was an exercise in foreign languages. Everyone needing the languages, please download version 1.5. The language should be set correctly, that is, it should match your blog’s language.

    9 Monate 2 Wochen 4 Tage 😛

    Plugin Author dmonnier

    (@dmonnier)

    Thanks for bringing this bug to my attention. Sorry, I didn’t realize that the jQuery plugin’s author didn’t localize the language files correctly. I’m working on a permanent fix for this, but in the meantime I think you can get it working by renaming and editing the following file:

    /path/to/plugins/cssable-countdown/langs/jquery.countdown-de.js
    to
    /path/to/plugins/cssable-countdown/langs/jquery.countdown-de_DE.js

    Open it and change:

    $.countdown.regionalOptions['de']
    to
    $.countdown.regionalOptions['de_DE']

    If the underscores don’t work, try a hyphen (de-DE), and if that still doesn’t work, I’ll fix it soon, no worries.

    Plugin Author dmonnier

    (@dmonnier)

    Just a note: I’ve released version 1.4 to fix the time parameter not getting set correctly, so please make sure you download version 1.4, not version 1.3.

    Plugin Author dmonnier

    (@dmonnier)

    chltx wins the prize, $instance['hours'] != $instance['hour'], which was why the hour parameter wasn’t getting set. Both of you, please download version 1.4 and it should work now. Thank you again for being patient with me (and for being guinea pig testers!) 🙂

    Plugin Author dmonnier

    (@dmonnier)

    You can always test it by temporarily switching to the Twenty Fourteen theme and seeing if the countdown works then. However, I’m seeing this behavior on my end as well, so I’m pretty sure the time is not getting set correctly in the code.

    Playing with timezones is fun 2 hours before DST starts >_<

    Plugin Author dmonnier

    (@dmonnier)

    Hm. I’m not seeing this behavior on my end, so let’s rule out server, plugin, or theme incompatibilities.

    1. Verify that you’ve got the minimum requirements:
    • WordPress 2.5+
    • PHP 5.1.3+
    • jQuery 2.0.0+
    • Delete any versions of CSSable Countdown you’ve got installed.
    • Download and reinstall CSSable Countdown version 1.3 and activate it.
    • Temporarily change your theme to Twenty Thirteen or Twenty Fourteen.
    • Temporarily disable all your plugins except for CSSable Countdown.
    • Navigate to wherever you’ve got the shortcode (page, widget, whatever).
    • Does the countdown work?

      Yes: One-by-one go through your plugins and enable them until the countdown stops working. Tell me the name of that plugin and I’ll go check it out if it’s on the WP repository.

      No: Post back here.

      N.B. The shortcode is bugged for the time parameter, so that won’t work. Just try the minimum shortcode for now.

Viewing 15 replies - 16 through 30 (of 42 total)