Author Topic: RadioDJ WRDJAAF Site (V1.0)  (Read 310 times)

EmmaSts

  • Jr. Member

  • Offline
  • **
  • 59
  • Personal Text
    I didn't fail... I found ways that don't work.
    • XperienceRewind
RadioDJ WRDJAAF Site (V1.0)
« on: August 15, 2019, 07:41:56 PM »
Hello....
Below is a FREE Download for your radio station for use with RADIODJ.
This website is dynamic and will gather your album art from RADIODJ's database and Album Art folder
WRDJAAF = With Radio D J Album Art Free RadioDJ Site

PLEASE NOTE: I use RadioDJ V2.0.0.6 So this site may NOT work on older versions.

(Images below only show a few artist pics as i wasn't adding them all lol)

///////////////////////////////////////////////////////////////
FUNCTIONS and FEATURES (images below):
HOMEPAGE: AJAX Driven and will refresh smoothly every few minutes.
PREVIOUSLY: Shows the Recently Played songs in your database.
TOPREQUESTED: Shows the Most Requested songs in your database.
REQUESTS: Shows all songs from your database and the ability for users to place requests. With a Live Search feature for finding Artists / Songs.

///////////////////////////////////////////////////////////////
SETUP:
Edit the config.php file with your site name, slogan, and url...
Change the Tunein buttons to your stream. edit out the ones you don't use.
Add YOUR database information for database connection.

Upload the contents of the folder to your webhost, and goto your site.

///////////////////////////////////////////////////////////////
Feel free to message me if your stuck or post in here with queries :)
Enjoy!

///////////////////////////////////////////////////////////////
VIEW:
https://www.xperiencerewind.co.uk/radiodj/

///////////////////////////////////////////////////////////////
DOWNLOAD:
https://www.xperiencerewind.co.uk/radiodj/RDJSiteWRDJAAF/RADIODJ-WRDJAAF-V1.0.zip
///////////////////////////////////////////////////////////////

24 HOUR AUTOMATED REQUESTS - XPERIENCEREWIND.co.uk
Free and Premium RadioDJ Website Scripts - https://www.xperiencerewind.co.uk/radiodj/

freakazoid

  • New User

  • Offline
  • *
  • 5
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #1 on: September 10, 2019, 12:03:29 PM »
Do you know how to solve this

Notice: Undefined variable: ttmage in D:\Webserver\root\playing.php on line 151

stevewa

  • Hero Member

  • Offline
  • *****
  • 509
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #2 on: September 10, 2019, 12:36:40 PM »
Yes

freakazoid

  • New User

  • Offline
  • *
  • 5
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #3 on: September 10, 2019, 01:04:34 PM »
Do you also have this problem or do you have the solution?

stevewa

  • Hero Member

  • Offline
  • *****
  • 509
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #4 on: September 10, 2019, 02:36:26 PM »
Yes, I know how to solve this.

Is it really too hard for you to use a search engine to find a solution on the world wide web?
https://stackoverflow.com/questions/22465645/php-how-to-fix-notice-undefined-variable?lq=1

I, like Jhonny, am getting ready to give up on this forum, newbies don't even try to find the answers first.

EmmaSts

  • Jr. Member

  • Offline
  • **
  • 59
  • Personal Text
    I didn't fail... I found ways that don't work.
    • XperienceRewind
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #5 on: September 10, 2019, 02:55:29 PM »
Do you know how to solve this

Notice: Undefined variable: ttmage in D:\Webserver\root\playing.php on line 151

This is looking for the image in the database for the requested songs...
Open up playing.php

Look for

Code: [Select]
<?php
$topreq 
'';
$sqltreq "SELECT songID, COUNT(*) as ID FROM `requests` GROUP BY `songID` ORDER BY `ID` DESC LIMIT 0,1";
$treq mysqli_query($db_conx$sqltreq);
if(
$treq === FALSE) { echo ''; }
while(
$rtreq mysqli_fetch_assoc($treq)) {

$trsongID mysqli_real_escape_string($db_conx$rtreq['songID']);

$sqlri2 "SELECT * FROM `songs` WHERE `ID`='$trsongID'";
$resultri2 mysqli_query($db_conx$sqlri2);
while($tt2row mysqli_fetch_assoc($resultri2)) {
$ttsongID mysqli_real_escape_string($db_conx$tt2row["ID"]);
$ttartist $tt2row["artist"];
$tttitle mysqli_real_escape_string($db_conx$tt2row["title"]);

$ttartistcut preg_replace('/\s+?(\S+)?$/'''substr($tt2row['artist'] . ' '042)). '';
$tttitlecut preg_replace('/\s+?(\S+)?$/'''substr($tt2row['title'] . ' '032)). '...';

$sqltt "SELECT `ID`, `image` FROM `songs` WHERE `ID`=".$ttsongID." LIMIT 1";
$ttresult mysqli_query($db_conx$sqltt);
while($ttrow mysqli_fetch_assoc($ttresult)) {
$ttmage $ttrow['image'];
}
}

$topreq '
<span style="background:#0f1115;position:absolute;line-height:14px;font-family:Arial Black,sans-serif;color:#71777a;font-size:12px;padding:4px;">Top Song - Most Requested</span>
<img src="Album-Art/'
.$ttmage.'" width="100%" style="max-height:160px;min-height:160px;" alt="'.$ttartist.'" title="'.$ttartist.'" />
<p>'
.$ttartistcut.'<br />'.$tttitlecut.'</p>
'
;
}
echo 
$topreq;
?>

