Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 6 FirstFirst 1234 ... LastLast
Results 16 to 30 of 78

Thread: on-air script

  1. #16
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Lightbulb

    Quote Originally Posted by Old Pedant View Post
    Yes, jmrker, but your script depends on (a) the users' computer clocks being set correctly and (b) the users being in the same time zone as the server [though it's easy to adjust for the latter].

    See how I pass the server time in, from PHP, and then use the discovered offset in all other calculations.
    Yes, and if my battery dies, my watch is only right twice a day.
    I, for one, do not worry about other's clock settings in JS.
    I would rely on the server's clock, much like you have done, if it is that important.

    I also left the logic available to adjust for MST using UTC and/or the gettimezone() function. I'm not in MST so I left that as an exercise for the student.

  2. #17
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jmrker View Post
    Yes, and if my battery dies, my watch is only right twice a day.
    I, for one, do not worry about other's clock settings in JS.
    I would rely on the server's clock, much like you have done, if it is that important.

    I also left the logic available to adjust for MST using UTC and/or the gettimezone() function. I'm not in MST so I left that as an exercise for the student.
    hi again old pendent sent me a script so that my images would change?
    now is there any way a radio stream could go in that script so that when our DJ'S come on air with there stream the image changes with the stream?

  3. #18
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Question

    Quote Originally Posted by djultra View Post
    hi again old pendent sent me a script so that my images would change?
    now is there any way a radio stream could go in that script so that when our DJ'S come on air with there stream the image changes with the stream?

    I'm not sure I understand the question in the first line.

    Is the script you are using posted in an earlier part of this thread (which post)
    or is it an entirely different portion of code?

    What is in the radio stream that contains the name or ID of the DJ currently on air?
    Where does the information come from to change the image display?

    Do you have a link to the site to view? What does the code you are using look like?

  4. #19
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i dont have an ID for the DJ

    but its a entirly new code

    i dont have a link iver

  5. #20
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Exclamation

    Quote Originally Posted by djultra View Post
    i dont have an ID for the DJ

    but its a entirly new code

    i dont have a link iver
    I'm not sure I can be of further help unless you come up with some answers for my previous post.

    I don't care what the identity of the DJ is. Make-up something.
    What is the "entirly new code"?
    Without a link, how is the WWW supposed to see it?

    With so many questions unanswered, I await additional information before proceeding with further suggestions.

  6. #21
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Yes, jmrker, but your script depends on (a) the users' computer clocks being set correctly and (b) the users being in the same time zone as the server [though it's easy to adjust for the latter].

    See how I pass the server time in, from PHP, and then use the discovered offset in all other calculations.
    hi there the script don't work that you gave me

    i tried everything but i were think of using this script

    http://www.destiny106.co.uk/djcenter/imgrotator.js

  7. #22
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,091
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Lightbulb

    Quote Originally Posted by djultra View Post
    hi there the script don't work that you gave me

    i tried everything but i were think of using this script

    http://www.destiny106.co.uk/djcenter/imgrotator.js
    If you are calling this as an external file, get rid of any and all HTML code
    including the <!-- and //--> tags.

  8. #23
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok but will that code work

  9. #24
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    Depends on what you mean by "work".

    Looking at the contents of picarr[ ] and then where you do the switch (picarr[pntr]), not a single one of your case values matches any of your picarr[x] values, so your switch will *always* end up getting to the default: and so thelink and endlink will always be just "".

    Which means you could throw all this code away and just do
    Code:
       thelink = endlink = "";
    and get the same effect.

    I won't even comment any more on the fact that you are using obsolete document.write code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  10. #25
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Depends on what you mean by "work".

    Looking at the contents of picarr[ ] and then where you do the switch (picarr[pntr]), not a single one of your case values matches any of your picarr[x] values, so your switch will *always* end up getting to the default: and so thelink and endlink will always be just "".

    Which means you could throw all this code away and just do
    Code:
       thelink = endlink = "";
    and get the same effect.

    I won't even comment any more on the fact that you are using obsolete document.write code.
    well um isent there a image rotator that does work
    as the one i got given doesnt work

  11. #26
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    Did you ever even try the code I gave you in my post #10?

    I hate to say it, but I feel you are just taking code and throwing it against the wall and hoping that some of it will stick. Might do as well just showing random images at this point.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  12. #27
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Did you ever even try the code I gave you in my post #10?

    I hate to say it, but I feel you are just taking code and throwing it against the wall and hoping that some of it will stick. Might do as well just showing random images at this point.
    oh god no im throwing it against the wall mate lol god no it just dont work
    for me

  13. #28
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    Well, I don't know where to go from here except to mostly start all over.

    Let me ask you the SAME QUESTIONS I asked before:

    Let me make 100% sure I understand this:

    djultra will be mondays 3pm till 6pm, GMT
    dj Rabbit will be mondays 12pm till 4pm, GMT
    dj john will be tuesdays 2pm till 7pm, GMT

    then on weekends there will be a show together with djultra and dj rabbit
    between 4pm and 6pm, GMT

    At all other times the display will show autodj.
    Notice carefully that I specified all times to be GMT.

    Yes or no? If no, then make corrections.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  14. #29
    New Coder
    Join Date
    Mar 2013
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Well, I don't know where to go from here except to mostly start all over.

    Let me ask you the SAME QUESTIONS I asked before:


    Notice carefully that I specified all times to be GMT.

    Yes or no? If no, then make corrections.
    well were dj'ing 24/7 now so im going to do 12pm till 2pm
    dj rabbit is 12pm till 12 midnight i do not know wat dj john is

  15. #30
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,996
    Thanks
    79
    Thanked 4,433 Times in 4,398 Posts
    While you are at it, create a file on your server named timetest.php.

    Put just this code into it:
    Code:
    <html><body>
    <script type="text/javascript">
    <?php
          echo "var serverTime = new Date(" . date("Y,m,j,G,i,s") . ");";
    ?>
    document.write( serverTime.toString() );
    </script>
    </body></html>
    Run that page in your browser.
    Copy/paste what it shows you to here.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 2 of 6 FirstFirst 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •