Skip to:

Add mp3 player in a post

  • Holé,

    i want to add the possibilty to insert a player for play mp3 songs, with that:

    so, i have try this:

    Plugin Name: bbPress MP3 Dewplayer

    Description: A simple way to add a mp3 player in posts, with bbcode.

    Author: Frédéric

    Author URI:

    Version: 0.1
    add_filter( 'bb_allowed_tags', 'allow_mp3_tag' );
    function allow_mp3_tag( $tags ) {$tags['mp3']; return $tags;}

    to have a simply “mp3” bbcode (i use BBcode Buttons Toolbar and BBcode Lite).

    the html code for integrate the player is:

    <object type="application/x-shockwave-flash" data="dewplayer.swf?mp3={LOCATION OF MP3}&showtime=1" width="200" height="20"><param name="wmode" value="transparent" /><param name="movie" value="dewplayer.swf?mp3={LOCATION OF MP3}&showtime=1" /></object>

    but how to integrate that in php code of plugin?

    at the end, i want that the members can post that:

    [mp3]URL OF THE MP3 FILE[/mp3]

    so, i have add that in bbcode-buttons.js:

    function edClick(button) {

    switch (BBcodeButtons[button].id) {

    case 'ed_close': edCloseAllTags(button); break;

    case 'ed_link': edInsertLink(button); break;

    case 'ed_img': edInsertImage(button); break;
    case 'ed_mp3': edInsertMp3(button); break;

    default: edInsertTag(button); break;




    function edInsertMp3() {

    var myValue = prompt('Enter the URL of the mp3 file', 'http://');

    if (myValue) {

    myValue = '[mp3]'+ myValue+'[/mp3]';




    but this is incomplete, what add in the bbcode-lite.php and my file plugin?

    please help me to finish the plugin :p


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar