PHPBB3 JW MP3 PLAYER

Discussion forum for MOD Writers regarding MOD Development.
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

PHPBB3 JW MP3 PLAYER

Post 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
:)
bosss
Registered User
Posts: 118
Joined: Sat Jun 30, 2007 11:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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
Xabi
Registered User
Posts: 460
Joined: Wed May 23, 2007 9:04 am

Re: PHPBB3 JW MP3 PLAYER

Post by Xabi »

Could this be done for internal MP3, I mean, MP3 attachments?
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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:
Last edited by Wizardnyc on Tue Dec 04, 2007 7:54 pm, edited 1 time in total.
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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 :)
bosss
Registered User
Posts: 118
Joined: Sat Jun 30, 2007 11:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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 :)
bosss
Registered User
Posts: 118
Joined: Sat Jun 30, 2007 11:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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:
princejp1
Registered User
Posts: 16
Joined: Thu Sep 27, 2007 9:30 pm

Re: PHPBB3 JW MP3 PLAYER

Post by princejp1 »

ohhh i wanna give it a shot.. thanks
.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

Re: PHPBB3 JW MP3 PLAYER

Post by .:: Chico ::. »

Interresting, and thanks
i'm gonna test it.

but, maybe is it possible to use shoutcast playlist to streaming something :?:
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: PHPBB3 JW MP3 PLAYER

Post 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 :)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Wizardnyc
Registered User
Posts: 7
Joined: Mon Apr 17, 2006 3:36 am

Re: PHPBB3 JW MP3 PLAYER

Post 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:
yaw_pakhtoon
Registered User
Posts: 107
Joined: Wed Sep 12, 2007 12:18 am

Re: PHPBB3 JW MP3 PLAYER

Post by yaw_pakhtoon »

thanks.. it looks really good..
Image
mladen88
Registered User
Posts: 158
Joined: Wed May 30, 2007 9:06 pm

Re: PHPBB3 JW MP3 PLAYER

Post by mladen88 »

very nice guy ;)
Locked

Return to “[3.0.x] MOD Writers Discussion”