Page 1 of 5

PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 4:17 pm
by Wizardnyc
First of all I am not mod coder, I needed an mp3 player for my site so I intergrated the JW MP3 player into PHPBB3, which was quite easy :)
This is how I did it,
First download the JW MP3 PLAYER here
http://www.jeroenwijering.com/?item=JW_MP3_Player
Then Upload all the files to the forums root folder.
Now we go to the admin panel of the forums, there go to Styles then click on templates, Click on edit and on the dropdown menu look for overall_header.html. On the overall_header.html file add this code before the </head>

Code: Select all

<script type="text/javascript" src="swfobject.js"></script>
Then Save it.
Now click on Posting Tab on the admin panel, and click on Add a new BBcode
On the BBCode usage box insert these code

Code: Select all

[mp3]{URL}[/mp3]
and on the HTML replacement box insert this

Code: Select all

<p id="player3"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
	var s3 = new SWFObject("mp3player.swf", "line", "240", "20", "7");
	s3.addVariable("file","{URL}");
	s3.addVariable("repeat","true");
	s3.addVariable("showdigits","false");
	s3.addVariable("showdownload","true");
	s3.addVariable("width","240");
	s3.addVariable("height","20");
	s3.write("player3");
</script>
On the Help line enter a tip if you want, Like enter Url of the MP3 here ect...
Then click on Submit.
That's it you done :)
Now to use it, the users needs to click on the mp3 button on the posting box, and enter the url of where the MP3 is located, like this.

Code: Select all

[mp3]http://www.yoursite.com/music/song.mp3[/mp3]
Here is a demo for you guys to check it
http://www.lazonaurbana.com/vakero-se-r ... n-t18.html
:)

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 4:43 pm
by bosss
very nice ... but i will not have player(songs) in posts ... will have outside (on overall_header.html somewhere or maybe overall_footer-html ) with little playlist ...is it possible? and what to do ?

regards
bosss

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 7:47 pm
by Xabi
Could this be done for internal MP3, I mean, MP3 attachments?

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 7:52 pm
by Wizardnyc
bosss wrote:very nice ... but i will not have player(songs) in posts ... will have outside (on overall_header.html somewhere or maybe overall_footer-html ) with little playlist ...is it possible? and what to do ?

regards
bosss
sure you can put it anywhere, just insert the code

Code: Select all

<p id="player3"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
   var s3 = new SWFObject("mp3player.swf", "line", "240", "20", "7");
   s3.addVariable("file","http://www.yoursite.com/song.mp3");
   s3.addVariable("repeat","true");
   s3.addVariable("showdigits","false");
   s3.addVariable("showdownload","true");
   s3.addVariable("width","240");
   s3.addVariable("height","20");
   s3.write("player3");
</script>
The best place to put I found is in the main page, you need to edit the forumlist_body.html, and add the code right above <!-- BEGIN forumrow --> that way the player will appear under the menu :) but ya can put it any template including the overall header and footer :geek:

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 7:53 pm
by Wizardnyc
Xabi wrote:Could this be done for internal MP3, I mean, MP3 attachments?
That i really don't know, but I was going to try to see if I can use an upload code and integrated to phpbb, but like I say I am not really a coder so lol its just a though :)

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 8:10 pm
by bosss
ok...i understand .. but where put the songs ? i mean -- i will have player on index page ...with few uploaded songs ...which one, users can use when they are on forum!

thanks for replay

bosss

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 8:30 pm
by Wizardnyc
bosss wrote:ok...i understand .. but where put the songs ? i mean -- i will have player on index page ...with few uploaded songs ...which one, users can use when they are on forum!

thanks for replay

bosss
ah okie, you need to upload the songs to your server, or a hosting site, and if you want to put multiple songs then you need to create a xml playlist, like this, this was the example giving by JW, it is call playlist.xml and it looks like these, there you enter the title, the author and the location url where the song is located.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
	<trackList>

		<track>
			<title>Homeland</title>
			<creator>Postman</creator>
			<location>song1.mp3</location>
		</track>

		<track>
			<title>Jazzalude</title>
			<creator>Basement Jaxx</creator>
			<location>song2.mp3</location>
		</track>

		
		<track>
			<title>Homeland</title>
			<creator>Postman</creator>
			<location>song1.mp3</location>
		</track>

		<track>
			<title>Jazzalude</title>
			<creator>Basement Jaxx</creator>
			<location>song2.mp3</location>
		</track>
		
		<track>
			<title>Homeland</title>
                        <creator>Postman</creator>
			<location>song1.mp3</location>
		</track>

	</trackList>
