Freemind filter

Freemind filter

by Janko Harej -
Number of replies: 24
Hi,

I've tried to make a freemind filter. I've used mediafilter as "template" as I'm very new to php. The idea is to have similar behavior as with mp3 and other media files. So freemind maps could get uploaded and simply used in web pages.

Unfortunatly code does not work. So I ask anyone to look at the code and give me some instructions.
Average of ratings: -
In reply to Janko Harej

Re: Freemind filter

by Markus Knierim -
Hi Janko,

I just discovered this thread big grin

I had a quick look at your code, and after changing function mediaplugin_filter($courseid, $text) to function freemind_filter($courseid, $text), it worked about just fine wink Since I'm not much of a programmer, I haven't managed to adjust the size of the java applet area. Even though your code sets width and height to 100%, the applet comes up rather small. I hardcoded it to 800x600 px to make it usable, but this definitely needs to be changed.

Thanks for sharing your code -- very useful for me cool

Markus
In reply to Markus Knierim

Re: Freemind filter

by Markus Knierim -
Adding to my previous posting: When you add width:100% to .generalbox in your theme's layout.css, the mindmap does use the full width smile I have no idea, however, how to increase the height of a mindmap without hardcoding it into filter/freemind/filter.php, so I set it to 500px for the moment, which should look acceptable on 1280x1024 and 1024x768. Also, in line 24, I changed &nbsp; to <br /> -- otherwise IE would cut off the right margin of the mindmap. Hope this helps.

Markus

In reply to Markus Knierim

Re: Freemind filter

by Brecht De Cooman -
Hi,

being rather interested in MindMapping (working on it with my students), I would like to see this hack in action. Could you direct your interested public to a demo course or post a screen shot please ?

Thanks !
In reply to Brecht De Cooman

Re: Freemind filter

by Markus Knierim -
Hello Brecht,

