Forum Replies Created

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

    (@dmonnier)

    If the plugin already has a date/time set, you’d need to do an Ajax or hard refresh to insert a new time value into the plugin.

    You can have multiple plugins on the same page and can mix both shortcode and hardcoded PHP calls. Keep the original time value in one call of the plugin, and call the plugin again somewhere else with different parameters.

    The shortcode parameters are defined in the FAQ section on the plugin page. Just follow the given format values and make sure everything’s syntactically correct.

    Plugin Author dmonnier

    (@dmonnier)

    Time zone information of the browser is not part of the HTTP specifications, so you can’t just get it from a header. You’ll need a Javascript/JQuery library to determine the visitor’s timezone and then pull that into the plugin. Here’s two Stack Overflow articles with multiple implementations you can use.

    Plugin Author dmonnier

    (@dmonnier)

    The plugin by itself is just a static countdown/countup from a given date/time. You would need to handle this with PHP and maybe Javascript/JQuery to add 1 day to today’s date (or whatever the user specified), then pass this new date to the plugin, and it will re-generate with the new time.

    Plugin Author dmonnier

    (@dmonnier)

    This will not work because you cannot nest HTML like that. The first opening ” for the div style is closing the expiry text parameter. This is what the DOM is seeing:

    expirytext="<div style="

    and the remaining is parsing as invalid HTML.

    You would have to modify the plugin files directly in order to include an iframe, and then the plugin would become very specific to this application.

    I will consider this for the next version of the plugin, if there is one.

    Plugin Author dmonnier

    (@dmonnier)

    This has already been reported in another support thread. The reason why you’re getting his error is because another plugin is conflicting with CSSable Countdown. HOWEVER, the fix is very simple:

    Open CSSable-Countdown.php and search for:

    function my_enqueue($hook)

    Replace my_enqueue($hook) to cssable_countdown_enqueue($hook)

    then a couple lines down:

    add_action( 'admin_enqueue_scripts', 'my_enqueue' );

    change that my_enqueue to cssable_countdown_enqueue.

    I will fix this in the next release of this plugin and I’ll make sure I name my functions better next time ??

    If this solution doesn’t work, please let me know, but I’m pretty sure it will.

    Plugin Author dmonnier

    (@dmonnier)

    Put the countdown in a wrapper div, then margin: 0 auto; on the wrapper div.

    Stack Overflow example

    Plugin Author dmonnier

    (@dmonnier)

    Use the shortcode to make the countdown show up on pages and/or posts. The directions are in the FAQ tab for the plugin, second section down titled “How do I use the shortcode?” It’s not as easy as the pretty interface on the widget, but it does the job.

    Let me know if you have trouble using the shortcode, but hopefully the FAQ is clear enough on its own.

    Plugin Author dmonnier

    (@dmonnier)

    This is not my plugin. My plugin is CSSable Countdown, not jcountdown. Please ask that plugin’s author for help.

    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.

    You can see some of the design styles in the banner for this plugin. I don’t have any code examples right now, but I’m working on these for next release.

    Plugin Author dmonnier

    (@dmonnier)

    You would use CSS for this. Look into flex-box for source re-ordering. Alternatively, you could just use the title attribute if you don’t want to muck about with source re-ordering.

    I’ll look into adding this as a checkbox option in the next version of the plugin. Thank you ??

    Plugin Author dmonnier

    (@dmonnier)

    If you changed the name of the function to something unique like the suggested cssable_countdown_enqueue, you should not still be getting the exact same error…

    There are no other instances of my_enqueue, so if the function name change is not working, perhaps try a hard refresh after changing the function name. If it’s still the same error, you have cache issues. Clear the WordPress cache (such as if you’re running WP Total Cache) and your browser’s cache, then try a hard refresh.

    Other than that, try disabling all other plugins and enable them one-by-one until you find the one that conflicts with CSSable Countdown.

    Plugin Author dmonnier

    (@dmonnier)

    You are correct, another plugin is conflicting with CSSable Countdown. HOWEVER, the fix is very simple:

    Open CSSable-Countdown.php and search for:

    function my_enqueue($hook)

    Replace my_enqueue($hook) to cssable_countdown_enqueue($hook)

    then a couple lines down:

    add_action( 'admin_enqueue_scripts', 'my_enqueue' );

    change that my_enqueue to cssable_countdown_enqueue.

    Thank you very much for finding this incompatibility! I will fix this in the next release of this plugin and I’ll make sure I name my functions better next time ??

    If this solution doesn’t work, please let me know, but I’m pretty sure it will.

    Plugin Author dmonnier

    (@dmonnier)

    Yep! You’ll have to edit the template that utilizes the deadline using the WordPress function do_shortcode. Example based off your example:

    <?php
    //convert your deadline into a timestamp
    $timestamp = strtotime($_GET['deadline']);
    $deadline_date = date( 'm/d/Y', $timestamp );
    
    do_shortcode( '[countdown date='" . $deadline_date . "' ...] );
    ?>

    Completely doable, you just need to know a little code ??

    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" ...]' ); ?>

    Plugin Author dmonnier

    (@dmonnier)

    Hoo boy. This plug-in is aimed towards people who are comfortable with working directly with CSS files, but you could do it from the WordPress Dashboard. A word of warning – the Dashboard Editor will be making edits directly to your theme CSS file, so if you upgrade, re-install, or change your theme, your countdown CSS will be lost unless you copy and paste it every time.

    In the Dashboard, click on Appearance > Editor. You should see something like {Name of Theme}: Stylesheet (style.css). Add your CSS down at the bottom (or anywhere after the closing */ in the header block). These are the countdown-specific styles:

    /* countdown exists in this block */
    .hasCountdown {}
    
    /* event description */
    .countdown_descr {}
    
    /* number groups */
    .countdown_section {}
    
    /* numbers */
    .countdown_amount {}
    
    /* number labels */
    .countdown_label {}
    
    /* time's up! message */
    .times-up {}

    Since you went looking, the included CSS files for default, list, and text formats are in: /path/to/plugins/cssable-countdown/includes/css/. You can modify those, but when I put out a new version of the plugin and you upgrade, you’ll lose those changes.

    I strongly suggest that you not use the Dashboard to edit the theme CSS directly or edit any of the included CSS files. Instead, create a new file (say, countdown.css) in your theme directory and follow the FAQ under “How do I add my own CSS?“.

Viewing 15 replies - 1 through 15 (of 42 total)