</playlist>
Then you upload the playlist.xml file to your server and use this code to insert the player in the template of of the forum you want.

Code: Select all

<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
	var s2 = new SWFObject("mp3player.swf", "playlist", "240", "135", "7");
	s2.addVariable("file","playlist.xml");
	s2.addVariable("backcolor","0x00000");
	s2.addVariable("frontcolor","0xEECCDD");
	s2.addVariable("lightcolor","0xCC0066");
	s2.addVariable("displayheight","0");
	s2.addVariable("width","240");
	s2.addVariable("height","135");
	s2.write("player2");
</script>
In that code, you need to tell where the playlist.xml is located on the line

Code: Select all

s2.addVariable("file","playlist.xml");
And you can change the looks of it :)

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 9:19 pm
by bosss
do not need tell where is mp3 player - only playlist??

i make like this

Code: Select all

<a name="start_here"></a>
	<div id="page-body">
	<p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
   var s2 = new SWFObject("/mp3/mp3player.swf", "playlist", "240", "135", "7");
   s2.addVariable("file","/mp3/playlist.xml");
   s2.addVariable("backcolor","0x00000");
   s2.addVariable("frontcolor","0xEECCDD");
   s2.addVariable("lightcolor","0xCC0066");
   s2.addVariable("displayheight","0");
   s2.addVariable("width","240");
   s2.addVariable("height","135");
   s2.addVariable("repeat","false");
   s2.addVariable("autostart","false");
   s2.addVariable("showeq","true");
   s2.addVariable("thumbsinplaylist","true");
   s2.addVariable("showdigits","false");
   s2.addVariable("shuffle","true");
   s2.addVariable("volume","40");
   s2.addVariable("autoscroll","true");
   s2.addVariable("showicons","true");
   s2.write("player2");
</script>
	
in my overall_header.html
i have uploaded jw mp3 player in my forum root (named mp3 directory with player ) and get some on my forum... just link to adobe flash player ...you can see .. http://www.belaplay.com/libarxx

bosss

Re: PHPBB3 JW MP3 PLAYER

Posted: Tue Dec 04, 2007 10:00 pm
by Wizardnyc
umm I dont see the player did you add this code

Code: Select all

<script type="text/javascript" src="swfobject.js"></script>
to the overall header before the </head> :roll:

Re: PHPBB3 JW MP3 PLAYER

Posted: Wed Dec 05, 2007 12:05 am
by princejp1
ohhh i wanna give it a shot.. thanks

Re: PHPBB3 JW MP3 PLAYER

Posted: Wed Dec 05, 2007 12:30 am
by .:: Chico ::.
Interresting, and thanks
i'm gonna test it.

but, maybe is it possible to use shoutcast playlist to streaming something :?:

Re: PHPBB3 JW MP3 PLAYER

Posted: Wed Dec 05, 2007 1:22 am
by A_Jelly_Doughnut
Hi,

I've moved your topic from MODs in Development because your Custom BBCode does not actually modify any phpBB files :)

Re: PHPBB3 JW MP3 PLAYER

Posted: Wed Dec 05, 2007 4:22 am
by Wizardnyc
It's cool A_jelly :)
.:: Chico ::. wrote:Interresting, and thanks
i'm gonna test it.

but, maybe is it possible to use shoutcast playlist to streaming something :?:
i havent use that, but the user will only be able to use a playlist for a specific template :) I really did that for people posting, which I needed :mrgreen:

Re: PHPBB3 JW MP3 PLAYER

Posted: Wed Dec 05, 2007 2:13 pm
by yaw_pakhtoon
thanks.. it looks really good..

Re: PHPBB3 JW MP3 PLAYER

Posted: Thu Dec 06, 2007 6:08 am
by mladen88
very nice guy ;)