Solprovider Lenya Kongregate Registration for Free Flash Games and Chat with solprovider

Contact Us Module

WARNING
This version has not been tested very well. I am currently in middle of many projects. One of them (codenamed Lenya1.3) means my development version of Lenya is not close to anything currently publicly available, so testing requires additional work for which I do not have time. Sorry.


These instructions are for implementing a "Contact Us" Form in Lenya 1.2 and Lenya 1.3. Visitors receive a web form, and upon submittal, the information is both saved as a file and emailed.

If using Lenya 1.4, check the User Mailing List for ideas about implementing this fnctionality, and see Lenya 1.4 Usecase Framework. Some of this code may be useful, but the method for calling it is very different, and there are supposedly easier methods for the implementation.

1. Download and unzip the module. The files should be placed in:
{pub}/modules/contact

2. Add the Resources from Cocoon's Forms Block to Lenya. The easiest method is to place it within your publication. Copy all the files and subdirectories from:
  cocoon-2.1.6-src/cocoon-2.1.6/src/blocks/forms/samples/resources
to:
  {pub}/resources/forms
Make certain the path in module.xmap correctly points to "forms-samples-styling.xsl".

3. (Lenya 1.2) Move "usecase-contact.xmap" to the {pub} directory.

4. Edit {pub}/modules/contact/code.js
There are 6 variables near the top:
fromAddress = Fake FROM address for emails
toAddress = Receives email version
smtpIPAddress = SMTP server address
subject = Subject of sent memos

savePrefix and saveSuffix are used for file creation. Relative directories default to the lenya program directory, such as "C:\apache-lenya-1.2.2". The datetime string is placed between the prefix and suffix.

5. Test (and finish integration)
Lenya 1.2:
Add "?lenya.usecase=contact" to any URL in the publication.

Lenya 1.3
http://server/pub/contact/
(The final slash is required for this module so the form submittal works.)

6. (Lenya 1.2) Change "template.xml" so the submittal is returned to the Contact Us Module.
CHANGE:
<ft:form-template action="#{$continuation/id}.more" method="POST">
TO:
<ft:form-template action="#{$continuation/id}.more?lenya.usecase=contact" method="POST">

<< EmailCMS GUI >>

Contact Solprovider
Paul Ercolino