PHPBB3 JW MP3 PLAYER

Discussion forum for MOD Writers regarding MOD Development.
User avatar
PunkoJotaViL
Registered User
Posts: 15
Joined: Thu Nov 06, 2008 2:57 pm

Re: PHPBB3 JW MP3 PLAYER

Post by PunkoJotaViL »

I have this player on my 3.0.2 forum....but now i got a new one and is 3.0.4.
but i cant install it...can someone help me. !!
User avatar
ameisez
Registered User
Posts: 1166
Joined: Sun Nov 04, 2007 7:04 am

Re: PHPBB3 JW MP3 PLAYER

Post by ameisez »

How are you planning to install it? as a bbcode or as a MOD? If bbcode, I have it posted on the previous page. If that doesn't work for you maybe site url might help.

What version of JWplayer do you have and what version of SWFobjects do you have?

Goodluck
PHPBB on HOSTGATOR SERVER. MY PERSONAL CHOICE ;)
Need phpBB images and buttons? HIRE ME
my MOD: BB3 Media Player | a phpbb based media player
Tarabass
Registered User
Posts: 44
Joined: Mon Mar 31, 2008 7:45 pm
Location: Elburg, Gelderland, The Netherlands
Contact:

Re: PHPBB3 JW MP3 PLAYER

Post by Tarabass »

Because I have a workaround for those who want it to use with BB-Code in userposts, i thought i should share it with y'all 8-)

BB-Code:

Code: Select all

[mp3]{URL}[/mp3]
HTML-replacement:

Code: Select all

<embed
src="player.swf"
width="550"
height="20"
bgcolor="22262A"
allowscriptaccess="always"
allowfullscreen="false"
wmode="opaque"
flashvars="file={URL}&backcolor=1A1A1A&frontcolor=C3C3C3&lightcolor=AA0000&screencolor=1A1A1A&repeat=always"
/>
Help-line:

Code: Select all

MP3: [mp3]http://domein.nl/track.mp3[/mp3]
Be sure that you download the latest version of the player to get the skinable items to work in this way. Unfortunately I didn't get a workaround for working with attachment. First because I don't know how to read out the url of the attachment (or the sql-query) and two because I can't find the original bb-codes that are coming with a fresh phpbb install.

If you know where to find those plz let me know.
dtleahy
Registered User
Posts: 169
Joined: Sun Aug 24, 2008 5:47 pm

Re: PHPBB3 JW MP3 PLAYER

Post by dtleahy »

HitByLife wrote:If prefer the SWFObject flash embed, but since there cannot be more than one instance of the player with the same id, I suggest to use the <embed> tag:

Code: Select all

<embed
src="mediaplayer.swf"
width="300"
height="20"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="height=20&width=300&file={URL}"
/>
HitByLife nailed it. You gotta use the embed code to have multiple individual players, each playing a song. His/her code works fine, but you may want to also go to the JWPlayer site and look at skins for the player. If you find one you like, just upload the TheNameOfTheSkin.swf to your site, and add it (by url) to the list of flashvars.

If you find a skin you like, hit Learn More. You can then view source on that skin's sample page, and use that URL to load the skin into the Setup Wizard at http://www.longtailvideo.com/support/jw ... ?example=2

Look under Layout, for skin. Insert that skin URL that you gleaned off the View Source page, and you can test/see it. That will help you determine what size it should be (as the default height might be too small, depending on the skin chosen.) Once you have it looking right, take note of the height and the name of the skin swf file, and then plug those into the code that HitByLife posted. For example, if you like the skin called Control Panel (which needs to be 53 pixels high), and copied that swf to your site's root, your embed code might be:

(assuming you have not purchased the player, as that one is called player-licensed.swf)

<embed src="player.swf"
width="444"
height="53"
allowscriptaccess="always"
allowfullscreen="false"
flashvars="height=53&width=444&file={URL}&skin=http://www.YourWebSite.com/controlpanel.swf"
/>

Hope this helps someone, as I wasted time on other BB codes that will not allow several members to post several songs in different posts.

Dennis
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

I've obviously done something wrong, but I'm not sure what. All I get is a line on my forum that says, "Get the Flash Player to see this player." However, clicking the link and following the directions doesn't change anything. I do have flash. I've also refreshed the template, purged the forum cache, deleted all board cookies, and restarted my browser. Here is what I've done:

