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

EmmaSts

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find 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://stewartswebworks.com/radiodj/

///////////////////////////////////////////////////////////////
DOWNLOAD:
https://stewartswebworks.com/radiodj/viewdl.php?dlid=2
///////////////////////////////////////////////////////////////

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

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

freakazoid

  • New User

  • Offline
  • *
  • 8
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
  • *****
  • 561
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #2 on: September 10, 2019, 12:36:40 PM »
Yes

freakazoid

  • New User

  • Offline
  • *
  • 8
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
  • *****
  • 561
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

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find 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://stewartswebworks.com/radiodj/

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

stevewa

  • Hero Member

  • Offline
  • *****
  • 561
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

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find 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://stewartswebworks.com/radiodj/

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

freakazoid

  • New User

  • Offline
  • *
  • 8
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

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find 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://stewartswebworks.com/radiodj/

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

freakazoid

  • New User

  • Offline
  • *
  • 8
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #10 on: September 19, 2019, 09:13:50 AM »
Sorry to keep asking again. Is it possible to show the last one added in the database in radio DJ?

EmmaSts

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find ways that don't work.
    • XperienceRewind
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #11 on: September 19, 2019, 10:23:59 AM »
Sorry to keep asking again. Is it possible to show the last one added in the database in radio DJ?

Not 100% sure on what your meaning...
If you want to show the last comment in the database then you'd need a query where you could orderby id desc limit 1
Though that would only show the last comment entered, not a comment for particular song currently playing.
Is your station online where we could view and try to figure out where your going with it all ?

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

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

freakazoid

  • New User

  • Offline
  • *
  • 8
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #12 on: September 22, 2019, 07:34:29 PM »
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


Hello I have tried it and indeed it works now I only see the request with comments what I want is to see this with now playing this is possible Sorry for my English I use a Google translation machine

EmmaSts

  • Full Member

  • Online
  • ***
  • 193
  • Personal Text
    I don't fail... I find ways that don't work.
    • XperienceRewind
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #13 on: September 22, 2019, 09:38:44 PM »

Hello I have tried it and indeed it works now I only see the request with comments what I want is to see this with now playing this is possible Sorry for my English I use a Google translation machine
If it's only showing with requests, change the line you added from the requested while loop to the now playing while loop.
24 HOUR AUTOMATED REQUESTS - XPERIENCEREWIND.co.uk
Free and Premium RadioDJ Website Scripts - https://stewartswebworks.com/radiodj/

If you want to read more about me and my story -
https://www.iamtrans.net/profile.php?id=1

hypadj33

  • Full Member

  • Offline
  • ***
  • 159
Re: RadioDJ WRDJAAF Site (V1.0)
« Reply #14 on: October 27, 2019, 12:51:44 PM »
Nice work!!  @Emmasts looks even better uploaded, but  is it possible to exclude certain subcats from being shown on request page? at the moment it also shows jingles, but i would also like to exclude certain subcats as well.