WordPress.org

Ready to get started?Download WordPress

Forums

WP HTML Rotator Plugin
Problem With Setup (13 posts)

  1. davejampole
    Member
    Posted 2 years ago #

    I just found and installed your plugin and I've run into what looks like a problem. I placed the following code in a text widget:

    [rotator start="5:01am" end="12pm"]
    <div>
      <p align="left">Good Morning and Welcome</p>
    </div>
    [/rotator]
    [rotator start="12:01pm" end="5pm"]
    <div>
       <p align="left">Good Afternoon and Welcome</p>
    </div>
    [/rotator]
    [rotator start="5:01pm" end="9pm"]
    <div>
       <p align="left">Good Evening and Welcome</p>
    </div>
    [/rotator]
    [rotator start="9:01pm" end="5am"]
    <div>
       <p align="left">You're working late!  Welcome</p>
    </div>
    [/rotator]

    For testing purposes, I change the time in the system clock from 'pm' to 'am', refreshed the page and at 5:35pm (now showing as 5:35am), the text stayed at 'Good Evening and Welcome', whereas it should have changed to 'Good Morning and Welcome'.

    Any suggestions?

    http://wordpress.org/extend/plugins/wp-html-rotator/

  2. davejampole
    Member
    Posted 2 years ago #

    I've been playing with this for about two hours and I cannot get the 'Good Afternoon', 'Good Evening' to change as the time changes.

    I like the idea and I want to use this - - when it is ready to be released. In my opinion, it is not ready yet. Either that or I'm missing the entire concept.

  3. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the bug report, I will take a look. Remember that by default it uses UTC timezone. So, when you configure 5am to 12pm it is not based on your timezone, that hour range will be converted to UTC.

    Depending on your timezone (for example my timezone is GMT-03) try using "5:01am -0300" instead.

  4. davejampole
    Member
    Posted 2 years ago #

    ariel,

    I tried your suggestion - it didn't work.

    [rotator start="5:01am -0600" end="12pm -0600"]
    <span style="align:left">Good Morning and Welcome </span>
    [/rotator]
    [rotator start="12:01pm -0600" end="5pm -0600"]
    <span style="align:left">Good Afternoon and Welcome </span>
    [/rotator]
    [rotator start="5:01pm -0600" end="9pm -0600"]
    <span style="align:left">Good Evening and Welcome </span>
    [/rotator]
    [rotator start="9:01pm -0600" end="5am -0600"]
    <span style="align:left">You're working late!  Welcome </span>
    [/rotator]to our website.

    At 4:08pm CST (GMT-6) the display read "Good Afternoon and Welcome to our website.", which is correct, but when I changed the system time from pm to am, the rotator should have said "You're working late! Welcome to our website."

    It appears that two or more [rotator][/rotator] shortcodes do not work together, unless I'm missing something.

  5. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    The rotator is using the local time of the machine where WordPress instance is running, not the client time. So, I configure the rotator for an hour range, for example, 6am -0300 to 10am -0300, then people from different parts of the world should get the same value at the same time.

    Of course, in the case you are running a local instance of WordPress (your own machine), then if you change your system time then the plugin should behave different.

    I believe different shortcodes should behave correctly together since they don't use shared data between them, they are processed separatedly and each one with its own parameters.

    Anyways, I am not saying the plugin has no bugs, only clarifying some points to understand better how it works.

  6. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    Now that I think, the plugin timezone should be configurable instead using the server time since I could configure this on a server on a place with a GMT-03 timezone and then if the server is moved to a place with GMT+03 then the plugin will change its behavior where it shouldn't.

  7. davejampole
    Member
    Posted 2 years ago #

    ariel,

    I understand your two comments, so forgive me if I ask - "How do your comments address my questions?" As I stated, I have four [rotator][/rotator] pair, but it does not appear that changing the time drives the change in the text output.

  8. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    One of your questions:

    It appears that two or more [rotator][/rotator] shortcodes do not work together, unless I'm missing something.

    My answer:

    I believe different short codes should behave correctly together since they don't use shared data between them, they are processed separately and each one with its own parameters.

    So, you should be able use multiple short codes without any problems.

    At 4:08pm CST (GMT-6) the display read "Good Afternoon and Welcome to our website.", which is correct, but when I changed the system time from pm to am, the rotator should have said "You're working late! Welcome to our website."

    Since the plug-in uses the server time, not the client time, then if you change your local system time then you will see no changes, unless you are running wp in your local machine (then you are the server) or you are modifying the server system time.

  9. davejampole
    Member
    Posted 2 years ago #

    Okay, the light just came on.

    I can change the time on my local machine, but the 'Good Morning', 'Good Afternoon' etc. will not change until the time on my host's server changes. Right?

  10. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    Exactly.

    Thanks for testing the plug-in, you helped me detecting another bug.

  11. davejampole
    Member
    Posted 2 years ago #

    ariel,

    I did get a change in comment as the time in my time zone changed. The only question I have is: if the comment changes based on the time at my host and I live in GMT -6 and you live in GMT -3, when you view my website, you will see the comments based on my time zone NOT yours, which, if I'm thinking correctly, is not what it should be. The comment should be based on the viewers time zone, NOT my host's time zone. At least, that's what I want.

  12. ariel.coppes
    Member
    Plugin Author

    Posted 2 years ago #

    No, this plug-in is not for that. It should be used, for example, to show a promo, something that should be shown in a unique hour range.

    Another usage is to show contact information, like "We are working, you can call us right now" and "We are at home now, contact us tomorrow".

    What you want depends on the client timezone and the plug-in can't know the visitor timezone when it is being processed. You need something processed in the client side, maybe javascript, then a wp plug-in is not needed.

  13. davejampole
    Member
    Posted 2 years ago #

    Damn,

    I was afraid of that. Oh well, at least I know what won't work and I guess that's something.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic