dmonnier
Forum Replies Created
-
Forum: Plugins
In reply to: [CSSable Countdown] CSS Countdown TimerYep, 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?
Forum: Plugins
In reply to: [CSSable Countdown] insert without using shortcodeYou 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)
Forum: Plugins
In reply to: [CSSable Countdown] Inline DisplayYeah, a skeleton sample CSS is on my list for next release.
Forum: Plugins
In reply to: [CSSable Countdown] Inline DisplayIn your CSS, set
.hasCountdowntodisplay: inline;ordisplay: inline-block;.Ex:
<p>This offer expires in: [countdown ...]</p>Forum: Plugins
In reply to: [CSSable Countdown] Unique Visitor Timer?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 🙂
Forum: Plugins
In reply to: [CSSable Countdown] MillisecondsKeith 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 🙂
Forum: Plugins
In reply to: [CSSable Countdown] Using Theme FontYou 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-serifproperty.Forum: Plugins
In reply to: [CSSable Countdown] Styling tipYou 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?
Forum: Plugins
In reply to: [CSSable Countdown] two digits for each numberThis will be supported in version 2.0 of my plugin to match the original jQuery author’s version 2.0.0, which has a
padZeroesoption. I have no timeframe on this upgrade yet, sorry.Forum: Plugins
In reply to: [CSSable Countdown] Language isn't set – override?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 😛
Forum: Plugins
In reply to: [CSSable Countdown] Language isn't set – override?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.jsOpen 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.Forum: Plugins
In reply to: [CSSable Countdown] Expiry date in shortcode?Just a note: I’ve released version 1.4 to fix the
timeparameter not getting set correctly, so please make sure you download version 1.4, not version 1.3.Forum: Plugins
In reply to: [CSSable Countdown] Time optionchltx 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!) 🙂Forum: Plugins
In reply to: [CSSable Countdown] Time optionYou 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 >_<
Forum: Plugins
In reply to: [CSSable Countdown] Expiry date in shortcode?Hm. I’m not seeing this behavior on my end, so let’s rule out server, plugin, or theme incompatibilities.
- Verify that you’ve got the minimum requirements:
- WordPress 2.5+
- PHP 5.1.3+
- jQuery 2.0.0+
- Delete any versions of
CSSable Countdownyou’ve got installed. - Download and reinstall
CSSable Countdownversion 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
timeparameter, so that won’t work. Just try the minimum shortcode for now.