Created a folder on my root called "player"
Uploaded the downloaded .zip file from the OP to the "player" folder and extracted it
Created a folder in the "player" folder called "mp3"
Uploaded three mp3's to that folder: Barracuda.mp3, KickItOut.mp3, and SayHello.mp3
Created and uploaded an XML file to "mp3" called playlist.xml with the following code:

Code: Select all

    <?xml version="1.0" encoding="utf-8"?>
    <playlist version="1" xmlns="http://xspf.org/ns/0/">
       <trackList>
        
          <track>
             <title>Barracuda</title>
             <creator>Heart</creator>
             <location>player/mp3/Barracuda.mp3</location>
          </track>
        
          <track>
             <title>Kick It Out</title>
             <creator>Heart</creator>
             <location>player/mp3/KickItOut.mp3</location>
          </track>
        
     <track>
             <title>Say Hello</title>
             <creator></creator>
             <location>player/mp3/SayHello.mp3</location>
          </track>

       </trackList>
    </playlist>
Added the following code to overall_header.html just before the </head>

Code: Select all

<script type="text/javascript" src="swfobject.js"></script>
Added the following code to forumlist_body.html just before the <!-- BEGIN Forumrow -->

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 s0 = new SWFObject('player/player.swf','mpl','233','155','8');
    s0.addParam('allowscriptaccess','always');
    s0.addParam('allowfullscreen','true');
    s0.addVariable('height','156');
    s0.addVariable('width','233');
    s0.addVariable('file','player/mp3/playlist.xml');
    s0.addVariable('frontcolor','0x1A1A1A');
    s0.addVariable('lightcolor','0xAA0000');
    s0.addVariable('screencolor','0xAA0000');
    s0.addVariable('displaywidth','0');
    s0.addVariable('searchbar','false');
    s0.addVariable('overstretch','fit');
    s0.addVariable('showicons','false');
    s0.addVariable('showeq','true');
    s0.addVariable('showstop','true');
    s0.addVariable('autoscroll','false');
    s0.addVariable('thumbsinplaylist','false');
    s0.write('player2');
</script>
Then I refreshed everything and purged the cache. Any help would be appreciate, thanks!
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

bump!
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

bump again!
Briani
Registered User
Posts: 101
Joined: Mon Jun 01, 2009 5:30 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Briani »

why is this in the SUPPORT FORUM?!!
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

That's a good question, I really have no idea. I just found it a little while ago. I'd really like to resolve this though, regardless of where the thread gets moved to; it's the only option I've found for adding music to my boards without having to write a mod myself.
dtleahy
Registered User
Posts: 169
Joined: Sun Aug 24, 2008 5:47 pm

Re: PHPBB3 JW MP3 PLAYER

Post by dtleahy »

Once you have set up your JW Player on your site, how do you plan to use it? Hard-coded XML playlist? Some sort of dynamic interaction that creates and reads a new XML file? A player that forum members can use to post multiple songs in a playlist? Or, a simple MP3 player to allow forum members to play a single MP3 file? That last one is what I did. For any other usage, you may need to post a question on the LongtailVideo site.

If you want to also include a single MP3 player, or even just set up a temporary MP3 player to test to see if you have properly set up the JW Player on your domain, you could create a custom BBCode, to invoke your player.

I did this, to create a custom BBCode to allow forum members to post individual songs within posts.:

BBCode usage:

Code: Select all

[MP3]{URL}[/MP3]

HTML replacement:

Code: Select all

<embed src="http://www.MyDomainName.com/player-licensed.swf"
width="460"
height="36"
allowscriptaccess="always"
allowfullscreen="false"
flashvars="height=36&width=460&file={URL}&skin=http://www.MyDomainName.com/snel.swf"
/>
(note the invocation of player-licensed.swf, which is what you need if you paid the license fee to have JW Player on a commercial site or site with any advertising.

You will also need to adjust the width and especially the height for whatever skin you are using - I am not really using Snel, so the height is probably wrong. I am displaying a simple, visually short version of the player, because I'm only using it to play single MP3 files, not a playlist. To display a playlist, your height will be much higher - maybe 250 to 400 or so. Plus, I think it would be a pretty complex BBCode that would allow forum members to add any number of MP3 files to create a playlist on the fly - certainly beyond my current BBCode coding skills. I actually doubt it could be done in a BBCode, and would guess the only way would be to have a user input the URL of an XML playlist file that was created some other way on your site.)


Help line:

Code: Select all

MP3 Player: [mp3]full URL link to MP3 file[/mp3]
=====================

Hope this helps!

Dennis
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

Really I just want a song to start playing when people view my forums. That's all. A simple pause/play button wouldn't hurt, but otherwise I'd just like a song to start playing in the background. I'm not looking for any kind of dynamic interaction and I don't really care if there is a playlist or not. I'm only planning on using it for the "Grand Openning" and other special occasions, as generally I think websites that play music can be annoying. Thanks for the reply, I appreciate it! I posted what I've done so far up a ways (on this page) but it didn't work. I'm not really sure where I went wrong.
dtleahy
Registered User
Posts: 169
Joined: Sun Aug 24, 2008 5:47 pm

Re: PHPBB3 JW MP3 PLAYER

Post by dtleahy »

Glen,

If you want to keep pushing ahead with the JW Player, I'd say the most obvious mistake to avoid (or crappy documentation of features and implementation) is to make sure all the paths to the key pieces are correct. The easiest way is to have everything in the same directory. Throw the MP3, and the JW Player's 2 files all into your root directory of your site, make all links point to the root, and the file will play. There is odd (undocumented? poorly documented?) behavior when you decide you'll have MP3's in your own /Audio folder, and make a directory such as /JWPlayer for the player files, even worse if you decide to hold the SWF files in your own folder that you might name /MySWFFiles or something. You have to make sure the paths are all correct, or you get nothing.

Here's another option for what you are describing: http://flash-mp3-player.net/

Dennis
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

Thanks for the tip! I installed the maxi version of the player you linked to, and it works, however I am having one problem; I can't get the file to auto-play. If you click he play-button it plays the file, but it won't start it from scatch. All the files are on the site route, including the config file, with the exception of the html code that triggers the player within the style template (obviously). My XML config file is as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?> 
- <config>
  <param name="mp3" value="http://www.cn-invicta.com/barracuda.mp3" /> 
  <param name="width" value="300" /> 
  <param name="height" value="30" /> 
  <param name="sliderwidth" value="30" /> 
  <param name="sliderheight" value="16" /> 
  <param name="buttonwidth" value="30" /> 
  <param name="bgcolor" value="cccc99" /> 
  <param name="bgcolor1" value="0000ff" /> 
  <param name="bgcolor2" value="ff0000" /> 
  <param name="showvolume" value="1" /> 
  <param name="volumewidth" value="50" /> 
  <param name="volumeheight" value="10" />
  <param name="autoplay" value="1" />
</config>
My html (which is located in forumlist_body.html just above <!-- BEGIN forumrow -->) is:

Code: Select all

<object type="application/x-shockwave-flash" data="http://www.cn-invicta.com/player_mp3_maxi.swf" width="200" height="20">
     <param name="configxml" value="http://www.cn-invicta.com/config_maxi.xml" />
     <param name="movie" value="http://www.cn-invicta.com/player_mp3_maxi.swf" />
     <param name="FlashVars" value="mp3=http://www.cn-invicta.com/barracuda.mp3" />
</object>
I was largely working off the documentation found here. Any ideas? Thanks again for the help.

P.S. If you would like to test it for yourself, the test site I'm working from is http://www.cn-invicta.com/test
Sir Glen
Registered User
Posts: 57
Joined: Fri Jun 27, 2008 7:43 pm

Re: PHPBB3 JW MP3 PLAYER

Post by Sir Glen »

anyone?
dtleahy
Registered User
Posts: 169
Joined: Sun Aug 24, 2008 5:47 pm

Flash MP3 Player

Post by dtleahy »

Glen,

Since this is sub-topic is broken out from the JW Player, maybe this should be broken out as a separate topic?
Flash MP3 Player

Anyway, I think you need to call the "play" function in a body onload statement.

Check this action:
// PLAY
document.getElementById("myFlash").SetVariable("player:jsPlay", "");

Dennis
Locked

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