Hello Jonny,
Here is the article with my comments:
So far this works on FireFox, Chrome, Safari & Opera for Mac (tested Feb 16, 2011). GOTTA CHECK PC browsers! It works on PC browsers too.
- Add audio-player.js file to site. It gets added to the head section of the site by adding it to the jscript folder (upload to: root > includes > templates > Your Theme Name > jscript):
You may have to create your own jscript folder, if it doesn't exist already.
jscript_audio-player.js (MUST add the jscript_ tag to the front of the file name in order for it to show up in the header of the site)
Very important to add that jscript_
-
Add player.swf file to site. (upload to: root > includes > templates > Your Theme Name)
-
Add to tpl_header.php file, line 196, (upload to: root > includes > templates > theme245 > common):
Correction: I added the following code to root > includes > templates > template_default > common > html_header.php. The following code also needs to be retyped in an html or plain text editor. You will find that the quotes are the wrong kind and that there are several other small errors. Also, don't forget to replace the file path with Your file path!
<!– BOF – WP Audio Player, Standalone http://wpaudioplayer.com/standalone/ –>
<script type=”text/javascript”>
AudioPlayer.setup(“http://www.100yearsofmusic.net/includes/templates/theme245/player.swf”, {
width: 290
});
</script>
<!– EOF – WP Audio Player, Standalone http://wpaudioplayer.com/standalone/ –>
- Add MP3 directly to Zen Cart product page via Admin:
Again here, retype the code given as there are several errors in it. This just goes in your product page, but make sure you have the plain text editor on in Zen Cart and not the HTML/WYSIWYG editor option. The HTML/WYSIWYG will scramble your code every time you go to edit it. Again, replace the file path with your own.
<p id=”audioplayer_1″>Audio Player 1</p>
<script type=”text/javascript”>
AudioPlayer.embed(“audioplayer_1″, {soundFile: “http://www.100yearsofmusic.net/media/pops-song-snippet-the-home-team-band.mp3″,
titles: “Pop’s Song”,
artists: “The Home Team Band”,
autostart: “no”
});
</script>
Here is my code:
For html_header.php:
<script type="text/javascript">
AudioPlayer.setup("http://livingmagick.com/includes/templates/lite_red/player.swf", {
width: 290
});
</script>
For the Product pages:
<p>Song Title</p>
<p id="audioplayer_1">Audio Player</p>
<script type="text/javascript">
AudioPlayer.embed("audioplayer_1", {soundFile:"http://www.100yearsofmusic.net/media/pops-song-snippet-the-home-team-band.mp3",
titles:"Pop's Song",
artists:"The Home Team Band",
autostart: "no",});
</script>
Also, if you want multiple players on the same page they will look like this:
<p>Song Title</p>
<p id="audioplayer_1">Audio Player</p>
<script type="text/javascript">
AudioPlayer.embed("audioplayer_1", {soundFile:"http://www.100yearsofmusic.net/media/pops-song-snippet-the-home-team-band.mp3",
titles:"Pop's Song",
artists:"The Home Team Band",
autostart: "no",});
</script>
<p>Song Title</p>
<p id="audioplayer_2">Audio Player 2</p>
<script type="text/javascript">
AudioPlayer.embed("audioplayer_2", {soundFile:"http://www.100yearsofmusic.net/media/pops-song-snippet-the-home-team-band.mp3",
titles:"Pop's Song",
artists:"The Home Team Band",
autostart: "no",});
</script>
The next one would be audioplayer_3, make sure to to change it in both places of the code.
I hope this helps!