public
Fork of jcrisp/mephisto_contact_form
Description: Plugin for Mephisto which provides a customisable contact us / feedback form. Forked and changed to work better in a multiside installation
Homepage: http://www.inormalized.com/2009/2/23/mephisto-contact-form-plugin
Clone URL: git://github.com/idonas/mephisto_contact_form.git
name age message
file LICENSE Sun Dec 21 21:07:00 -0800 2008 Moved plugin to repository root [James Crisp]
file README Loading commit data...
file Rakefile Sun Dec 21 21:07:00 -0800 2008 Moved plugin to repository root [James Crisp]
directory app/
file init.rb Sun Dec 21 21:07:00 -0800 2008 Moved plugin to repository root [James Crisp]
directory lib/ Sun Dec 21 21:07:00 -0800 2008 Moved plugin to repository root [James Crisp]
file routes.rb
directory test/ Sun Dec 21 21:07:00 -0800 2008 Moved plugin to repository root [James Crisp]
README
This is my fork of James Crips's mephisto contact form plugin (http://github.com/jcrisp/mephisto_contact_form)

My changes are pretty minor. They are majorly oriented towards using this plugin 
in a multisite installation.

Works with emk/mephisto edge (http://github.com/emk/mephisto/), on Rails 2.2.2

Differentiations from James's version
- does not add a default route for 'get'ing the contact_form. That means a bit of manual 
work for you (step 2 below), however it prevents breaking routes in multisite installations (and particularly 
for those sites you dont create a contact form for). Plus it allows you to choose a custom url for the contact 
form to be accessed
- sends the contact form's data to the first admin of the current site. That means you no 
longer have to write a receiver email anywhere. 
- utilizes mephisto's email validity checking (Format::EMAIL) 
- hescapes user input in the generated email
- subject of the email is prefixed with the title of the current site 


TODO's

- [PERHAPS] in order to fully go multisite, the "thank you" msg could be transferred in a 
separate template and or be site specific. That also could be considered for the  required fields



MephistoContactForm 
===================
Contact / Feedback form plugin for Mephisto
Required setup: emk/mephisto edge (0.8.2 or later) (http://github.com/emk/mephisto/), Rails 2.2.2

Installation
------------
1. Install plug-in into:
  {MEPHISTO_ROOT}\vendor\plugins\mephisto_contact_form

2. Create a new template called 'contact_us.liquid' through the admin web interface on each 
site you intend to use it. Create a section (its name and path are up to you) and choose 
under "Section Template" the template you just created.

Paste in the following code:

<H1>Contact Us</H1>  
{% contactform %}
  <p>{{ form.name }}<label for="author"><small>Your name</small></label></p>
  <p>{{ form.email }}<label for="email"><small>Email address</small></label></p>
  <p>{{ form.phone}}<label for="phone"><small>Phone number (optional)</small></label></p>
  <p>{{ form.subject}}<label for="subject"><small>Subject</small></label></p>
  <p>{{ form.body }}</p>
  <p>{{ form.submit }}</p>
{% endcontactform %}

Feel free to modify labels, layout etc.


3. configure the mail delivery method of your server inside /config/environment.rb
e.g. config.action_mailer.delivery_method = :sendmail  

4. restart mephisto!



Other Details
-------------

Author::        Spyros Vasileiadis  (spyros@coderado.com)


Based on the original work of James Crisp

Original Author:: James Crips (james.crisps@thoughtworks.com
Further info::  http://jamescrisp.org/2007/03/19/contact-feedback-form-plugin-for-mephisto/
Copyright::     Copyright (c) 2007 ThoughtWorks
License::       Apache Version 2.0 (see http://www.apache.org/licenses/)