Projects - Programming - Wiki - Contact Page

I wanted to have a contact page that would allow someone to contact the author or some other responsible person, so I created this contact page. I used the usermanager plugin and the discussion plugin as help in creating this.

Download the plugin here: Contact Form Plugin

Installation instructions:

  1. To install, go to the admin/manage plugins page in your wiki. Enter this url in for the contact plugin: http://bobbaddeley.com/lib/exe/fetch.php/projects/programming/wiki/contact.zip. Then go to the admin/configuration settings page and modify the “plugin contact default” and “plugin contact profileX” entries to have the email addresses you want to send to.
  2. To use the plugin, on any page just enter the code:
    {{contact>}}

    This will create a form with a “name”,”from address”, “subject”, and “comment” field. It will send an email to whatever the default value is. You can also specify the ‘to’ or ‘subj’ parameters:

    {{contact>to=profile1}}

    or

    {{contact>subj=Feedback from Site}}

    or join them with a | character:

    {{contact>to=profile1|subj=Feedback from Site}}

    When the subject is specified in the parameters, it is not a field on the contact form. The plugin will only send email to one destination.

It’s that easy!

In action:

Your Name :
Your Email :
Subject :
Message :
Enter 'HUMAN' :

How it works:

Basically, it uses the same mail function that the rest of the wiki uses, so it requires no extra server configuration (although you do have to edit your configuration settings to specify at least a default to address). When the form is submitted, it will post back to the same page, but set a variable so it knows to send an email. It will send an email TO the address specified and FROM that same address (so that it doesn’t fail if the user enters a strange email address). I have taken some steps to make sure that it isn’t vulnerable to some of the more common attacks, so it shouldn’t be possible to use maliciously.

 
Copyright 2007, Bob Baddeley