PhpBB FAQ - Music
How can I add some music to play on my Forum?
Note that you're not allowed to publish any music to your website of which you don't own the copyright or don't have the permission of the copyright owner to do so or you pay a royalty to the copyright holder. If you do publish music to your website without the right to do so you don't HAVE to but you COULD get sued! Putting music on a website means that you're providing the music to others who could easily download it even if you don't want them to do so. Downloading it is not illegal, providing it is illegal (have a look at the Note at the bottom of the page about DRM Free music you buy on iTunes)
Unless the music was created and published under Creative Commons License (What's that?) wich means that you’re free to share it.
To find some creative common licensed music go to:
Jamendo.com or have a look at the following blog post at largeheartedboy.com
Note that people usually already listen to music with iTunes, radio, ... while browsing the web. Hence having the music playing automatically on your website and not letting the visitor choose whether he wants to listen to music or not should be avoided. Give the user control of it.
On a Forum people will often change page/thread hence I would recommend you to use XSPF Web Music Player.
The good thing about this music player is that it works with a cookie. The cookie remembers what you were listening when you changed page and goes on playing from there on the next page. It has an autoresume feature.
1. Click here to download the XSPF Source files and you will get a folder called “XSPFSource”
2. In the folder you will see a file called playlist.xspf
3. Open the file in a full-TextEditor or HTML Editor and you will find a page looking like this:
For each song there’s the following code:
<track>
<location>http://yourdomain.com/music/song1.mp3</location>
<annotation>Song 1</annotation>
<image>http://yourdomain.com/music/song1-cover.jpg</image>
</track>
Under location you need to enter the URL of the MP3 file to play
Under annotation you need to enter the title of the song
Under image you need to enter the URL of the album cover (or image) to display while the song is playing.
Of course you can have more than two songs in the player, simply add more codes for the song.
If you have multiple playlists duplicate the the playlist.xspf file and rename the copy with playlist1.xspf, playlist2.xspf and so on...
4. Once you edited the playlist.xspf file upload the “XSPFSource” folder to the root of your server.
5. Where you want the player to display add the following code. I would recommend you to add it to the general Footer (overall_footer.html) so it will appear automatically on all pages. Chapter 3 of this page tells you how you can edit the Footer.
<object
type="application/x-shockwave-flash"
width="400" height="170"
data="http://yourdomain.com/XSPFSource/xspf_player.swf?playlist_url=http://yourdomain.com/XSPFSource/playlist.xspf&autoresume=1&autoplay=1">
<param
name="movie"
value="http://yourdomain.com/XSPFSource/xspf_player.swf?playlist_url=http://yourdomain.com/XSPFSource/playlist.xspf&autoresume=1&autoplay=1" />
</object>
Change the parameters height and width (in pixel) to fit your case
Substitute yourdomain.com with your domain
autoplay=1 means that it will start playing automatically, if you don’t want it to start playing automatically set autoplay=0
autoresume=1 means that it will be resuming from where it stopped playing when you changed page. If you don’t want that to happen set autoresume=0
If you have multiple playlists substitute playlist.xspf in the code with playlist1.xspf and so on...
PhpBBFAQ.net - Tutorials, Tips & Tricks is made for PhpBB.
It’s presented by Cédric and hosted by HostExcellence.com
I would like you to give me feedback on this page by commenting on the Guestbook. Tell me if it's been helpful. If it wasn’t please tell me why. If you think something is missing please tell me what. If you have questions about it post them there by leaving your real e-mail address (don’t add it in the message, there’s an appropriate field for it) and I will probably try to give you an answer.
Thank you for visiting and supporting my website.
- Cédric -