• Hello folks,
    I wonder if any of you coding gurus out there can help me hack the above plugin to enable me to start the countdown 15 hours before the event. At the moment there are only options for 1 hour or 2 hours then it goes on to 24 hours.

    The problem I have is that I have one instance already running counting down to when the EU referendum polls open and another to take over when the first poll event occurs. The voting period to close of polls is 15 hours and I need to countdown from the point when the polls open.

    Can anyone help?

    My site is: theunituk.org.uk.

    Many thanks in advance

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I’m plugin developer. You are right – “15 hours before event” option is missing. You can add it yourself if you edit smartcountdownfx.php file and add a line around LINE 388:

    '54000:0' => 'Show counter 15 hours before event',

    Just find the line starting with ‘7200:0’ => sprintf and insert the code I provided on a new line after this one.

    Just note that if you publish Smart Countdown FX using shortcode you have more flexibility and can set “15 hours before” option in “mode” attribute:

    mode="54000:0"

    You can read more here: https://wp.smartcalc.org/reference/
    Regards, Alex

    Thread Starter Peter Brown

    (@paderb)

    Thank you very much Alex.

    I had an idea that the solution would be along those lines when I used the ‘Edit’ function on the installed plugins page. Can I do the alterations on that page or would I need to go to the file in my public.html folder?

    One other observation; when testing the widget to see what would happen when the event had occurred, I noticed that the countdown was one hour behind ‘computer’ time and had to reset both timers to one hour earlier on my site.

    That aside, it is a really useful widget and you have my congratulations and thanks. If you should update the widget, would it be possible to hide the clock on countdown and show an announcement such as ‘time’s up’ or something similar when the event time is reached?

    You are welcome.
    1. I think both methods are valid. Personally I have never used “Edit” function, for me as a developer it is much easier to edit plugin source file directly. “Edit” function tends to reformat files (e.g. convert tabs to 4 spaces) so that a file saved from “Edit” function will give difference on every line if compared with original version and it is almost impossible to track real changes.
    The problem that arises from modifying plugin source is that all modifications are lost on plugin update. There is no good solution: I cannot add all possible options to widget configuration, so “15 hours” cannot appear in official version. Of course, you can take a note of the modification you did and repeat it every time you update the plugin.
    I will think about making “Counter display mode” setting more flexible, i.e. convert grouped list to text fields (before event / after event).
    On the other hand there are solutions which allow to use shortcode in widget areas. As I mentioned in my previous reply, shortcode version of Smart Countdown FX already implements custom “counter display mode” limits.
    2. If you experience time zone issues please check that you have correct time zone set in WP general setting. Also if the event date and the moment you view the page belong to different DST (daylight saving time) periods, 1 hour “error” is actually not an error.
    3. This feature is already implemented. ‘Use titles for count up mode as “Time has arrived” message’ (widget configuration) / “hide_countup_counter” attribute in shortcode. https://wp.smartcalc.org/reference/
    Regards, Alex

    Thread Starter Peter Brown

    (@paderb)

    Apologies for not replying Alex. I did not receive an email notification of your second post.

    Thank you very much for your explicit answers to my question. I have absolutely no experience in coding or for web page authoring for that matter. I have had to rely on good people like yourself that so generously publishes widgets and plugins for us and hope that I can find the right plugin for the function that I require.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hacking 'Smart Countdown FX'’ is closed to new replies.