forked from librewiki/MW_Skins
/
freemind.php
executable file
·51 lines (45 loc) · 1.46 KB
/
freemind.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// Copyright 2004 Won-Kyu Park <wkpark at kldp.org>
// All rights reserved. Distributable under GPL see COPYING
// a freemind macro/action plugin for the MoniWiki
//
// $Id: freemind.php,v 1.1 2004/12/01 08:23:37 wkpark Exp $
function macro_FreeMind($formatter,$value) {
global $DBInfo;
$_dir=$DBInfo->upload_dir.'/FreeMind';
$pubpath = $formatter->url_prefix.'/applets/FreeMind';
$puburl = qualifiedUrl($formatter->url_prefix.'/'.$_dir);
return <<<APP
<applet code="freemind.main.FreeMindApplet.class" codebase="$pubpath"
archive="freemindbrowser.jar" width="100%" height="100%">
<param name="type" value="application/x-java-applet;version=1.4">
<param name="scriptable" value="false">
<param name="modes" value="freemind.modes.browsemode.BrowseMode">
<param name="browsemode_initial_map"
value="$puburl/$value.mm">
<!-- ^ Put the path to your map here -->
<param name="initial_mode" value="Browse">
</applet>
APP;
}
function do_freemind($formatter,$options) {
#$formatter->send_header('',$options);
print <<<HEAD
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<!-- This launcher works fine with Explorer (with Javascript or without) as
well as with Mozilla on Windows -->
<head>
<title>Free Mind for MoniWiki</title>
<style>
body {margin:0px;}
</style>
</head>
<body>
HEAD;
print macro_FreeMind($formatter,$options['value']);
print "</body></html>";
return;
}
// vim:et:sts=4:sw=4:et:
?>