I have patched a version of this plugin to work with WP 3.2.1 and wp in a subdir.
Index: wp-freemind.php
===================================================================
--- wp-freemind.php (revision 469913)
+++ wp-freemind.php (working copy)
@@ -27,10 +27,10 @@
function freemind_init() {
//Register the flashobject JS library
- wp_enqueue_script('flashobject', '/wp-content/plugins/wp-freemind/flashobject.js', array(), true);
+ wp_enqueue_script('flashobject', plugins_url('flashobject.js', __FILE__), array(), true);
}
-add_action('plugins_loaded', 'freemind_init');
+add_action('init', 'freemind_init');
//Function to replace the [mindmap] shortcode
function handle_freemind_shortcode($atts, $content) {
@@ -40,14 +40,14 @@
);
//Generate unique id for DIV to be replaced
$id = 'wpf'.time().rand(0,1000);
-if ($content == '') $content = '/wp-content/plugins/wp-freemind/wp-freemind.mm';
+if ($content == '') $content = plugins_url('wp-freemind.mm', __FILE__);
$a = shortcode_atts($defaults_array, $atts);
$height = 'height:'.$a['height'];
$width = ($a['width'])?(';width:'.$a['width']):'';
return '<div id="'.$id.'" style="'.$height.$width.'">JavaScript or Flash plugin need to be activated in your browser.</div>
<script type="text/javascript">
<!--
-var fo = new FlashObject("/wp-content/plugins/wp-freemind/visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#9999ff");
+var fo = new FlashObject("' . plugins_url('visorFreemind.swf', __FILE__) . '", "visorFreeMind", "100%", "100%", 6, "#9999ff");
fo.addVariable("initLoadFile","'.$content.'");
fo.write("'.$id.'");
//-->