Introduce yourself here! In order to avoid spam, new users must first comment on the discussion in the 'Introductions' before they become 'full members'
Tiny Flash MP3 Player
  • Hello, guys.

    Mainly, i apologize for my bad english-speaking skills. Actually, my original language is russian.

    So, i want to present to you my first plugin - Audioplayer. (download).

    It uses free Flash mp3 Player to include mp3 files in your blog.
  • I don't no why, but it doesn't work on my blog.
    I've activated the plug-in, i've upload an MP3 and i've write [audio=name.mp3] tag, but when i save the post, i see the tag's text and i don't hear any music.
    What i have to do?

    Works the plugin in a static page?

    Solved, the correct tag is [audio]name.mp3[/audio]

  • Yep, the correct tag is [audio]name.mp3[/audio].
    I've forgot to update readme file. My fault, sorry.

    Hope u like it.

    Also you can change player's color.
    Just modify variables in plugin.player.php file.
  • yes, i've seen. tanks
    is possible to add the volume control at the player?
  • Yes.
    Please, enjoy :)

    v 1.2 (w/o volume ctrls)
    v 1.3 (with volume ctrls)
  • mmm, i don't see it... in the v1.3 :-)
  • well...

    i've just re-uploaded v1.3 and here's files u need:

    player.swf - put it in fp-plugins/player/res/ dir
    plugin.player.php - fp-plugins/player/ dir
    Plugin Name: Player
    Plugin URI:
    Description: Adds an audio-player
    Author: just_shark
    Version: 1.3
    Author URI:

    add_filter('init', 'plugin_bbcode_audio_tags');

    function plugin_bbcode_audio_tags() {
    $bbcode =& plugin_bbcode_init();
    $bbcode->addCode (
    'audio', 'callback_replace', 'plugin_custombbcode_audio',
    array('usecontent_param' => array ('default')),
    array ('listitem',
    array ());

    $bbcode->setCodeFlag ('audio', 'closetag', BBCODE_CLOSETAG_MUSTEXIST);

    function plugin_custombbcode_audio($action, $attributes, $content, $params, &$node_object) {

    // here's your player colors:
    $bgcolor = "ffffff"; // very bgcolor
    $bgcolor1 = "999999"; // top bg
    $bgcolor2 = "777777"; // bottom bg
    $loadingcolor = "ffffff"; // loading bar
    $buttoncolor = "eeeeee"; // button color
    $buttonovercolor = "ffffff"; // button color on mouseover
    $slidercolor = "eeeeee"; // slider color
    $sliderovercolor = "cccccc"; // slider color on mouseover

    if ($action == 'validate') {
    return true;

    return '<div style="margin: 8px;">
    <object type="application/x-shockwave-flash" data="'.PLUGINS_DIR.'/player/res/player.swf" width="200" height="20">
    <param name="movie" value="'.PLUGINS_DIR.'/player/res/player.swf" />
    <param name="bgcolor" value="'.$bgcolor.'" />
    <param name="FlashVars" value="mp3='.ATTACHS_DIR.$content.'&amp;showvolume=1&amp;showloading=always&amp;loadingcolor='.$loadingcolor.'&amp;bgcolor='.$bgcolor.'&amp;bgcolor1='.$bgcolor1.'&amp;bgcolor2='.$bgcolor2.'&amp;slidercolor2='.$slidercolor.'&amp;sliderovercolor='.$sliderovercolor.'&amp;buttoncolor='.$buttoncolor.'&amp;buttonovercolor='.$buttonovercolor.'" />

    // <param name="FlashVars" value="mp3='.ATTACHS_DIR.$content.'&amp;bgcolor='.$bgcolor.'&amp;loadingcolor='.$loadingcolor.'&amp;buttoncolor='.$buttoncolor.'&amp;slidercolor='.$slidercolor.'" />



    it works fine at my blog.
  • i'm so sorry... the cache of my browser.... :-P
    thank you very much! It works fine!
  • Very nice! Thank you.

    Do you have any plans to support the other players - specifically the multi player?

  • it would be great to make use of the "audio" html5 element. sadly it's not xhtml conformant, but fortunately xhtml code is html5-compatible in general. you have to change doctype, but that's not a big deal.

    flatpress should then provide an api for plugins to change the doctype. or maybe an option in the admin panel. it's simple.

    xhtml 1.0 strict:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""&gt;
    <html xmlns=""&gt;

    <!DOCTYPE html>

    then it's easy to add audio elements. here's an excerpt from my old site, which makes heavy use of JS:

    the code:

    both versions work but only the html5 version is standard-compliant. don't look at its length, we would need much less for an audio element:


    would have to be rendered as:

    <audio src="url/xy.ogg">message for browsers not supporting html5 audio tag</audio>

    easy! then you can add extras like autoplay or controls, like

    <audio src="url/xy.ogg" controls="true" autoplay>

    if you want to avoid JS, controls should be enabled by default. an example of controls in firefox:

    html5 audio controls in firefox 3.5

  • Hey, i can't reach that site.. where can i download the plugin?
  • Hey, is there any way to get an answear?
  • I rebuilt it from the code above and used swf player from and it work for me.

  • Hopefully it's okay to continue this thread:

    Re. NoWhereMan's point here:

    Yes, there's 2 links to a v.1.3: [page doesn't load]
    and the one on this post (which I guess is the one you're referring to):

    That .zip contains a 56 byte txt.txt file which contains:
    "Âñå ÷òî òû èùåøü, íàõîäèòñÿ çäåñü"

    It appears that not everything required is available in this thread, unless I'm missing something.

    Thanks again for speedy reply, much appreciated.


    ps. Would be good if there was a central repository for user plugins, so they can't just disappear.
  • I corrected some lines to make the player work on the front page as well as on a single page. You can download it here and install it directly.
  • Can anybody reupload a version of the player? and where do I have to put the audio files?

    Got it! Download the swf File from
    Rename it to player.swf
    creat a folder "player"
    creat a plugin.player.php file in the "player" folder and fill it with the code above (link)

    and a subfolder "res", put player.swf in the "res" folder.
    upload the folder "player" to your fp-plugin.

    You can even define a audio folder: Thinking about it, I wouldn't do that. If you update Flatpress you have to update your defaults.php too...
    open default.php and search for

    define('ATTACHS_DIR', FP_CONTENT . 'attachs/');

    copy paste it in the next line and change it to:

    define('AUDIO_DIR', FP_CONTENT . 'audio/');

    create a folder named "audio" in fp-content

    now you have to put the mp3 file in the audio folder.

    tags are:
  • The original blog and link for this plugin have disappeared so I've added a slightly updated version of this plugin to the wiki. No changes are needed to defaults.php with this version - just upload the plugin, enable it, and save your mp3 files to the fp-content/attachs folder. Then use [audio]filname.mp3[/audio] in your posts/static pages.

    It also works in blockparser widgets too.

    See this post for more details about this version and a link to it on the wiki:

    P.S. Still not working in some versions of Internet Explorer

Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion