I tried to use microaudio 0.2 and like several others, it had no effect when I enabled it. I am using WordPress 2.5.1 with the default theme. I looked at the ma_head function in microAudio.php and noticed that it adds a script element for the microAudio javascript before jquery. When I placed jquery first, the plugin worked. The jquery script element is not inserted when the "k2" theme is in use, presumably because k2 also loads jquery. Since jwriteclub, the author of microaudio, uses k2, perhaps he didn't test microaudio much with themes that don't load jquery, like "default". In any case, the fix seems to be very simple:
=== modified file 'microAudio.php'
--- microAudio.php 2008-04-29 21:34:49 +0000
+++ microAudio.php 2008-04-29 21:37:27 +0000
@@ -29,10 +29,10 @@
}
function ma_head() {
$ma_url = get_option('siteurl');
- echo "<script type='text/javascript' src='$ma_url/wp-content/plugins/microaudio/microAudio.js.php?siteurl=$ma_url'></script>\n";
if (get_option('template') != "k2") {
echo "<script type='text/javascript' src='$da_url/wp-content/plugins/microaudio/jquery.js.php?ver=1.2.3'></script>\n";
}
+ echo "<script type='text/javascript' src='$ma_url/wp-content/plugins/microaudio/microAudio.js.php?siteurl=$ma_url'></script>\n";
}
// Management Page
Thanks a lot, jwriteclub. This plugin uses the nice 1 pixel out player but doesn't waste a bunch of space on the page when there are several songs.