markpasc.org

LessTalk diagram applet: Code

Code

blo.gs RSS ping
Enqueue Next
Hello Wiki
Jackal
LessTalk diagram applet
org.mancer package
Publish script
rsswriter Roundup detector
SimpleChatServer
SqueakyApplet
Transition applet

LessTalk diagram applet by Mark Paschal <markpasc@mindspring.com>

Download (zip)

LessTalk allows web site visitors to view and edit simple geometric diagrams in a Wiki-like fashion. It was designed primarily for use with Hello Wiki as a plug-in resource. Its features include:

Its missing and anti-features include:

The applet is given just the loading param like so:

<param name="loadFrom" value="lt/filename.xml">

In edit mode, the applet submits XMLesque LessTalk documents to the accompanying lt.pl script via HTTP POST. The lt.pl script has no security whatsoever--anyone could POST anything to it and have it saved on the server as whatever, in the directory for the XML data.

<param name="loadFrom" value="lt/filename.xml">
<param name="saveTo" value="lt.pl?lt/filename.xml">

Since the applet requires versions of Java not usually found in common browsers, the applet can also send a uuencoded PNG file representing the diagram to the lt.pl script. The lt.pl script can uudecode these (with the Convert::UU module from CPAN installed somewhere, anyway) into the directory where the XML data is.

<param name="loadFrom" value="lt/filename.xml">
<param name="saveTo" value="lt.pl?lt/filename.xml">
<param name="saveImage" value="lt.pl?lt/filename.png">

The LessTalk diagram applet includes the com.ice.convert.UUEncoder class available at Giant Java Tree and Copyright 1997 by Matthew Hixson and Mark Spadoni; the com.keypoint.PngEncoder class by J. David Eisenberg available under the GNU Lesser GPL; and unmodified portions of com.microstar.xml, the free Ælfred XML library. As I understand the given licenses, my redistribution is in compliance; if it is not, please email me at markpasc@mindspring.com.