Thanks for your interest smile Attached is a screenshot of a mindmap (my students' associations with the term "research") that I created with Freemind. I uploaded the .mm file to my course, created a new resource ("compose a new web page"), and simply added a link from the web page resource to the .mm file. With the Freemind filter enabled, the mindmap is automatically rendered on the screen using a java applet. By clicking on the nodes you can fold/unfold the branches.

Cheers,
Markus
In reply to Markus Knierim

Re: Freemind filter

by Ger Tielemans -
See this one, a beaty of simplicity/elegance: http://xebece.sourceforge.net/screenshots
In reply to Ger Tielemans

Re: Freemind filter

by Ger Tielemans -
Freemind filter works nice in Firefox, only the 100% does not work for the vertical direction. I use now fixed window size.
..but IE cannot find the .mm file? (old MS complaint)

JMol filter works under Firefox AND IE..
In reply to Ger Tielemans

Re: Freemind filter

by Ger Tielemans -
Freemind now also working under IE.
In reply to Markus Knierim

Re: Freemind filter

by chan leslie -
Could anyone kindly telling me how to download the freemind filter, please!!!thx!!!
In reply to chan leslie

download the Freemind filter

by Mirko Kämpf -
Hi,

I could not find any information about a link for downloading the freemind-filter in this thread.

Please tell me, how to download the filter. Thank you very much.

Mirko

In reply to Markus Knierim

Re: Freemind filter

by Roger Emery -

Hi,

I've changed the code as suggested and enabled the filter and still am not getting the applet to show up.
Other filters work fine so I'm not sure what to do next.

any suggestions anyone?

Roger

In reply to Roger Emery

Re: Freemind filter

by Randall Kindley -
Where can one find the filter?
In reply to Randall Kindley

Re: Freemind filter

by Tim Allen -
Can someone attach the Freemind filter here?  I'd love to have a look at it but there are no attachments in this thread.

TIA,
Tim.
In reply to Janko Harej

Re: Freemind filter

by Miles Berry -
This sounds very cool, and I'm interested in the notion of using Freemind mindmaps to provide an alternative navigation around Moodle sites.
I wonder if it might be possible to adapt the filter to use the flash browser for freemind maps, which might get round some of the issues that seem to be associated with Java here?
The flash browsers described here, and here's an example for Using Moodle.
This an attempt to embed it using the flash filter, but it doesn't seem to work!


In reply to Miles Berry

Re: Freemind filter

by Ger Tielemans -
strange, your map works fine with the filter, In Firefox the html-page with tye nice embedded flash also works ok, but in IE loading never stops, if I push refresh the map opens, but never with the fonts..
In reply to Ger Tielemans

Re: Freemind filter

by Miles Berry -
Interesting; I hadn't tested it in IE (not much point these days wink). It seems to be a difference between the way <object> and <embed> are handled, I think. I've played around with my blog copy, but the one I gave the address for above uses the bundled javascript to load the flash. As you'll have gathered Flash has been something of a mystery to me, but I tend to prefer it to java as it seems more commonly installed on my pupils' home computers, and the load times are significantly quicker, which would be important for a navigation system I think.

In reply to Miles Berry

Re: Freemind filter

by Julian Ridden -
Have you had any more luck with this? I too would love to see the flash integration happening. Tried rewriting the filter myself, but like you can only get the flash file going and the freemindmap itself refuses to show.
In reply to Julian Ridden

Re: Freemind filter

by Miles Berry -
Hi Julian,
Thanks for looking into it. I've not got round to playing with filter yet. By the sound of it, the issue is about passing the parameters to tell it which map to load - there's a javascript loader which comes with the download package, or it's possible to pass the starting map parameter as part of a <param> or <embed> tag. The latter seems to be a more reliable method, from my limited testing:
<embed src="http://stiveshaslemere.com/mgb/UsingMoodle/visorFreemind.swf" width="450" height="450"  FlashVars="initLoadFile=http://stiveshaslemere.com/mgb/UsingMoodle/index.mm">

In reply to Miles Berry

Re: Freemind filter

by Antônio Cordeiro -
Dear Mr. Berry,

I´d like to implement freemind flash browser in my Multimedia Pedagogical Practice final project course. Have you had success in adapt the filter to use the flash browser for freemind maps? Is there any tutorial about this module?

Abs,
Antônio Cordeiro

In reply to Julian Ridden

Freemind Flash Browser

by Antônio Cordeiro -
Dear Julian,

Have you had success in flash integration with Free Mind Flash Browser? I´ve tried this during two months for my final project.

Thank You
Antônio Cordeiro.
In reply to Antônio Cordeiro

Re: Freemind Flash Browser

by Peter Pang -
Dear Antonio,

I have made a flash version of filer.php. I just modified the code a bit and it works so far. Take a look.

------------
function freemind_filter($courseid, $text) {
global $CFG;
// 1 2 4 4
// pre basename inner post
$pattern = '(.+)<a .*href=\"(.+)\.mm.*>(.*)</a>(.*)';

$match = ereg($pattern,$text,$regs);

if($match){
$pre = $regs[1];
$basename = $regs[2];
$discarded = $regs[3];
$post = $regs[4];
// print "<br/>in freemind_filter, matching text = <![CDATA[" . $text . "]]>";
// print "<br/>in freemind_filter, pre = " . $pre;
// print "<br/>in freemind_filter, basename = " . $basename;
// print "<br/>in freemind_filter, discarded = " . $discarded;
// print "<br/>in freemind_filter, post = " . $post;
//
$width = '100%';
$height = '100%';
//
// See if a width parameter has been specified
//
$pattern = 'width=([0-9]+)';
$match = ereg($pattern,$text,$regs);

if($match){
$width=$regs[1];
// print "<br/>width = " . $width;
}
//
// See if a height parameter has been specified
//
$pattern = 'height=([0-9]+)';
$match = ereg($pattern,$text,$regs);

if($match){
$height=$regs[1];
// print "<br/>height = " . $height;
}

$text = $pre.'<object type="application/x-shockwave-flash"data="'. $CFG->wwwroot . '/filter/freemind/visorFreemind.swf" width="XXXXXX" height="YYYYYY">';
$text .='<param name="movie" value="'. $CFG->wwwroot . 'filter/freemind/visorFreemind.swf" />';
$text .='<param name="quality" value="high" />';
$text .='<param name="flashvars" value="initLoadFile='.'ZZZZZZ.mm&amp;openUrl=_blank&amp;startCollapsedToLevel=3&amp;maxNodeWidth=200&amp;mainNodeShape=elipse&amp;justMap=false&amp;defaultToolTipWordWrap=200&amp;offsetX=left&amp;offsetY=top&amp;buttonsPos=top&amp;min_alpha_buttons=20&amp;max_alpha_buttons=100&amp;scaleTooltips=false&amp;bgcolor=0xF8FBFC" />';
$text .='</object>'. $post;
//
// Finally, make all replacements
//
$search = array();
$search[0] = "/XXXXXX/";
$search[1] = "/YYYYYY/";
$search[2] = "/ZZZZZZ/";

$replace = array();
$replace[0] = $width;
$replace[1] = $height;
$replace[2] = $basename;

$text = preg_replace($search, $replace, $text);
}
return $text;
}
--------
In reply to Janko Harej

Free Mindmapping Flash Movie

by Art Lader -
This little Flash tool is obviously not nearly as robust or useful as Freemind or Cmap, but it is free, simple, and it just works - http://dmc.umn.edu/activities/mindmap/

Play with it. You may decide to download it and put it on your server.

Thank you to the U of M Digital Media Center for this cool resource.

Now, how might Ulrike and I use this in our upcoming exchange? Hmmmm....

-- Art
In reply to Janko Harej

Re: Freemind filter

by Mark Tyers -
Hi Janko.
Have you had any luck getting this to work?

Would love to give it a try - could you send me a download link please?

Cheers

Mark