PDA

View Full Version : Radio DJ Scripts (Useful)



garybaldy72uk
01-14-2011, 10:46 AM
Just recently started using Radio DJ instead on SAM and have been working hard to try and get the basic Now Playing Info from SQL to the Website and Ive managed it (Just!)

1st script - Change the Database details to suit you!


<?php
$con = mysql_connect("localhost","root","Password");
if (!$con) {
die('Could not connect: ' .mysql_error());
}

mysql_select_db("radiodj", $con);

$result = mysql_query("SELECT artist, title FROM history where artist not like 'sweeper' order by date_played desc LIMIT 0,1");

echo "<table border='0' width='60%' cellspacing='1' cellpadding='0'>
<tr>

</tr>";
echo "<br />";
echo "Now Playing";
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['artist'] . ' - ' . $row['title'] ."</td>";

echo "</tr>";
}

echo "</table>";

mysql_close($con);
?>Thats the Now playing in order to get that showing on the site ive saved it as playing.php and then used a require tag in my index page


<? require ("playing.php") ?>So thats the now Playing sorted.

garybaldy72uk
01-14-2011, 10:50 AM
Now for the Most recent played tracks


<?php

//Edit the following line

$con = mysql_connect("localhost","root","Password");
if (!$con) {
die('Could not connect: ' .mysql_error());
}

mysql_select_db("radiodj", $con);


$result = mysql_query("SELECT artist, title FROM history where artist not like 'sweeper' order by date_played desc LIMIT 1,15");

echo "<table border='0' width='80%' cellspacing='1' cellpadding='0'>
<tr>

</tr>";
echo "<br />";
echo "Recently played";
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td><h5>" . $row['artist'] . ' - ' . $row['title'] ."</td></h5>";

echo "</tr>";
}

echo "</table>";

mysql_close($con);
?>


And yet again use the Require tag.


<? require ("recent.php") ?>

and all should be working ok for you ..... Make sure Port 3306 is Open on your Router and website etc ....

ENJOY!!

P.S working on the coming up part!

garybaldy72uk
04-12-2011, 10:23 PM
Template No Longer available.




(http://mediafire.com/download.php?258a499m1x3b7xb)

garybaldy72uk
01-19-2012, 10:54 AM
Template No Longer available.

garybaldy72uk
06-01-2012, 01:31 PM
Template No Longer available.

Audiograted
11-18-2012, 08:42 PM
Thanks for this, this is very useful for a project I'm working on!

Best regards,

Jamie Welch

wtiadmiller
02-01-2015, 11:15 PM
Thanks for the tools !

TS3
09-03-2015, 08:56 AM
Seems interesting!

andrewyw
06-18-2016, 03:28 PM
thanks, i love radiodj i m using for my live show at radio !!

ultra89
11-18-2017, 09:45 AM
i have just recently started out using radiodj at first i couldn't get use to it?

now that i have got my head finally around radiodj i am now working on a project
for the request site they have that comes with radiodj.

i am trying to get rid of that nasty green colour at the bottom

see here http://urban-radio.co.uk/req/request.php i have tried style.css


body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
body {
background: url(images/page_bg.png) #FFFFFF;
margin: 20px 0 20px 0;
text-align:center;
}
div.wrapper {
width:80%;
margin-left:auto;
margin-right:auto;
background:#FFFFFF;
text-align:center;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
}
a:link {
color: #000000;
text-decoration: none;
font-weight: bold;
}
a img {
border: none;
padding: 0;
margin: 0;
}
a:visited {
color: #000000;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: #FF6600;
text-decoration: underline;
}
a:active {
color: #FF0000;
text-decoration: none;
}
.main_table {
margin-left:auto;
margin-right:auto;
width: 98%;
border: #000000 1px solid;
background:#FFFFFF;
padding:0;
}
.main_table td {
border-top:#000000 1px solid;
}


.header_live {
background: url(images/date_bg.png) repeat-x;
color:#FFFFFF;
font-weight:bold;
font-size:12px;
text-align:center;
}
td.header_no {
background: url(images/date_bg.png) repeat-x;
color:#FFFFFF;
font-weight:bold;
font-size:12px;
text-align:center;
width:30px;
}


td.entry_no {
text-align:center;
}


div.errordiv {
width: 95%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
color: white;
background-color: maroon;
border: 1px solid red;
font-weight: bold;
}


div.noticediv {
width: 95%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
color: white;
background-color: #FFFFFF;
border: 1px solid #000000;
font-weight: bold;
}
div.requestcontainer {
width: 98%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
background-color: #F9E8D9;
border: 1px solid #000000;
}


div.menu {
width: 100%;
background: url(images/date_bg.png) repeat-x;
padding:20px 0 20px 0;
text-align:center;
margin: 0;
color: #666666;
}


div.menu a {
color: #FFFFFF;
}


div.menu a:visited {
color: #FFFFFF;
}
div.menu a:hover {
color: #FF0000;
}


div.footer {
width: 100%;
background: url(images/date_bg.png) repeat-x;
padding:10px 0 10px 0;
text-align:right;
margin: 0;
color: #777777;
border-top: 1px solid #000000;
}


.paginate {
font-family:Arial, Helvetica, sans-serif;
padding: 3px;
margin: 3px;
}


.paginate a {
padding:2px 5px 2px 5px;
margin:2px;
border:1px solid #999;
text-decoration:none;
color: #666;
}


.paginate a:hover, .paginate a:active {
border: 1px solid #999;
color: #000;
}


.paginate span.current {
margin: 2px;
padding: 2px 5px 2px 5px;
border: 1px solid #999;
font-weight: bold;
background-color: #999;
color: #FFF;
}
.paginate span.disabled {
padding:2px 5px 2px 5px;
margin:2px;
border:1px solid #eee;
color:#DDD;
}

i have changed the green to white but nothing has changed
could someone please help me