Page 7 of 7 FirstFirst ... 567
Results 61 to 67 of 67
  1. #61

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    78
    Rep Power
    5
    <script type="text/javascript">
    display();
    function display() {
    var show = "No show scheduled at present";
    var GMToffset = -5; // Your current GMT offset, whether Standard or Daylight
    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    now.setHours(GMToffset + now.getHours() + now.getTimezoneOffset() / 60);
    var hh = now.getHours();
    var mn = now.getMinutes();
    var ss = now.getSeconds();
    hh = hh + (mn/60); // minutes expressed as fractions of an hour




    // The GMT offset ensures that every visitor, regardless of their timezone, will see the schedule
    // that is appropriate for the site owner's local time.




    // Tip - for testing purposes you can put here
    //dy = 5;
    //hh = 9.25;
    // or whatever to check that the right show appears at that day/time.


    if (dy == 0) { // Sundays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 1) { // Mondays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 2) { // Tuesdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 3) { // Wednesdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 4) { // Thursdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 5) { // Fridays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 6) { // Saturdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    var a = '<img src="' + show + '" />';
    document.getElementById("dj").innerHTML = a;


    setTimeout(function(){display()}, 60000); // update every 60 seconds
    }


    </script>


    this is the code

  2. #62
    PapaBearPW's Avatar
    Title
    Avid Broadcaster
    Join Date
    Jun 2012
    Posts
    271
    Rep Power
    11
    You are calling the function at the top. That means that your javascript is running and trying to find an element on the page that isn't there yet. Somewhere on your page is a div with an id="dj" ... make sure you are calling your display function from inside the div. That way you can be sure that the div has shown up on the page before the javascript tries to find it. Should look something like this then:

    HTML Code:
    <div id="dj">
       <script type="text/javascript">
          display();
       </script>
    </div>
    Then you can remove the display(); call at the top of the javascript since it isn't needed and will just slow down the page load a tick. That should fix your problem with images not showing.

    As to the times for any given day, I still think the best way to do this would be to set an image for each hour of the day. Something like:
    HTML Code:
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <2) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=2 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <4) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=4 && hh <5) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=6 && hh <7) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=7 && hh <8) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=8 && hh <9) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=9 && hh <10) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=10 && hh <11) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=11 && hh <12) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=12 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <14) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=14 && hh <15) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=15 && hh <16) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=16 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <19) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=19 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=23) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    This way, you can just put any dj in at any time of any day since it is all pre-scripted.

    As to setting it to UK time, you should just need to set the variable near the top of the javascript called GMToffset to +1 instead of -5.

  3. #63

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    78
    Rep Power
    5
    i would like to know why this script is not working for me

    <?php
    $h = date('G');
    //set variable $h to the hour of the day
    $d = date('w');
    //set variable $d to the day of the week.
    $year = date('Y');
    //set variable $year to the current year
    //G is the date key for hours in 24 format (not 12), with no leading 0s, like 02.
    // Adjust 2 hour offset for MST below.
    $h = $h-0;


    // MONDAY SCHEDULE
    if ($d == 1){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/clive.jpg';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/jukebox.gif';
    else if ($h >= 19 && $h < 20) $img = 'images/jukebox.gif';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }


    // TUESDAY SCHEDULE
    if ($d == 2){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/jukebox.gif';
    else if ($h >= 19 && $h < 20) $img = 'images/jukebox.gif';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }


    // WEDNESDAY SCHEDULE
    if ($d == 3){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/jukebox.gif';
    else if ($h >= 19 && $h < 20) $img = 'images/jukebox.gif';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }




    // THURSDAY SCHEDULE
    if ($d == 4){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/jukebox.gif';
    else if ($h >= 19 && $h < 20) $img = 'images/jukebox.gif';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }




    // FRIDAY SCHEDULE
    if ($d == 5){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/strawbs.jpg';
    else if ($h >= 19 && $h < 20) $img = 'images/strawbs.jpg';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }


    // SATURDAY SCHEDULE
    if ($d == 6){
    if($h >= 20 && $h < 18) $img = 'http://urban-radio.co.uk/images/strawbs.jpg';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/strawbs.jpg';
    else if ($h >= 18 && $h < 20) $img = 'http://urban-radio.co.uk/images/strawbs.jpg';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }


    // SUNDAY SCHEDULE
    if ($d == 0){
    if($h >= 0 && $h < 8) $img = 'images/jukebox.gif';
    else if ($h >= 8 && $h < 9) $img = 'images/jukebox.gif';
    else if ($h >= 9 && $h < 10) $img = 'images/jukebox.gif';
    else if ($h >= 10 && $h < 11) $img = 'images/jukebox.gif';
    else if ($h >= 11 && $h < 12) $img = 'images/jukebox.gif';
    else if ($h >= 12 && $h < 13) $img = 'images/jukebox.gif';
    else if ($h >= 13 && $h < 14) $img = 'images/jukebox.gif';
    else if ($h >= 14 && $h < 15) $img = 'images/jukebox.gif';
    else if ($h >= 15 && $h < 16) $img = 'images/jukebox.gif';
    else if ($h >= 16 && $h < 17) $img = 'images/jukebox.gif';
    else if ($h >= 17 && $h < 18) $img = 'images/jukebox.gif';
    else if ($h >= 18 && $h < 19) $img = 'images/strawbs.jpg';
    else if ($h >= 19 && $h < 20) $img = 'images/strawbs.jpg';
    else if ($h >= 20 && $h < 21) $img = 'images/jukebox.gif';
    else if ($h >= 21 && $h < 22) $img = 'images/jukebox.gif';
    else if ($h >= 22 && $h < 23) $img = 'images/jukebox.gif';
    else if ($h >= 23 && $h < 24) $img = 'images/jukebox.gif';
    }
    ?>


    <html>
    <meta http-equiv="Content-Language" content="en-us">
    <body bgcolor="#000000">
    <div align="left">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="170" height="134" id="AutoNumber1" align="right">
    <tr>
    <td width="171" height="60" bordercolordark="#FF0000" background="#000000">
    <p align="center">
    <img src="<?php echo $img; ?>"height="100" width="100">
    <p align="right">
    </td>
    </tr>
    </table>
    </div>
    </body>
    </html>

    am i doing something wrong or what. as its not changing image from autodj to our djs image at 18 to 20

  4. #64

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    78
    Rep Power
    5
    or this code

    <script type="text/javascript">
    display();
    function display() {
    var show = "No show scheduled at present";
    var GMToffset = -5; // Your current GMT offset, whether Standard or Daylight
    var now = new Date();
    var dy = now.getDay(); // day of week 0-6
    now.setHours(GMToffset + now.getHours() + now.getTimezoneOffset() / 60);
    var hh = now.getHours();
    var mn = now.getMinutes();
    var ss = now.getSeconds();
    hh = hh + (mn/60); // minutes expressed as fractions of an hour




    // The GMT offset ensures that every visitor, regardless of their timezone, will see the schedule
    // that is appropriate for the site owner's local time.




    // Tip - for testing purposes you can put here
    //dy = 5;
    //hh = 9.25;
    // or whatever to check that the right show appears at that day/time.


    if (dy == 0) { // Sundays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 1) { // Mondays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 2) { // Tuesdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 3) { // Wednesdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 4) { // Thursdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=13 && hh <17) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 5) { // Fridays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    else if (dy == 6) { // Saturdays
    if (hh >=0 && hh <1) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=1 && hh <3) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=3 && hh <6) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=5 && hh <13) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/strawbs.jpg";}
    else if (hh >=17 && hh <18) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=18 && hh <20) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=20 && hh <21) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=21 && hh <22) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    else if (hh >=22 && hh <24) {show = "http://urban-radio.co.uk/images/jukebox.gif";}
    }


    var a = '<img src="' + show + '" />';
    document.getElementById("dj").innerHTML = a;


    setTimeout(function(){display()}, 60000); // update every 60 seconds
    }


    </script>

    i have put in what you said

    but i dont work

    <div id="dj">
    <script type="text/javascript">
    display();
    </script>
    </div>

  5. #65

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    78
    Rep Power
    5
    could someone please put the fully functional script in here please then i can add it to my site, because the code that i have
    has just changed to my dj image and its now 12:50am in the morning on the 3rd of september and im not on air im on air from 18 till 20

    please help

  6. #66
    PapaBearPW's Avatar
    Title
    Avid Broadcaster
    Join Date
    Jun 2012
    Posts
    271
    Rep Power
    11
    You didn't finish what I was saying to do in my last post.

    "As to setting it to UK time, you should just need to set the variable near the top of the javascript called GMToffset to +1 instead of -5."

    You still have:

    HTML Code:
    var GMToffset = -5; // Your current GMT offset, whether Standard or Daylight
    For London, it should be:

    HTML Code:
    var GMToffset = +1; // Your current GMT offset, whether Standard or Daylight
    I have no intention of re-posting the entire script for that one line.

    If you want to have a functioning website with all the bells and whistles you like, you have 2 options:

    1. Pay someone to build it and maintain it for you, with all the little changes you want.
    2. Start learning how scripts like this work so you can do it yourself.

    There are at least 3 different "on air" scripts that you are asking for help on. Pick one and learn how it works. Nobody here wants to re-write a script for you, every time your DJ schedule might change!

  7. #67
    RDJUser's Avatar
    Title
    Junior Broadcaster
    Join Date
    Aug 2012
    Location
    Everywhere!
    Posts
    63
    Rep Power
    7
    could someone please put the fully functional script in here please then i can add it to my site, because the code that i have
    has just changed to my dj image and its now 12:50am in the morning on the 3rd of september and im not on air im on air from 18 till 20

    please help
    Careful djaubs89 your starting to sound really needy now... You seem to be attempting to run before you can walk.

    You seriously need to learn how html/php/css work before you can seriously think about programming the features you want in your website.

    Either that or as Papabear suggested you pay some one hundreds/thousands or $$$ to build your site for you. I've seen your current site and its very amateurish to say the least.

    If the scripts from this forum aren't doing the job then there's not a lot anyone can do about it most of the scripts were intended for entertainment purposes only anyway so they weren't perfect in the first place.


    Proud user of RadioDJ FREE radio automation software

    Online: Twitter - Facebook - Mixcloud

Similar Threads

  1. Protools vs Audition
    By Jinglemaster in forum Audio Production
    Replies: 9
    Last Post: 07-28-2010, 12:18 AM
  2. Could use a voice over read for more details
    By brandon_g in forum Request A Free Voiceover
    Replies: 41
    Last Post: 12-04-2009, 02:33 PM
  3. U.S. Webcasting Fee's overturned
    By saint in forum General Internet Radio Discussions
    Replies: 0
    Last Post: 08-22-2009, 03:17 PM
  4. Introducing bodalgo - The new voice over market place
    By bodalgo in forum Audio Production
    Replies: 3
    Last Post: 03-22-2009, 02:11 AM
  5. Hi you all
    By CA101 in forum Introduce Yourself
    Replies: 1
    Last Post: 11-28-2008, 07:42 AM

Bookmarks

Posting Permissions

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