Support » Plugin: CSSable Countdown » Milliseconds

Viewing 1 replies (of 1 total)
  • 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 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Milliseconds’ is closed to new replies.