|
Overview
This is a Joomla module which implements a simple email form. To install, login as the Joomla administrator, and select "Extensions" - "Install/Uninstall". Browse for the downloaded ZIP file and click "Upload File and Install".
After installation, typical usage would be to configure it to load inside a Joomla article (as is the case here). The way to do this is as follows:
- Go to "Extensions" - "Module Manager" and select the module.
- In the "Details" box, modify "Position" to "user99" (or anything, really)
NOTE: you'll have to type this in manually -- it's not on the list.
 
- In your target article, add this line: "{loadposition user99}"
NOTE: don't put a space between "{" and"loadposition" and also don't put a space between"user99" and "}"!
- If it still doesn't load, go to "Extensions" - "Plugin Manager" and make sure that the "Content - Load Module" plugin is enabled.
Quick Start
Features
- Six configurable fields: you configure the labels and sizes
- "From" field appears automatically (and is mandatory but label and size are configurable)
- "From" field is checked to make sure it's a valid email address (using regex, not a realtime check)
- Fields 1 - 5 can be set to "Active," "Required," or inactive in the module configuration, as needed
- There is also an optional textarea field with configurable rows and columns
- You can configure a recipient of the submitted email form plus optional CC and/or BCC
- Optional "Send Copy to Me" field
- Includes a field to upload a file attachment
- File uploads can be filtered by filename extension
- 4 Language files are included: English, Spanish, Swedish and Dutch
- An optional "Captcha" can be activated
- Uses PEAR library Text_CAPTCHA (included)
- Requires that the GD extension be compiled with your PHP installation
- Uses open source FreeSansBold.ttf font (included)
- You can configure the width and height
- Colors of the text, lines, and background can be configured
- CAPTCHA files older than 5 minutes are deleted
- CAPTCHA can be either an image or text
All configuration is done by module manager: no complicated components to install!
Tips
- Email checking is pretty loose at the moment; debating whether or not to strengthen it (comments?)
- You MUST create the directory where file attachments are stored, and make sure Joomla has rights to write files into this directory. (You could use the Media Manager to do this -- see the next tip.)
- You MUST indicate the absolute path to this directory in the configuration. If you are unsure of the exact path, login as a Joomla admin, and go to the Site - Media Manager menu. Under Files you will see the absolute path to where your images are stored. (You could even create an "uploads" folder here, and use the path specified when configuring the Directory to save attachments parameter.)
- Requires PHP 5 to work!
- Make sure that the Joomla Content - Load Module plugin is enabled
- Make sure simple email form module is assigned to the same menu as the the article which contains the module
- If you plan to use the CAPTCHA:
- You MUST create a directory where the CAPTCHA will be written
- If you are unsure of the exact path, login as a Joomla admin, and go to the Site - Media Manager menu. Under Files you will see the absolute path to where your images are stored. (You could even create a "captcha" folder here, and use the path specified when configuring the Directory to write captchas parameter.)
- Joomla needs read and write rights to this directory
- The directory must be publicly accessible via a URL
I.e. the CAPTCHA directory is /var/www/yoursite.com/images/captcha
the URL would be http://yoursite.com/images/captcha
- 1.0.8+ version creates CAPTCHA files with prefix "captcha_" and erases old images
- Currently, you MUST set the CAPTCHA word length to 8 -- this will change in future releases!
PLEASE don't email me until you've read the documentation on how to make a Joomla module appear inside an article!!!
Here are some references to help you:
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F
http://www.joomlabamboo.com/blog/tutorials/using-the-loadposition-plugin-in-joomla
To Do / User Suggestions
- Ability to control the length of the CAPTCHA word (currently fixed at 8 characters)
- Strengthen email checking, or let admin supply own regex
- Abililty to have the module return to a "thank you" page
- Proper Joomla Language support
Bugs
[2010-05-19 unconfirmed -- made changes which should fix any upload problems]
After I upload file (file is uploaded) in From field is fragment of code:
FIXED in 1.0.5
[2010-07-12 -- from Dean]
I have noticed that your module shows the same captcha in IE/Opera and Firefox when Joomla site cacheing is turned on. However with your module it causes confusion and problems on the submit. The method I am using it is this: I have the module in a spare position called 'contact' and I'm calling it in a content item with {loadposition contact} The form shows up and works in FF. If I open up Opera I see exactly the same captcha. I also see the same in IE. When the form is submitted IE has a wobble and eturns a blank screen, Opera does not like the captcha and tells you so, a page refresh can return the same captcha. I turn off site cacheing and it all works well.
FIXED in 1.0.6
[2010-08-02 -- from Ian]
When CAPTCHA is entered incorrectly, all text below the error message appears in red.
FIXED in 1.0.7
[2010-08-03 -- from Muneca]
error: Warning: rand() expects exactly 2 parameters, 1 given in /hermes/bosweb/web152/b1523/d5.dangerou/public_html/lamunecarocks.com/modules/mod_simpleemailform/mod_simpleemailform.php on line 423
FIXED in 1.0.8
Troubleshooting
If you see this error message:
Error: Unable to cleanup old captchas
Warning: file_put_contents(/company/homepages/9/xyz/htdocs/images/captcha/captcha_12345.png) [function.file-put-contents]: failed to open stream: No such file or directory in /company/homepages/9/xyz/htdocs/FurtherIndications/modules/mod_simpleemailform/mod_simpleemailform.php on line 347
Most likely it is because:
(A) You have not configured a directory in which the program can write the CAPTCHA images, or
(B) You have misspelled the directory name, or
(C) You do not have the permissions set properly so that Joomla can write to this directory
Try the following:
- Look carefully at the directory path which is displayed in the error message. Notice, in the example above, "/company/homepages/9/xyz/htdocs/images/captcha/captcha_12345.png" is the file which could not be written.
- Login as the Joomla Adminstrator
- Select Extensions - Module Manager
- Locate and click on the link for the Simple Email Form module
- Look for "Directory to Write Captchas"
- Make sure that the directory path matches the one you see in the error message
(In this example, it would be "/company/homepages/9/xyz/htdocs/images/captcha")
If the module doesn't appear
(Thanks to Chad for this tip)
(A) Make sure the module is enabled (that one has caught me LOTS of time and I wrote the dang module!).
(B) In the module manager, make sure that "Menu Assignments" is set to ALL (or whatever menu the article appears under).
(C) Go into the article which contains the module and make sure you correctly spelled {loadposition user99}
(or whatever user position you chose to use -- doesn't have to be "user99", it could be "emailform" or any other unique word -- BUT ... see note below).
(D) Make sure that whatever user position you chose matches the user position you specified in the module manager
(E) Go to "Extensions" - "Plugin Manager" and make sure that the "Content - Load Module" plugin is enabled.
(Thanks to Lars for this strange quirk)
If you go through all the suggestions above, and the module STILL does not appear, try changing the to something which starts with "user". Some templates are very particular about this. So, for example, if you used change it to . Also, make sure that you go to Extensions - Module Manager - Simple Email Form, and change the position to match whatever you just used in the article which invokes the fast and easy email form.
(Thanks to Alzibiff for this tip)
If you see a T_STRING required on line 65 error, check and see if your server is runing PHP 4. This module uses Object Oriented Programming and won't work in PHP 4!
Download Module
http://opensource.unlikelysource.com/mod_simpleemailform_1.1.0.zip (NEW!!! latest version)
(New version includes 4 languages: English, Spanish, Swedish and Dutch)
http://opensource.unlikelysource.com/mod_simpleemailform_1.0.8.zip
http://opensource.unlikelysource.com/mod_simpleemailform_1.0.8.se.zip
http://opensource.unlikelysource.com/mod_simpleemailform_1.0.8.es.zip
(Thanks to Lars Dahlberg, Mats Arvendal, and Muneca Osorio)
Demo
Version 1.1.0 -- 1 Sep 2010
- Improved language support using separate INI files
- Language files included: English, Spanish, Swedish and Dutch
- Captcha images are only deleted if more than 5 minutes old
- Added ability to make fields 1 to 5 active, required (mandatory), or not active
- There is a new "Allowed Filenames" field in the module configuration which lets you add a list of filename extensions separated by commas; leave blank for all
- Added a "text" CAPTCHA for those having difficulty getting image CAPTCHAs configured properly
- Added advanced diagnostics which give recommendations for image CAPTCHA settings in case of error
- Added parameters which allow you to change the color of "success" or "failure" message instead of just HTML red or green
- Error messages appear under the fields they are associated with
Version 1.0.8 EN / SE / ES
- Fixed a bug with an improper number of parameters to rand()
- Thanks to Muneca Osorio for the Spanish translation!
Version 1.0.7 EN and SE
- Fixed bug where when CAPTCHA value was entered incorrectly all text after error message appeared in red
- Aligned the "Copy Me" checkbox, and SUBMIT and RESET buttons, with the other input field
- Set CAPTCHA to not cache by randomly generating a new filename for each new CAPTCHA
Version 1.0.6 EN and SE
- Added PEAR5.php library file to fix the following error seen on Windows servers (thanks Edwin!):
Warning: include_once(PEAR5.php) [function.include-once]: failed to open stream: No such file or directory in D:\Hosting\*******\html\joomla\modules\mod_simpleemailform\PEAR.php on line 766
Warning: include_once() [function.include]: Failed opening 'PEAR5.php' for inclusion (include_path='.;C:\php5\pear') in D:\Hosting\*******\html\joomla\modules\mod_simpleemailform\PEAR.php on line 766
Version 1.0.5 EN and SE
- Streamlined file attachment process
- Got rid of "Upload" button -- no need for the extra step!
Version 1.0.4 EN and SE
- Added "Send Copy to Me" field
- Removed slashes in front of ' and " in text area
- Added "Reset" button
- Internal translation fields for buttons (thanks to Mat and Lars!)
Version 1.0.3
- Improved internal language support
- Modified CAPTCHA process
- Adds prefix "captcha_"
- Erases old CAPTCHA files
- Now uses native Joomla JFile::write() instead if "file_put_contents()" to write
Version 1.0.2.se
- Swedish translation of "front-end" strings
- Adjusted date/timezone to "Europe/Stockholm"
- Note: administrative back-end is still in English
- Contributors:
Lars Dahlberg
Mats Arvendal
Version 1.0.2
- Added left, right and center config option for labels (thanks to Mats for this suggestion)
- Version 1.0.2.se is in Swedish (thanks to Lars Dahlberg!).
Version 1.0.1
- Added ability to deactive file upload field
|