MyBB Community Forums

Full Version: Mybb Audio Player
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi, i couldnt find a good one, and i modified a good one for mybb that i'm using on my blog.

Usage:
Upload the player.swf and audio-player.js to your forum root directory

Then Go to Admin Panel > Config > Mycode > Add new MyCode
Title : Mp3
Short Desc. : Mp3

Regular Expression:
\[mp3\]([^"'[<>]+?)\[/mp3\]

Replacement:
<script language="JavaScript" src="http://www.YOURSITENAME.com/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="http://www.YOURSITENAME.com/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="http://www.YOURSITENAME.com/player.swf">
<param name="FlashVars" value="playerID=audioplayer1&soundFile=$1">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object>

Enabled: Yes

Note: Change the YOURSITENAME with your site adress in the replacement codes Wink

Download The Pack

Usage:
[mp3]http://www.site.com/my.mp3[/mp3]

it will be like this
[Image: ss.png]
Cool!
Well Done!! Smile

You have to change [php.][/php.] tags to [code.][/code.]

So the the regular expression view in the correct way...

/[mp3/]([^"'[<>]+?)\[/mp3\] 

--------------------------------------

How we can do that instead of "Track #1"; appears "My Band's Name And TracK" ?? Huh

[mp3=My Band's Name & Track]http://link.to/your.mp3[/mp3]

PS: sry for my english ^^
How to work with this? i uploaded the files/added the code.
Tested on a thread [mp3][/mp3] what do i enter? the name song? link? i have to upload it?
I assume location(link) of the mp3 file goes between the tags.
How about this one:

Regular Expression
<a href="http([s])?://(.*?)\.mp3".*?>.*?</a>

Replacement
<audio src="http$1://$2.mp3" controls preload="auto" autobuffer></audio>

Example
http://example.com/your.mp3
(No need for adding MyCode tags, just paste the URL in post content)

It uses HTML5 (no Flash or Javascript needed). Smile
(2011-05-01, 07:03 PM)RKen Wrote: [ -> ]How we can do that instead of "Track #1"; appears "My Band's Name And TracK" ?? Huh

[mp3=My Band's Name & Track]http://link.to/your.mp3[/mp3]

PS: sry for my english ^^

I'm sorry we cant print the song name,now =/

(2011-05-16, 01:13 PM)Legendary Wrote: [ -> ]How to work with this? i uploaded the files/added the code.
Tested on a thread [mp3][/mp3] what do i enter? the name song? link? i have to upload it?

I explanined in first post Wink
I add the mycode, i put the file in the root on the forum, now how do I put the radio?
(2011-05-25, 08:34 PM)querschlaeger Wrote: [ -> ]How about this one:

Regular Expression
<a href="http([s])?://(.*?)\.mp3".*?>.*?</a>

Replacement
<audio src="http$1://$2.mp3" controls preload="auto" autobuffer></audio>

Example
http://example.com/your.mp3
(No need for adding MyCode tags, just paste the URL in post content)

It uses HTML5 (no Flash or Javascript needed). Smile

Thanks
Could you please help me to adding video (mp4) files in post.
Pages: 1 2