Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Countdown 1.2

old_manold_man New
edited January 2017 in Vanilla 2.0 - 2.8

The existing discussions on this are ancient, and don't address my question, so creating a new one.

I've downloaded this, installed it, enabled it, put in the settings, but for the life of me can't figure out how you insert it so it appears in a discussion. Maybe the plug-in is just not working, but I feel like I'm just missing something basic. Can anyone walk me through what's supposed to happen for a user when they open a new discussion and want to insert a countdown?

In the settings, I kept the text [COUNTDOWN], and then just added after that the text I want to follow it.

In the date field, I put the time and date the event will occur. I picked our time zone, NYC.

Alas, there is no prompt when I try to create a new discussion.

Thanks.

PS, I see my first effort, commenting on an earlier discussion has popped up on the general board too. My bad. I saw the "necro" on the Countdown page, and did not realize that meant it was going up on the general board. I thought it meant it was NOT going anywhere. Sorry for the clutter.

«13

Comments

  • OK, do I have to have pockets installed and enabled to be able to use the countdown plug-in?

  • R_JR_J Ex-Fanboy Munich Admin

    @old_man said:
    I thought it meant it was NOT going anywhere.

    So you've assumed you will be speaking to yourself? :lol:

    As far as I can tell the plugin will replace [COUNTDOWN] in any discussion or comment body with a nice countdown.

    But from what I can say, there can only be 1 countdown. e.g. it is not possible to have a countdown to Christmas and one to your birthday. And when I've tried to add a countdown to the discussion and also to a comment, the countdown in the comment wasn't displayed correct, but I haven't investigated that further (wouldn't make sense anyway)

  • R_JR_J Ex-Fanboy Munich Admin

    On the other hand, there is no permission for the replacement, so everyone would be able to add a countdown. If anybody does something like this: [COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN][COUNTDOWN] he would seriously mess up that discussion. I did so and had to kill the browser tab and change the comments body in the database :scream:

    By the way: do you really still use Vanilla < 2.3 or did you choose the wrong category by accident?

  • I've started a new discussion, and named it "test." In the body of the first post, I type [COUNTDOWN], and all I get in the first post is "[COUNTDOWN]."

    Yep, it says I'm running 2.2.

  • R_JR_J Ex-Fanboy Munich Admin
    1. Please upgrade to 2.3
    2. Please look in the JavaScript console for any hints why you do not get a countdown.
  • Can you direct me to a page on here telling me how to upgrade?

    I see the download page.

    Thanks.

  • R_JR_J Ex-Fanboy Munich Admin

    See that there is a category which is called Releases? Looking there is the best starting point. There is one discussion called "Vanilla 2.3 is now available" which also links to this document

    The process itself should be pretty easy to follow =)

  • Will do. My thinking is that the functionality of countdown 1.2 is not going to be dependent on the upgrade. If the upgrade fixes it, I'll report back. In the meantime, if anyone has any input on what I'm doing wrong about initiating a countdown, please feel free to chime in. Again, it's installed, enabled, and the settings are done. I just don't know how to flip the switch to put a countdown on a discussion.

  • R_JR_J Ex-Fanboy Munich Admin

    Oh, sorry! That hasn't been meant as a first do this, then that.

    @R_J said:
    1. Please upgrade to 2.3
    2. Please look in the JavaScript console for any hints why you do not get a countdown.

    I'm also convinced that your issue is not a version problem. Could you please take a look at the javascript error console?

  • CaylusCaylus ✭✭
    edited January 2017

    [COUNTDOWN], and then just added after that the text I want to follow it.

    This might be your problem.

    If you, say, put "[COUNTDOWN] until day X!" in settings, that means you have to post "[COUNTDOWN] until day X!" in full in a discussion every time you want to see it replaced by a countdown. Only "[COUNTDOWN]" will not be enough anymore, it will just simply ignore it.

  • It is maddening to feel like such a simpleton.

    OK, the setting is now "[COUNTDOWN]," with no additional text.

    Then when I start a new discussion, do I type the "COUNTDOWN" with or without brackets? I've tried both.

    And, do I type this in the discussion title, or in the body of the first post? Or somewhere else that I am too dense to intuit?

    Many thanks.

  • old_manold_man New
    edited January 2017

    Where is the javascript console?

  • @old_man said:
    It is maddening to feel like such a simpleton.

    OK, the setting is now "[COUNTDOWN]," with no additional text.

    Then when I start a new discussion, do I type the "COUNTDOWN" with or without brackets? I've tried both.

    And, do I type this in the discussion title, or in the body of the first post? Or somewhere else that I am too dense to intuit?

    Many thanks.

    In the body! With brackets.

    This link is in case you use Chrome to find the javascript console:

    https://developers.google.com/web/tools/chrome-devtools/console/

    otherwise you'll have to google "javsacript console [your browser]"

  • I used control-shift-J, and got a tab that said console, and copied and pasted above.

    I typed "[COUNTDOWN]" in the post body, still no soap.

    http://www.urbandictionary.com/define.php?term=no soap

  • old_manold_man New
    edited January 2017

    Here are the settings I have entered:

    Tag
    The following text will be replaced with the countdown widget
    [COUNTDOWN]

    Time
    Accepts most English textual date and time descriptions, see strtotime
    09:00:00, 2/14/17

    Timezone
    America/New_York

    Digits
    Original

  • Could you give us a link to your forum? And give us a screenshot of the settings page of the countdown?

  • link to forum:

    www.bravesbullpen.com

  • OK. So I checked: Your JS and CSS gets added correctly.

    The code is supposed to replace [COUNTDOWN] with this stuff:

    <div id="countdown" class="$CountdownDigits"></div>
    <div class="countdown-desc">
        <div>Days</div>
        <div>Hours</div>
        <div>Minutes</div>
        <div>Seconds</div>
    </div>
    
    <script type="text/javascript">
    $(document).ready(function() {
        $('#countdown').countdown({
            image: '$ImgSrc',
            startTime: "$days:$hours:$minutes:$seconds"
        });
    });
    </script>
    

    And if I insert that manually into a webpage of your site I get the correct countdown clock. So your problem is not JS.

    Somehow for you

        public function Base_AfterCommentFormat_Handler($Sender) {
            $Object = $Sender->EventArguments['Object'];
            $Object->FormatBody = $this->DoReplacement($Object->FormatBody);
            $Sender->EventArguments['Object'] = $Object;
        }
    

    Doesn't work and I don't understand why, sorry.

Sign In or Register to comment.