WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] Starting Times & Ending Times (23 posts)

  1. rainfire
    Member
    Posted 1 year ago #

    Hello, We are using your plugin WP-TopBar and are having touble with the start times and end times.

    When we put in a specific time for the notification to show it still shows up even when it's not time for it to. We have tried military time and regular time format but no luck.

    Could you please tell us how we are to input the correctimes which are 10:45 AM to 12 and another noification bar for 7 PM to 8:30 PM all times central.

    Thank you so much for your support. Blessings to you.

    http://wordpress.org/extend/plugins/wp-topbar/

  2. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    The time should be entered in this format: 05/01/2013 00:00

    I see that I am having an issue that the date/time picker sometimes does not work. I've adjusted the plugin to force it to show up. That will be changed in the next version.

    I need to check how your time settings are on your server.

    1. Select the Main Options Tab of a TopBar that has the time settings.
    2. Append &debug to the URL in your browser (ex....php?page=wp-topbar.php&action=main&barid=705508&debug)
    3. Hit enter to load that URL
    4. Look for lines like this and reply back to me with what your system has:

    WP-TopBar Debug Mode: Server Timezone:UTC
    WP-TopBar Debug Mode: Current Time :1367455359-2013-05-02 00:42:39 (UTC)
    WP-TopBar Debug Mode: Starting Time:05/01/2013 00:00-05/01/2013 00:00-1970-01-01 00:00:05 (UTC)
    WP-TopBar Debug Mode: Ending Time  :05/30/2013 00:00-05/30/2013 00:00-1970-01-01 00:00:05 (UTC)
  3. rainfire
    Member
    Posted 1 year ago #

    Hello, Thank you for your speedy response.

    The code you requested is:

    WP-TopBar Debug Mode: Server Timezone:UTC
    WP-TopBar Debug Mode: Current Time :1367551682-2013-05-03 03:28:02 (UTC)
    WP-TopBar Debug Mode: Starting Time:05/01/2013 23:35-05/01/2013 23:35-1970-01-01 00:00:05 (UTC)
    WP-TopBar Debug Mode: Ending Time  :05/01/2025 00:00-05/01/2025 00:00-1970-01-01 00:00:05 (UTC)

    I used the format you suggested and put in a later date and the bar did not show as it should. However, when I messed with the time it didn't work correctly so it must have something to do with the server time like you mentioned.

    Also, I have one more question. Will this work for those in different time zones? For example, if we want the bar to show up at 7pm central will it know to show up at 8pm eastern?

    Thank you so much for your help!

  4. rainfire
    Member
    Posted 1 year ago #

    Ok, sorry for posting so many times but I sort of figured out where you were headed. I noticed that the server uses UTC which I figured out is a universal time zone. Ok. So, I did the math to figure out the times that I need for our meetings. (ie, the times we want the top bar to show up) This is what I came up with. Maybe I'm missing something.

    This is the time of our service central America time: 10:45 am - 12:00 pm
    This would be the UTC time which is 5 hours ahead of us: 3:45 pm - 5 pm
    And this would be the UTC time in military format: 15:45 - 17:00

    This is the time of our service central America time: 7 pm - 8:30 pm
    This would be the UTC time which is 5 hours ahead of us: 1:00 am - 2:30am
    And this would be the UTC time in military format: 01:00 - 02:30

    But the top bar is still showing up even though I have them set for these times. Am I doing something wrong? Blessings to you!

  5. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    The plugin is coded to use UTC so that it does not have to worry about timezones.

    Based on what I am seeing from your timestamps, the TopBar should show. The start time/date is 5/01/2013. The StopTime is 5/31/2025. (Twelve years ahead from now). So, since today is between those two dates... the TopBar would appear.

    At the top of every Tab, there is a Section called Check. Here is what one looks like:

    Time check: Based on your Start/End time settings in the Main Options, the TopBar will  display (based on the current time.)
    Cookie check: The plugin is not checking for the presence of cookies.
    Home Page check: TopBar will check Page/Category criteria to determine if it should display on the Home Page (if the TopBar is enabled)
    Control check: TopBar is only checking for Page IDs (if any are entered and the TopBar is enabled)

    Can you reply with what your TopBar has?

  6. rainfire
    Member
    Posted 1 year ago #

    Yeah. The date is not so much important but the time is. We want the top bar to show up everyday at those certain times, forever. That is why I put the date for twelve years from now. I understand your point now. Since it's in between those two dates it WILL show I was thinking more about the times. Sorry about that.

    Is there anyway to just not put a date and only worry about the times? We only want the top bar to show at those specific times everyday.

    Thank you!

  7. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    There is not a way to do what you want with the plugin configuration. It is can add that feature to the backlog. I don't know when I would get to implementing that.

    An option would be to create a TopBar for each day. One way to do that would be to one TopBar, then export in SQL format. Then you can duplicate that row (say 31 times), changing the date, then insert into mysql. You would have to do that once a month.

    Bob

  8. rainfire
    Member
    Posted 1 year ago #

    Awesome! Thank you so much for your assistance! This was very helpful!

    I also wanted to know if there is a way that we can embed our video streaming channel into the top bar? So that when we are live then the video will pop up on the top of our page?

    Thank you so very much!

  9. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    The next version will allow you to add custom PHP to the topbar. That will allow you to embed your media stream.

    I will release it, most likely this weekend, after I finish my testing.

    If you are willing to test, it... let me know and I can email you the beta version.

    Bob

  10. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Version 4.15 is up with the PHP option.

  11. rainfire
    Member
    Posted 1 year ago #

    Awesome! Sorry for the delay our computer blew up and had to get another one.

    Ok, so I have the new version of the plugin and I see the PHP page but when I paste our video embed code it doesn't show up on the TopBar. We use Bambuser to stream our videos. Here is the embed code we use:

    <iframe src="http://embed.bambuser.com/channel/worldhops" width="320" height="276" frameborder="0">Your browser does not support iframes.</iframe>

    Would there be any way you could show me a code that will work for this embed? You have been so incredibly helpful. Thanks!

  12. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    The code above is HTML.

    You need to convert that to PHP:

    echo "<iframe src="http://embed.bambuser.com/channel/worldhops" width="320" height="276" frameborder="0">Your browser does not support iframes.</iframe>";

    You might need to add a break to make it look clean:

    echo "</br>";

    Bob

  13. rainfire
    Member
    Posted 1 year ago #

    Hello, I pasted the code you provided but I don't see anything different on the top bar. I did try putting it in the Before box and in the After box. I even tried putting it in both at the same time but nothing new shows up on the top bar. Am I doing something wrong?

  14. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    What it your URL so that I can see if there is a code issue?

  15. rainfire
    Member
    Posted 1 year ago #

    The URL is http://www.world-hops.com/

    Thank you!

  16. rainfire
    Member
    Posted 1 year ago #

    Another URL is http://saginaw-house-of-prayer.world-hops.com/ that uses a different theme template. It doesn't work on this site either.

  17. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    I am able to see the default topbar from the Saginaw URL.

    On the main URL, it does not look like the topbar is enabled.

    Bob

  18. rainfire
    Member
    Posted 1 year ago #

    Yes, on the Saginaw site I used the default just to test the top bar since that site is not viewed by many people. However, I do have the PHP code inserted into the default but as you can see it's not showing.

    Our main Worldhops site is set only to certain times of the day. Do you need me to activate it so you can check it out? I would certainly do that.

    Is there more code that I need to have in the PHP box? Or do I need to paste something into the style CSS to have it show up?

  19. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Can you export your topbars (in SQL format) and email them to me?

    I will load them on a test site to see what the issue is.

    My address can be found in this file:

    http://plugins.svn.wordpress.org/wp-topbar/tags/4.14/wp-topbar.php

    Bob

  20. rainfire
    Member
    Posted 1 year ago #

    Awesome! Email sent. Thanks again!

  21. rainfire
    Member
    Posted 1 year ago #

    It seems that the email has failed to send because the email address is wrong. Feel free to email me at missymouse2323@yahoo.com and I can reply to that email. Thanks!

  22. rainfire
    Member
    Posted 1 year ago #

    I figured out the problem. The page you sent me has a typo on your email address. There is an extra i in Zwebify. You should have the email now.

  23. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Ouch -- I'll fix the email address in next update.

    Use this code:

    echo '<iframe src="http://embed.bambuser.com/channel/worldhops" width="320" height="276" frameborder="0">Your browser does not support iframes.</iframe>';
    echo "</br>";

    The difference? The first echo statement uses single quotes instead of double quotes (since double quotes are already in use in the iframe code.

    I tried this on my test site and it works.

    Best wishes,

    Bob

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic