Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorjust_shark
    • CommentTimeSep 3rd 2009 edited
     permalink
    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.
    •  
      CommentAuthorlantaca
    • CommentTimeSep 4th 2009 edited
     permalink
    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]

    Thanks
    •  
      CommentAuthorjust_shark
    • CommentTimeSep 4th 2009 edited
     permalink
    Yep, the correct tag is [audio]name.mp3[/audio].
    I've forgot to update readme file. My fault, sorry.

    Hope u like it.

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

    v 1.2 (w/o volume ctrls)
    v 1.3 (with volume ctrls)
    •  
      CommentAuthorlantaca
    • CommentTimeSep 4th 2009
     permalink
    mmm, i don't see it... in the v1.3 :-)
    •  
      CommentAuthorjust_shark
    • CommentTimeSep 4th 2009 edited
     permalink
    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
    <?php
    /*
    Plugin Name: Player
    Plugin URI: http://www.sharkoblog.ru/
    Description: Adds an audio-player
    Author: just_shark
    Version: 1.3
    Author URI: http://www.sharkoblog.ru/
    */

    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')),
    'inline',
    array ('listitem',
    'block',
    'inline',
    'link'),
    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.'" />
    </object>
    </div>';

    // <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.
    •  
      CommentAuthorlantaca
    • CommentTimeSep 4th 2009
     permalink
    i'm so sorry... the cache of my browser.... :-P
    thank you very much! It works fine!
    •  
      CommentAuthorsungrazer
    • CommentTimeSep 25th 2009
     permalink
    Very nice! Thank you.

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

    Ian
    •  
      CommentAuthorviktor
    • CommentTimeDec 11th 2009 edited
     permalink
    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>...


    html5:
    <!DOCTYPE html>
    <html>
    <head>...


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

    http://daydreamer.nu/html5_demo/

    the code:

    http://daydreamer.nu/html5_demo/sys/scripts.js

    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:

    [audio=url/xy.ogg]

    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

    opinions?
    •  
      CommentAuthorTheJoe
    • CommentTimeDec 30th 2009
     permalink
    Hey, i can't reach that site.. where can i download the plugin?
    •  
      CommentAuthorTheJoe
    • CommentTimeJan 8th 2010
     permalink
    Hey, is there any way to get an answear?
    •  
      CommentAuthoriqwar
    • CommentTimeFeb 16th 2010 edited
     permalink
    I rebuilt it from the code above and used swf player from http://flash-mp3-player.net and it work for me.

    Download