idonas / mephisto_contact_form forked from jcrisp/mephisto_contact_form
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
e461439
commit e4614399ce3dc821158951bd1d0d143e0d978465
tree a16c6af91bbf4da66cf0ab54107d8e02b9e821c4
parent 7faf9078ead161e4acf2ee554d977601ddf26e1a
tree a16c6af91bbf4da66cf0ab54107d8e02b9e821c4
parent 7faf9078ead161e4acf2ee554d977601ddf26e1a
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Sun Dec 21 21:07:00 -0800 2008 | |
| |
README | ||
| |
Rakefile | Sun Dec 21 21:07:00 -0800 2008 | |
| |
app/ | ||
| |
init.rb | Sun Dec 21 21:07:00 -0800 2008 | |
| |
lib/ | Sun Dec 21 21:07:00 -0800 2008 | |
| |
routes.rb | ||
| |
test/ | Sun Dec 21 21:07:00 -0800 2008 |
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/)

