• I’m trying to get audioplayer to work in a sidebar widget. I tried this code (using the example on the FAQ page) which didn’t work:

    <?php if (function_exists(“insert_audio_player”)) {
    insert_audio_player(“<p class=”audioplayer_container”><span style=”display:block;padding:5px;border:1px solid #dddddd;background:#f8f8f8″ id=”audioplayer_7″>Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.</span></p><script type=”text/javascript”>AudioPlayer.embed(“audioplayer_7″, {soundFile:”http://www.foraysinforgiveness.com/audio/simpletales_archives_june_18-Susan_Dugan_Interview.mp3&#8243;});</script>”);
    } ?>

    and also this variation (without the full URL, since the file is in the audio directory:

    <?php if (function_exists(“insert_audio_player”)) {
    insert_audio_player(“<p class=”audioplayer_container”><span style=”display:block;padding:5px;border:1px solid #dddddd;background:#f8f8f8″ id=”audioplayer_7″>Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.</span></p><script type=”text/javascript”>AudioPlayer.embed(“audioplayer_7″, {soundFile:”simpletales_archives_june_18-Susan_Dugan_Interview.mp3″});</script>”);
    } ?>

    But neither works; it loads the player, but gives a “File not found” message… Also it seems like I must have a syntax error, since after the player (on the next line) I see this extra code:
    “); } ?>

    http://wordpress.org/extend/plugins/audio-player/

  • The topic ‘Syntax error using AudioPlayer FAQ example in a sidebar widget’ is closed to new replies.