Display Freemind mindmaps with a Flash plug-in
This code display Freemind mindmaps with a flash plug-in (it can replace the Java plug-in). This code is based on the DokuWiki plug-in. It would be great if someone could improve it.
How-to install this beta action ?
- You need to download the package with the Flash viewer, and you can see the discussion about it on Sourceforge.
- Create a new action, flashmindmap.php for example.
- You need to replace ".$path2file." with your own value.
- Upload the file and the content of the zip package on your website.
- Use the syntax {{flashmindmap http://path/of/my/mindmap.mm}}
Source code
<?php $mindmap_url = $vars['url']; if ((!$mindmap_url && !$height) && $wikka_vars) $mindmap_url = $wikka_vars; $mindmap_url = $this->cleanUrl(trim($mindmap_url)); $height = $this->htmlspecialchars_ent(trim($vars['height'])); if ($mindmap_url) { $output = "<script type=\"text/javascript\" src=\"".$path2file."flashobject.js\"></script>". "<div id=\"flashcontent\">". " Flash plugin or Javascript are turned off.". " Activate both and reload to view the mindmap". "</div>". "<script type=\"text/javascript\">". " var fo = new FlashObject(\"".$path2file."visorFreemind.swf\", \"".$path2file."visorFreeMind\", \"100%\", \"100%\", 6, \"#9999ff\");". " fo.addParam(\"quality\", \"high\");". " fo.addParam(\"bgcolor\", \"#ffffff\");". " fo.addVariable(\"openUrl\", \"_blank\");". " fo.addVariable(\"initLoadFile\", \"".$mindmap_url."\");". " fo.addVariable(\"startCollapsedToLevel\",\"3\");". " fo.addVariable(\"mainNodeShape\",\"rectangle\");". " fo.write(\"flashcontent\");". "</script>"; "<span class=\"floatr\"><a href=\"$mindmap_url\">Download this mind map</a> :: Use <a href=\"http://freemind.sourceforge.net/\">Freemind</a> to edit it.</span><div style=\"clear:both;\"></div>\n"; print($output); } ?>
Bugs
- This code works on Internet Explorer 6.0, Firefox (but there is a bug and it is not well displayed).
Future improvments
- ...
CategoryFreemind