Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Mp3 player via widgets (http://forum.bytesforall.com/showthread.php?t=161)

mactony Feb 1, 2009 03:00 PM

Mp3 player via widgets
 
I have been trying embed an open source mp3 player.

The player works correctly here: http://www.midriffrecords.com/home.html, but I am now trying to move it to my Atahualpa rebuild.

Using the Theme Options HTML/CSS inserts, I have inserted the appropriate javascript into the header.
<script type="text/javascript" src="http://www.midriffrecords/com/mp3/swfobject.js"></script>

And then, using the Text/Random HTML widget, I have tried to place the player on the page, right column, under the "Audio" heading. This is what I have inserted into the Text/HTML Widget box.
<DIV>
<script type="text/javascript">
var s2 = new SWFObject("http://www.midriffrecords.com/mp3/mp3player.swf", "playlist", "240", "200", "7");
s2.addVariable("file","http://www.midriffrecords.com/mp3/playlist.xml");
s2.addVariable("backcolor","0x021e2f");
s2.addVariable("frontcolor","0xe2e2e2");
s2.addVariable("lightcolor","0xc5960b");
s2.addVariable("displayheight","0");
s2.addVariable("width","240");
s2.addVariable("height","200");
s2.write("player2");
</script>
</DIV>

http://www.midriffrecords.com/midriff_TEST/

But the player is not appearing. Is the text widget not suitable for inserting this kind of code?

Or is there a better, smoother, more Wordpress compatible mp3 player that anyone might know about?

Thanks!

Flynn Feb 1, 2009 03:20 PM

I think you have a typo here

HTML Code:

<script type="text/javascript" src="http://www.midriffrecords/com/mp3/swfobject.js"></script>
The Slash between midriffrecords and com most likely needs to be a dot:

HTML Code:

<script type="text/javascript" src="http://www.midriffrecords.com/mp3/swfobject.js"></script>

mactony Feb 1, 2009 03:31 PM

Yikes! Unfortunately, that did not fix it. But boy did I sure hurt my forehead! :)

Flynn Feb 1, 2009 04:40 PM

Looks like we both missed yet another typo

Edit: Seems to be gone now or I saw something that wasn't there. Anyway, it seems the Javascript isn't in your (test) page anymore (at all)

mactony Feb 1, 2009 04:49 PM

Hi Flynn,

I have been monkeying around with the page, assuming that I had messed up one of the other urls. But I have double checked everything, and the javascript for the player is right above the closing HEAD tag, and inserted the flash object verbatim from the previous html. On the bright side, now I am getting a box in the shape of the player, but it still isn't linking up to the player itself. Do you think I should move everything to a local folder in the atahualpa directory? I can't see that being the answer, but I am stumped on this one. Could is possibly be any of the div stylings from the widget?

Flynn Feb 1, 2009 06:39 PM

I looked and couldn't find an error. There seems to be one closing div too much for the text widget that contains the player, that might be caused by the theme, but should not disturb the player. The P tag with the ID "player2" is important and it's there, and closed properly. The SWF and the Javascript are there and referenced properly. No tricky hiding or anything is being done with the widget divs. At the moment I have no idea, sorry, but I can have a look again tomorrow if you remind me with a post..

mactony Feb 2, 2009 10:34 AM

thanks flynn for all the help. as i assumed initially, the problem was neither with the theme, the widget, nor myself (for once!). i uploaded a new player and a playlist, and it worked fine. i think there was something in the old player's code, but i can't imagine what. i don't really care, i found a new opensource player that rocks and is a breeze to use.

for anyone interested in seeing a half built site with a great mp3 player, visit
midriffrecords.com/midriff_TEST

or just visit here for the original
http://blog.lacymorrow.com/projects/...ox/?t=Original


All times are GMT -6. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.