And Replace with

Code: [Select]
<?php
$topreq 
'';
$ttmage '';
$sqltreq "SELECT songID, COUNT(*) as ID FROM `requests` GROUP BY `songID` ORDER BY `ID` DESC LIMIT 0,1";
$treq mysqli_query($db_conx$sqltreq);
if(
$treq === FALSE) { echo ''; }
while(
$rtreq mysqli_fetch_assoc($treq)) {

$trsongID mysqli_real_escape_string($db_conx$rtreq['songID']);

$sqlri2 "SELECT * FROM `songs` WHERE `ID`='$trsongID'";
$resultri2 mysqli_query($db_conx$sqlri2);
while($tt2row mysqli_fetch_assoc($resultri2)) {
$ttsongID mysqli_real_escape_string($db_conx$tt2row["ID"]);
$ttartist $tt2row["artist"];
$tttitle mysqli_real_escape_string($db_conx$tt2row["title"]);

$ttartistcut preg_replace('/\s+?(\S+)?$/'''substr($tt2row['artist'] . ' '042)). '';
$tttitlecut preg_replace('/\s+?(\S+)?$/'''substr($tt2row['title'] . ' '032)). '...';

$sqltt "SELECT `ID`, `image` FROM `songs` WHERE `ID`=".$ttsongID." LIMIT 1";
$ttresult mysqli_query($db_conx$sqltt);
while($ttrow mysqli_fetch_assoc($ttresult)) {
$ttmage $ttrow['image'];
}
}

$topreq '
<span style="background:#0f1115;position:absolute;line-height:14px;font-family:Arial Black,sans-serif;color:#71777a;font-size:12px;padding:4px;">Top Song - Most Requested</span>
<img src="Album-Art/'
.$ttmage.'" width="100%" style="max-height:160px;min-height:160px;" alt="'.$ttartist.'" title="'.$ttartist.'" />
<p>'
.$ttartistcut.'<br />'.$tttitlecut.'</p>
'
;
}
echo 
$topreq;
?>
24 HOUR AUTOMATED REQUESTS - XPERIENCEREWIND.co.uk
Free and Premium RadioDJ Website Scripts - https://www.xperiencerewind.co.uk/radiodj/

stevewa

  • Hero Member

  • Offline
  • *****
  • 509
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #6 on: September 11, 2019, 01:40:33 PM »
You need to define your variables before you assign them

EmmaSts

  • Jr. Member

  • Offline
  • **
  • 59
  • Personal Text
    I didn't fail... I found ways that don't work.
    • XperienceRewind
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #7 on: September 11, 2019, 01:44:29 PM »
You need to define your variables before you assign them

Yes i know...
24 HOUR AUTOMATED REQUESTS - XPERIENCEREWIND.co.uk
Free and Premium RadioDJ Website Scripts - https://www.xperiencerewind.co.uk/radiodj/

freakazoid

  • New User

  • Offline
  • *
  • 5
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #8 on: September 13, 2019, 03:16:03 PM »

Okay thanks it worked now I still have 1 question is it possible to get the comments from the database and show them on the playing php

EmmaSts

  • Jr. Member

  • Offline
  • **
  • 59
  • Personal Text
    I didn't fail... I found ways that don't work.
    • XperienceRewind
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #9 on: September 13, 2019, 08:25:14 PM »
Okay thanks it worked now I still have 1 question is it possible to get the comments from the database and show them on the playing php

Yes you'll need to add a line in the while loop to get the comments...
$ttcoms = $tt2row["comments"];

Then add '.$ttcoms.' where you want it to display in the output variable remember to add $ttcoms = ''; at the top to define it encase comments is empty
24 HOUR AUTOMATED REQUESTS - XPERIENCEREWIND.co.uk
Free and Premium RadioDJ Website Scripts - https://www.xperiencerewind.co.uk/radiodj/