A year ago I wrote the CPAN module CGI::ContactForm that generates web
contact forms. I'm now thinking of making a sub module available that
would make it easy to customize a MHonArc archive so that its message
authors can be emailed via a contact form.
This is the current status of CGI::ContactForm::MHonArc:
ftp://ftp.gunnar.cc/pub/gunnar/mhonarc/MHonArc.pm.txt
Assuming that CGI::ContactForm, including the new sub module, is
installed, this is the approach:
- Via the resource file, a form button is added to the messages that
submits (method GET) the message ID and archive path to a CGI script:
ftp://ftp.gunnar.cc/pub/gunnar/mhonarc/contact.pl.txt
(Instead of submitting the archive path, optionally the full path to
the database file can be passed as an argument when calling the
getmsgvalues() function.)
- The sub module grabs the fromname, fromaddress and subject from
.mhonarc.db, and those values are passed to CGI::ContactForm when its
main function is called.
- The values are preserved through the session via a cookie.
Well, that's about it. A simple change of the resource file and
configuration of contact.pl, and you can then email any message author
via the generated form. You can study the result in my demo archive:
http://www.gunnar.cc/mhonarc/demo/maillist.html
I would of course appreciate your feedback. Would it be a suitable
customization option for MHonArc archives? Weaknesses in the code?
Anything else that I missed? Does the approach work for mharc managed
archives, or would that require mods?
Looking forward to your comments. :)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV