Authentic Photoblog Flavour

Contact Form v2.01 featured

Download (23.8 KB)

Developer Description

This addon is created for users who wish visitors to be able to contact you through e-mail without exposing their e-mail address on the web. This is just a simple form and e-mail system to cover that need. It uses Jack Born's jquery ajax token solution to protect you from spam without the use of a CAPTCHA field.
It includes a template file for the contact form, the main jquery library (http://jquery.com), a js file for the contact form and the addon script.

The subject and destination e-mail address can be entered on the addons page of the admin.

This addon enables the following tags:
<CONTACT_FORM_HEAD_JAVASCRIPT> This is a required tag that should be put in the contact form template between the <head></head> tags.
<CONTACT_FORM_SUBMIT_BUTTON> This is a required tag that should be put in the form so the form can disable the submit button after sending the e-mail.
<CONTACT_FORM_LINK> This tag shows a link to a contact form.
<CONTACT_FORM_URL> This tag shows the url to the contact form. You can use this if you want to customize the link. Example: <a href="<CONTACT_FORM_URL>" title="My contact form">custom text<a>
<CONTACT_FORM_MESSAGES> This tag shows any diagnostic messages that might come up when submitting the form as well as reporting success or failure of sending the e-mail.
<CONTACT_FORM_NAME> Contains the value of the name field of the form on submit. Usefull if form was not validated.
<CONTACT_FORM_EMAIL> Contains the value of the e-mail field of the form on submit. Usefull if form was not validated.
<CONTACT_FORM_MESSAGE> Contains the value of the message field of the form on submit. Usefull if form was not validated.
For usage of these fields see the included simple template file /templates/simple/contact_form_template.html

Changelog for version 2.0:
- Built in token check to check for spambots, without a nasty CAPTCHA. Downside is that cookies and javascript have to be enabled in the client browser.
- Disable send button if e-mail is sent.
- Added new tags.
- Added a current version check.
- Changed the layout of the contact form template to something more sensible.
- Code cleanup, make things more logical.
- Built in a check on success or failure of mail function.

Changelog for version 2.01:
- Corrected an error within the html of the template file which caused the "too much time elapsed" message to apear for no reason.

To install:

  • Put the addon file (/addons/contact_form.php) in the addons directory of your pixelpost installation (/addons).
  • Put the jquery-1.2.6.pack.js and contact_form.js files into your templates scripts directory (/templates/your_template_folder/scripts). Note that you should edit the scripts directory at the 'User configuration' (line number 78) of the addon file (contact_form.php) if your template uses a different directory for javascripts than the standard 'scripts' directory.
  • Put the token.php file in the root of your pixelpost installation (/).
  • Use the supplied template file as an example how to integrate the tags made available in this addon to your own template file (/templates/simple/contact_form_template.html). Or just use the supplied file if you use the simple template.

Older Versions

Read All 13 Reviews » Write A Review

  1. Average 3
    Unknown 10 Years Ago Report as Spam

    I had a similar problem to nonuniform, under 1.7.1 I could only get this to work by commenting out the spambot and elapsed time sections of the code.

    @nonuniform: the likely reason for your template change is you've simply used the supplied contact_form_template.html file, which is styled to the default template. Copy the contact form table and tags from in there and into your own template file and you should be OK.

  2. Average 3
    Unknown 10 Years Ago Report as Spam

    decent addon. does what's is supposed to. but, it'd be nice to have some more options in the admin section maybe on adding customs field like "subject" or some dropdown menus.

  3. Mediocre 2
    Unknown 10 Years Ago Report as Spam

    So, I got this to work after commenting out the spambot stuff.

    Now, when the email is sent, the page is refreshed and switches my site to the simple template!

    What is going on here? I can't figure out how this is occurring, but I can see that in the

    the site is now using the simple template files.