FlashMind : Freemind Embedded into WikkaWiki using Flashplayer


FlashMind displays the FreeMind map using flash player instead of Java.

Basic Usage

{{flashmind url="http://example.com/freemind.mm" [width=x] [height=x]}}


Installation

Download the visorFreeMind.swf file from here
Download the SWFObject.js from here
put all the above files in `3dparty/plugins/flashmind/` directory.
put the following php script in `actions/` directory.

flashmind.php (line 1)
  1. <?php
  2. /**
  3. * Renders a Freemind mindmap using embedded Flash player
  4.  
  5. * Usage: {{flashmind url="http://example.com/freemind.mm" [width=x] [height=x]}}
  6. * Width and Height are optional arguments.
  7. *
  8. * @package 3rdparty/plugins/flashmind
  9. * @name    FlashMind
  10. *
  11. * @author    {@link http://www.btbytes.com/pages/FlashMind Pradeep Kishore Gowda}
  12.  
  13. * @version    0.5
  14. *
  15. * @input    string $url mandatory: the url of the Freemind map
  16. * @input    string $width optional: width of the flash player
  17. * @input    string $height optional: height of the flash player
  18. * @output   Freemind map embedded in flash player
  19. *
  20. *
  21. * @documentation  {@link http://wikkawiki.org/FlashMind}
  22. */
  23.  
  24.  
  25. if (!$width) $width = 550;
  26. else $width = (int)$width;
  27. if ($width>950) $width = 950;
  28.  
  29. if (!$height) $height = 400;
  30. else $height = (int)$height;
  31. if ($height>950) $height = 950;
  32.  
  33. if (!$url) $url = $vars[0];
  34. $url = $this->cleanUrl(trim($url));
  35.  
  36. if ($url)
  37. <p style="text-align:center"><a
  38. href="'.$url.'">'.$url.'</a></p>
  39. <script type="text/javascript"
  40. src="3rdparty/plugins/flashmind/flashobject.js"></script>
  41. <div id="flashcontent" onmouseover="giveFocus();">
  42.          Flash plugin or Javascript are turned off.
  43.          Activate both  and reload to view the mindmap
  44.     </div>
  45. <p><script type="text/javascript">
  46. // <![CDATA[
  47. function getMap(map){
  48.           var result=map;
  49.           var loc=document.location+"";
  50.           if(loc.indexOf(".mm")>0 && loc.indexOf("?")>0){
  51.             result=loc.substring(loc.indexOf("?")+1);
  52.           }
  53.           return result;
  54.         }
  55. var fo = new FlashObject("3rdparty/plugins/flashmind/visorFreemind.swf",
  56. "3rdparty/plugins/flashmind/visorFreeMind", '.$width.', '.$height.', 6, "");
  57. fo.addParam("quality", "high");
  58. fo.addParam("bgcolor", "#ffffff");
  59. fo.addVariable("initLoadFile", getMap("'.$url.'"));
  60. fo.addVariable("startCollapsedToLevel", "5");
  61. fo.addVariable("openUrl", "_blank");
  62. fo.write("flashcontent");
  63. // ]]>
  64. </script>
  65. </p>';
  66. ?>




CategoryUserContributions CategoryFreeMind FreeMind
There are 4 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki