Jump to content

[Useful] Now On Air Script


mattskills
 Share

Recommended Posts

  • 2 years later...
  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

this is doing my head in peeps, please help

 

<?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 && $h >= 0 && $h

else if ($d == 1 && $h >= 8 && $h

else if ($d == 1 && $h >= 14 && $h

else if ($d == 1 && $h >= 16 && $h

else if ($d == 1 && $h >= 18 && $h

else if ($d == 1 && $h >= 20 && $h

else if ($d == 1 && $h >= 22 && $h

else if ($d == 2 && $h

 

 

 

 

// TUESDAY SCHEDULE

if ($d == 2 && $h >= 0 && $h

else if ($d == 2 && $h >= 4 && $h

else if ($d == 2 && $h >= 14 && $h

else if ($d == 2 && $h >= 16 && $h

else if ($d == 2 && $h >= 19 && $h

else if ($d == 2 && $h >= 20 && $h

else if ($d == 2 && $h >= 22 && $h

else if ($d == 3 && $h

 

 

 

 

// WEDNESDAY SCHEDULE

if ($d == 3 && $h >= 0 && $h

else if ($d == 3 && $h >= 4 && $h

else if ($d == 3 && $h >= 14 && $h

else if ($d == 3 && $h >= 16 && $h

else if ($d == 3 && $h >= 18 && $h

else if ($d == 3 && $h >= 19 && $h

else if ($d == 3 && $h >= 21 && $h

else if ($d == 4 && $h >= 0) $img = '/new/images/jukebox.gif';

 

 

 

 

 

 

 

 

// THURSDAY SCHEDULE

if ($d == 4 && $h >= 0 && $h

else if ($d == 4 && $h >= 4 && $h

else if ($d == 4 && $h >= 14 && $h

else if ($d == 4 && $h >= 16 && $h

else if ($d == 4 && $h >= 18 && $h

else if ($d == 4 && $h >= 20 && $h

else if ($d == 4 && $h >= 22 && $h

else if ($d == 5 && $h

 

 

 

 

 

 

 

 

// FRIDAY SCHEDULE

if ($d == 5 && $h >= 0 && $h

else if ($d == 5 && $h >= 19 && $h

else if ($d == 5 && $h >= 14 && $h

else if ($d == 5 && $h >= 16 && $h

else if ($d == 5 && $h >= 18 && $h

else if ($d == 5 && $h >= 20 && $h

else if ($d == 5 && $h >= 18 && $h

else if ($d == 6 && $h >= 0 && $h

 

 

 

 

 

 

 

 

// SATURDAY SCHEDULE

if ($d == 6 && $h >= 0 && $h

else if ($d == 5 && $h >= 19 && $h

else if ($d == 6 && $h >= 18 && $h

else if ($d == 6 && $h >= 18 && $h

else if ($d == 6 && $h >= 18 && $h

else if ($d == 6 && $h >= 18 && $h

else if ($d == 6 && $h

 

 

 

 

 

 

 

 

// SUNDAY SCHEDULE

if ($d == 5 && $h >= 0 && $h

else if ($d == 5 && $h >= 23 && $h

else if ($d == 0 && $h >= 10 && $h

else if ($d == 0 && $h >= 14 && $h

else if ($d == 0 && $h >= 16 && $h

else if ($d == 0 && $h >= 18 && $h

else if ($d == 0 && $h >= 23 && $h

else if ($d == 0 && $h >= 18 && $h

else if ($d == 0 && $h

?>

 

 

 

 







<?php echo $img; ?>


 

 

it is showing up with no picture please help

Edited by djaubs89
Link to comment
Share on other sites

I just need one that shows the current DJ name that is On Air. so if it is DJ Auto that is what it shows, or the current DJ. I have never had to deal with a schedule of any sort. I dont know how my old Server was getting the name of the DJ that was on air. It is like they are pulling it from the database that has all the DJ accounts to see who is logged in, and if nobody is on air, it shows Auto Dj. I wonder why makeavoice can do it but i cannot find someone else that can do that?
Link to comment
Share on other sites

i may of got it rite now

 

$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 && $h >= 0 && $h else if ($d == 0 && $h >= 8 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// TUESDAY SCHEDULE
if ($d == 2 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 19 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// WEDNESDAY SCHEDULE
if ($d == 3 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 19 && $h else if ($d == 5 && $h >= 21 && $h else if ($d == 6 && $h >= 0) $img = '/images/jukebox.gif';

// THURSDAY SCHEDULE
if ($d == 4 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// FRIDAY SCHEDULE
if ($d == 5 && $h >= 0 && $h else if ($d == 0 && $h >= 19 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h >= 0 && $h 
// SATURDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h else if ($d == 1 && $h >= 19 && $h else if ($d == 2 && $h >= 18 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 18 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h 
// SUNDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h else if ($d == 1 && $h >= 23 && $h else if ($d == 2 && $h >= 10 && $h else if ($d == 3 && $h >= 14 && $h else if ($d == 4 && $h >= 16 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h >= 23 && $h else if ($d == 0 && $h >= 18 && $h else if ($d == 0 && $h ?>











<?php echo $img; ?>






 

 

but if now is there any other codes i can use at all

Edited by James
Link to comment
Share on other sites

i may of got it rite now

 

$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 && $h >= 0 && $h else if ($d == 0 && $h >= 8 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// TUESDAY SCHEDULE
if ($d == 2 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 19 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// WEDNESDAY SCHEDULE
if ($d == 3 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 19 && $h else if ($d == 5 && $h >= 21 && $h else if ($d == 6 && $h >= 0) $img = '/images/jukebox.gif';

// THURSDAY SCHEDULE
if ($d == 4 && $h >= 0 && $h else if ($d == 0 && $h >= 4 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 22 && $h else if ($d == 6 && $h 
// FRIDAY SCHEDULE
if ($d == 5 && $h >= 0 && $h else if ($d == 0 && $h >= 19 && $h else if ($d == 1 && $h >= 14 && $h else if ($d == 2 && $h >= 16 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 20 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h >= 0 && $h 
// SATURDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h else if ($d == 1 && $h >= 19 && $h else if ($d == 2 && $h >= 18 && $h else if ($d == 3 && $h >= 18 && $h else if ($d == 4 && $h >= 18 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h 
// SUNDAY SCHEDULE
else if ($d == 0 && $h >= 0 && $h else if ($d == 1 && $h >= 23 && $h else if ($d == 2 && $h >= 10 && $h else if ($d == 3 && $h >= 14 && $h else if ($d == 4 && $h >= 16 && $h else if ($d == 5 && $h >= 18 && $h else if ($d == 6 && $h >= 23 && $h else if ($d == 0 && $h >= 18 && $h else if ($d == 0 && $h ?>











<?php echo $img; ?>






 

 

but if now is there any other codes i can use at all

 

Updated your post to add the [ CODE ] tags. Please use them in future.

 

What do you mean by "any other codes i can use at all" ?

Studiio - All-In-One Radio Communication Platform
SMS | Phone Calls | Social Media | Content

Link to comment
Share on other sites

  • 1 month later...

ok the code that is in here is not showing up the images on the server please help

 

 

 









http://www.106themix.com/onairinfo/images/logo.gif


Loading ...


Link to comment
Share on other sites

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

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 1) { // Mondays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 2) { // Tuesdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 3) { // Wednesdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 4) { // Thursdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 5) { // Fridays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 6) { // Saturdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

var a = '' + show + '';

document.getElementById("dj").innerHTML = a;

 

 

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

}

 

 

 

 

this is the code

Link to comment
Share on other sites

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:

 


  <br />
      display();<br />
   

 

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:

if (hh >=0 && hh else if (hh >=1 && hh else if (hh >=2 && hh else if (hh >=3 && hh else if (hh >=4 && hh else if (hh >=5 && hh else if (hh >=6 && hh else if (hh >=7 && hh else if (hh >=8 && hh else if (hh >=9 && hh else if (hh >=10 && hh else if (hh >=11 && hh else if (hh >=12 && hh else if (hh >=13 && hh else if (hh >=14 && hh else if (hh >=15 && hh else if (hh >=16 && hh else if (hh >=17 && hh else if (hh >=18 && hh else if (hh >=19 && hh else if (hh >=20 && hh else if (hh >=21 && hh else if (hh >=22 && hh 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.

Link to comment
Share on other sites

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

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

// TUESDAY SCHEDULE

if ($d == 2){

if($h >= 0 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

// WEDNESDAY SCHEDULE

if ($d == 3){

if($h >= 0 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

 

 

// THURSDAY SCHEDULE

if ($d == 4){

if($h >= 0 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

 

 

// FRIDAY SCHEDULE

if ($d == 5){

if($h >= 0 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

// SATURDAY SCHEDULE

if ($d == 6){

if($h >= 20 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 18 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

 

 

// SUNDAY SCHEDULE

if ($d == 0){

if($h >= 0 && $h

else if ($h >= 8 && $h

else if ($h >= 9 && $h

else if ($h >= 10 && $h

else if ($h >= 11 && $h

else if ($h >= 12 && $h

else if ($h >= 13 && $h

else if ($h >= 14 && $h

else if ($h >= 15 && $h

else if ($h >= 16 && $h

else if ($h >= 17 && $h

else if ($h >= 18 && $h

else if ($h >= 19 && $h

else if ($h >= 20 && $h

else if ($h >= 21 && $h

else if ($h >= 22 && $h

else if ($h >= 23 && $h

}

?>

 

 







<?php echo $img; ?>


 

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

Link to comment
Share on other sites

or this code

 

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

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 1) { // Mondays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 2) { // Tuesdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 3) { // Wednesdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 4) { // Thursdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=13 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 5) { // Fridays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

else if (dy == 6) { // Saturdays

if (hh >=0 && hh

else if (hh >=1 && hh

else if (hh >=3 && hh

else if (hh >=5 && hh

else if (hh >=18 && hh

else if (hh >=17 && hh

else if (hh >=18 && hh

else if (hh >=20 && hh

else if (hh >=21 && hh

else if (hh >=22 && hh

}

 

 

var a = '' + show + '';

document.getElementById("dj").innerHTML = a;

 

 

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

}

 

 

 

i have put in what you said

 

but i dont work

 

display();

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

 

var GMToffset = -5; // Your current GMT offset, whether Standard or Daylight

 

For London, it should be:

 

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!

  • Thanks 1
Link to comment
Share on other sites

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.

  • Thanks 2

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my FAVOURITE piece of software it works when I need It

 

 

Link to comment
Share on other sites

  • 1 month later...

this script is not working for me

 

	// Set the timezone	// See full list of timezones here: http://php.net/manual/en/timezones.php	date_default_timezone_set('Europe/London');
// Set default text and default image | When a show is not on air, this text and image will display	$default_on_air = ''; // Default text	$default_image_on_air = 'http://urban-radio.co.uk/images/offline.png'; // Default image
// Shows array, edit this information for each show	$shows = [		[			'show_name' => "Monday", // Show name			'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 01, // Start Time (24 hour format)			'end_time' => 23,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/images/offline.png'		],		[			'show_name' => "Tuesday", // Show name			'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 01, // Start Time (24 hour format)			'end_time' => 23,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/images/offline.png'                ],		[			'show_name' => "Wednesday", // Show name			'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 01, // Start Time (24 hour format)			'end_time' => 23,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/images/offline.png'		],		[			'show_name' => "Thursday Jukebox", // Show name			'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 01, // Start Time (24 hour format)			'end_time' => 23,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/images/offline.png'		],		[			'show_name' => "Friday Strawbs", // jay's show			'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 18, // Start Time (24 hour format)			'end_time' => 20,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'                ],		[			'show_name' => "Saturday Strawbs", // Jay's Show			'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 18, // Start Time (24 hour format)			'end_time' => 20,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'                ],		[			'show_name' => "Sunday Sunday", // 80's 			'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)			'start_time' => 18, // Start Time (24 hour format)			'end_time' => 20,  // End Time (24 hour format)			'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'		]	];
/////////////////////////////////////////////////////	////////// DO NOT EDIT BELOW THIS LINE //////////////	/////////////////////////////////////////////////////
$now_day = date('l');	$now_time = date('G');
$output = array($default_on_air, $default_image_on_air);
for($i = 0; $i = $now_time && $shows[$i]['end_time'] 	return $output;
} ?>ON AIR NOW:
<?php echo onAirNow()[1]; ?>



Edited by ultra89
wrong script
Link to comment
Share on other sites

this script is not working for me

 

    // Set the timezone    // See full list of timezones here: http://php.net/manual/en/timezones.php    date_default_timezone_set('Europe/London');
   // Set default text and default image | When a show is not on air, this text and image will display    $default_on_air = ''; // Default text    $default_image_on_air = 'http://urban-radio.co.uk/images/offline.png'; // Default image
   // Shows array, edit this information for each show    $shows = [        [            'show_name' => "Monday", // Show name            'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 01, // Start Time (24 hour format)            'end_time' => 23,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/images/offline.png'        ],        [            'show_name' => "Tuesday", // Show name            'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 01, // Start Time (24 hour format)            'end_time' => 23,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/images/offline.png'                ],        [            'show_name' => "Wednesday", // Show name            'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 01, // Start Time (24 hour format)            'end_time' => 23,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/images/offline.png'        ],        [            'show_name' => "Thursday Jukebox", // Show name            'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 01, // Start Time (24 hour format)            'end_time' => 23,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/images/offline.png'        ],        [            'show_name' => "Friday Strawbs", // jay's show            'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 18, // Start Time (24 hour format)            'end_time' => 20,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'                ],        [            'show_name' => "Saturday Strawbs", // Jay's Show            'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 18, // Start Time (24 hour format)            'end_time' => 20,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'                ],        [            'show_name' => "Sunday Sunday", // 80's             'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday)            'start_time' => 18, // Start Time (24 hour format)            'end_time' => 20,  // End Time (24 hour format)            'image' => 'http://urban-radio.co.uk/new/images/strawbs.jpg'        ]    ];
   /////////////////////////////////////////////////////    ////////// DO NOT EDIT BELOW THIS LINE //////////////    /////////////////////////////////////////////////////
   $now_day = date('l');    $now_time = date('G');
   $output = array($default_on_air, $default_image_on_air);
   for($i = 0; $i = $now_time && $shows[$i]['end_time']     return $output;
} ?>ON AIR NOW:
<?php echo onAirNow()[1]; ?>



Studiio - All-In-One Radio Communication Platform
SMS | Phone Calls | Social Media | Content

Link to comment
Share on other sites

basically when i or any other dj goes on air it wont bring up our images

i tried looking at it at 6pm yesterday (Saturday) and it didnt show up my image? why is that

 

Okay, a bit more specific. So the correct DJ name shows, but the image doesnt? Is that correct?

Studiio - All-In-One Radio Communication Platform
SMS | Phone Calls | Social Media | Content

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...