How can I Embedding artist cover & Now playing text?

Ron

New member
I am looking forward to embedding my artist artwork and the now playing txt to my site. Does anyone know the code they use or what code they use I am just looking for a way to embed the updating info?
 
For title information please see this post: http://www.djsoft.net/smf/index.php/topic,3176.0.html

To export artwork - you can enable the upload via FTP option (Settings->Reports) and then display this image on your web site.
 
Its a combination of a couple of scripts...
add this to your script:

Code:
echo '<img src="artwork.png" height="150" width="150" border="0" alt="Album Cover">';
also add this too:
Code:
$section = file_get_contents('nowplaying.txt');
echo $section;

and refresh as often as your song does in the script.
 
I really don't understand like broken tags here and there no explanation %100 weird?
 
You should start from here: http://www.djsoft.net/smf/index.php/topic,3176.0.html
Once you get titles displaying on your web page, adding artwork display is easy. As Daven posted, it's enough to insert the <img> tag in the appropriate place, and set up uploading artwork via FTP.
 
I did a little bit of coding for you.  I dont know what your are running.  Asp, php, dhtml.  You didnt specify so i was generic
 
DavenLC said:
I did a little bit of coding for you.  I dont know what your are running.  Asp, php, dhtml.  You didnt specify so i was generic

I am running Bootstrap http://www.white-black-gaming.com have a look. Furthermore, how am I gonna repay you for real you're a very big help no joke, I was gonna embed the info above the HTML5 player.
 
This requires PHP:

Song.php
Code:
<meta http-equiv="refresh" content="60">
<span style="color:#15d2ef">
<?php $section = file_get_contents('nowplaying.txt'); //This assumes you have nowplaying.txt in root
echo $section;
echo"
";
echo"
";
echo '<img src="artwork.png" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork">';//This assumes you have artwork.png in root
//actual coding written by Todd at www.spfldmo.com - please leave coders name in script
?>

getsong.php This one is javascript. But since I use an iframe, I cut out the code:
Code:
<script type="text/javascript"> 
<!--       
var vUri = "song.php" ;
var vRequest; 
function getRequest() { vRequest = null; if (window.XMLHttpRequest) { vRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { try  {  vRequest = new ActiveXObject('Msxml2.XMLHTTP'); } 
catch (err) { try  { vRequest = new ActiveXObject('Microsoft.XMLHTTP'); } catch (err) { return (false); } } } vRenew = new Date(); vTest = /?/; 
vNewUri = vUri + (vTest.test(vUri)?'&':'?') + 'renew=' + vRenew.getTime(); vRequest.onreadystatechange = catchChange; vRequest.open('GET', vNewUri, true); vRequest.send(null); } 
function catchChange() { if (vRequest.readyState == 4 && vRequest.status == 200) { document.getElementById('i_reload').innerHTML = vRequest.responseText; 
setTimeout('getRequest()', 5000); } } getRequest(); 
//--> 
//actual coding written by Todd at www.spfldmo.com - please leave coders name in script
</script>

How you would get it to pull into your existing web page is up to you, I use an iframe.  It pulls the Song title and the Artwork into the same iframe.

Code for iframe in index
Code:
<iframe class="name" name="name" id="mod" src="./song.php" scrolling="auto" frameborder="0"width="256" height="250"></iframe>

 
DavenLC said:
sending pm

You're a big help daven. How can I repay you do you need advertising or promotion? I so need to repay you. Furthermore, how can I edit the image like center it and how can I move the text see my site, I want the image and text above the player nice and neat. http://www.white-black-gaming.com
 
DavenLC said:
Probably a "Margin left auto margin right auto will center a div"

HTH

yea but I wanna just center the image you know and how can i get rid of the space between the player and the image like almost Paragraph there weird?
 
Code:
#content {
 width: 700px ;
 margin-left: auto ;
 margin-right: auto ;
}

Try that..  if all else fails...  try
<center>  img example or code example</center>
 
Code:
echo '<img src="artwork.png" align="center" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork">';

see if that works or..

Code:
echo '<center><img src="artwork.png" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork"></center>';


I think..  also,  adjust your height width, your images seem scrunched...  you can remove height and width to see what it looks like then make adjustments
 
Thanks testing now just trying to report issues with RB and being flamed but i am testing now your a great guy thanks.
 
DavenLC said:
Code:
echo '<img src="artwork.png" align="center" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork">';

see if that works or..

Code:
echo '<center><img src="artwork.png" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork"></center>';


I think..  also,  adjust your height width, your images seem scrunched...  you can remove height and width to see what it looks like then make adjustments

Looks amazing man i need to get rid of that big space that's there in between the player.
 
remove line breaks  the BR;  lines

Don't forget the line color...  you can probably remove that too...

Code:
<span style="color:#15d2ef">

(I'm watching your page as you code it...)
 
I think for your page, swap the artwork and song title

Code:
echo '<img src="artwork.png" height="150" width="150" border="0" alt="Album Cover" title="Album ArtWork">';
echo"
";
<?php $section = file_get_contents('nowplaying.txt');
echo $section;
 
Back
Top