[Moin-user] Trying to write a "quick comment" macro

Tim Bird tbird20d at yahoo.com
Thu Jul 1 14:10:10 EDT 2004

--- Paul Moore <pf_moore at yahoo.co.uk> wrote:
> I'm trying to write a macro which allows users to insert a "quick
> comment" on a 
> page. Basically, the macro puts a textarea on the page, into which
> the user 
> types, and a "Submit" button, which appends the contents of the
> textarea to the 
> page content.
> Displaying the form is easy - I got that working in a few minutes.
> But I'm at a 
> loss as to where to look for hints on how to code a form action.
> Can anyone 
> point me at some sample code, documentation, or other hints on how
> I might do 
> this?

The handler for a form is usually done as an action.  This 
requires that your code consist of two parts, the macro
and the action.  At least this is the way I have done things.

Take a look at this action, which does some page
content manipulation, I believe.

BTW - I think this is a great idea for a feature.
I have thought of doing this for a while, and using
some sort of system to distinguish the text coming from
different users. (never got around to it, though :(
This feature would allow MoinMoin to be
used as an ad-hoc instant messaging system, but better
because the messages would then be persistent on the 
wiki page.  We do something similar to this
at Sony during conference calls by doing page edits
and then telling the other side to refresh the page.

Tim Bird 
tim at bird.org

More information about the Moin-user mailing list