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 ?

Source code


$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".
	"<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\");".
	"<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";





Future improvments

There are 2 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki