User Tools

Site Tools


upgrade_to_form-to-email_pro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

upgrade_to_form-to-email_pro [2013/05/03 06:23]
admin [2. Edit the Pro version form-to-email.php file]
upgrade_to_form-to-email_pro [2013/05/03 07:07] (current)
admin
Line 1: Line 1:
 ====== Upgrade to Form-to-Email Pro ====== ====== Upgrade to Form-to-Email Pro ======
- 
-TTG galleries including mail functionality – the Contact page in TTG CE3 Pages, and feedback submission in TTG CE3 Client Response Gallery – utilize the free PHP mail script from http://formtoemail.com/. The Form-to-Email script is powerful, secure and well-supported, hence our decision to include it in the CE3 framework. 
- 
-The Form-to-Email script is available in two versions. The free version included in TTG web engines is the lesser of the two, but adequate for most needs. For $29, a Pro version is available with many additional features. For information and a list of features specific to Form-to-Email Pro, please visit http://formtoemail.com/formtoemail_pro_version.php. 
- 
-Should you wish to upgrade your web engines – TTG CE3 Pages and TTG CE3 Client Response Gallery – to use Form-to-Email Pro, these are the steps you should take: 
- 
-==== 1. Rename the Pro version file. ==== 
- 
-In CE3 web engines, the file name for the Form-to-Email script should be ''%%form-to-email.php%%''. Renaming the Pro version file ensures that we need not take on the larger task of editing the source code of our galleries. 
- 
-==== 2. Edit the Pro version form-to-email.php file ==== 
- 
-CE3 engines allow several important parameters to be set from within Lightroom, as well as using our custom "Thank You" page to follow up on contact form submission. To keep these features in the Pro version script, you will need to make some minor changes to the script. It's really easy, so don't stress. 
- 
-The top of the Form-to-Email Pro script looks like this: 
- 
-<code> 
-<?php 
- 
-error_reporting(E_ALL ^ E_NOTICE); 
- 
-/* 
- 
-Thank you for purchasing FormToEmail-Pro by FormToEmail.com 
-</code> 
- 
-Add the code shown on line 3 below; you can copy-and-paste from this page: 
- 
-<code> 
-<?php 
- 
-include "./resources/php/set-email.php"; 
- 
-error_reporting(E_ALL ^ E_NOTICE); 
- 
-/* 
- 
-Thank you for purchasing FormToEmail-Pro by FormToEmail.com 
-</code> 
- 
----- 
- 
-Next, locate and “comment out” the following lines of code by fronting them with ''%%//%%'': 
- 
-<code>$my_email = "delete these words and put the email address only in here between the quotes";</code> 
- 
-<code>$from_email = "";</code> 
- 
-<code>$continue = "/";</code> 
- 
-These lines should become: 
- 
-<code>//$my_email = "delete these words and put the email address only in here between the quotes";</code> 
- 
-<code>//$from_email = "";</code> 
- 
-<code>//$continue = "/";</code> 
- 
-Note, the only change we have made is to insert ''%%//%%'' before each line. 
- 
----- 
- 
-Now, locate this line: 
- 
-<code> 
-$auto_redirect = 0; 
-</code> 
- 
-And change to: 
- 
-<code> 
-$auto_redirect = 1; 
-</code> 
- 
----- 
- 
-Next setting below that, find: 
- 
-<code> 
-$redirect_url = ""; 
-</code> 
- 
-And change to: 
- 
-<code> 
-$redirect_url = "thankyou.php"; 
-</code> 
- 
----- 
- 
-Save the file. 
- 
-==== 3. Customize your Form-to-Email Setup ==== 
- 
-The above changes complete, run through the Form-to-Email Pro script and configure whatever options you'd like to use. Options are all documented within the script, so it's pretty easy to enable the Pro version features you've paid for. 
- 
-==== 4. Keep a backup ==== 
- 
-Once you've completed the above modifications and configured your Pro-version features, you should backup the script in a safe place. Anytime you download an update for either TTG CE3 Pages or TTG CE3 Client Response Gallery, you will want to update the new engine version with your Form-to-Email Pro script (see step 5 below), so keep it safe and keep it handy. 
- 
-==== 5. Copy your modified form-to-email.php file into the web engine ==== 
- 
-You will need to open the .lrwebengine package installed to your Web Galleries folder. On Windows, you should be able to double-click the .lrwebengine package to open it as a folder; on Mac, CTRL-click the .lrwebengine package and select “Show Package Contents” from the menu. 
- 
-You will find the Form-to-Email script at: 
- 
-''%%/lib/php/form-to-email.php%%'' 
- 
-Replace the existing version of the script with your modified Pro version. The Pro version file name should be the same as the existing version, so you will get an overwrite notification; overwrite the existing file. 
- 
-==== 6. Test it ==== 
- 
-Very, very important: test your script before deploying your changes in a production environment. Run a test gallery, attempt to use the form and verify that all is in working order before you put it out there for clients to use. 
- 
-===== Troubleshooting ===== 
- 
-After upgrading to Form-to-Email Pro, you may receive this error when submitting the contact form: 
- 
-**You have entered an invalid string (%%http://%%) in the "Gallery-URL" field** 
- 
-If so, there are two possible fixes. 
- 
-==== #1 Fix: Unblock 'http://' and maybe 'https://' ==== 
- 
-This fix is easiest, but maybe not the best depending on your situation. Locate this option: 
- 
-<code> 
-$blocked_words = array('http://','https://','viagra'); 
-</code> 
- 
-Remove ''%%'http://',%%'' from the array, so that you're left with this: 
- 
-<code> 
-$blocked_words = array('https://','viagra'); 
-</code> 
- 
-You may or may not also wish to remove ''%%'https://',%%'' from the array. 
- 
-Having these blocked prevents users from submitting the form if any field contains a web address. If you are providing your users a "Website" field into which they will be expected to provide a web address, then you will want to unblock these items anyway. 
- 
-However, this may also make your contact form more vulnerable to spam. So you will need to decide how to handle this situation, and whether to allow web addresses in your form or not. 
- 
-==== #2 Fix: Exempt the Gallery-URL field ==== 
- 
-The more secure method would be to leave the ''%%http://%%'' block in place, but to exempt the hidden **%%Gallery-URL%%** field that we use to determine where our message is being sent from. To to this, locate this block of code: 
- 
-<code> 
-global $set; 
-global $blocked_words; 
-global $return_value; 
-global $return_key; 
- 
-if(!is_array($element_value)) 
-{ 
- 
-foreach($blocked_words as $value){if(stristr($element_value,$value)){$set = 1; $return_value = $value; $return_key = $inkey; break;}} 
-</code> 
- 
-In the above block, change the line: 
- 
-<code> 
-if(!is_array($element_value)) 
-</code> 
- 
-to: 
- 
-<code> 
-if(!is_array($element_value || 'Gallery_URL')) 
-</code> 
- 
----- 
- 
-====== CRG v5.0.3 - Upgrade to Form-to-Email Pro ====== 
  
 TTG galleries including mail functionality – the Contact page in TTG CE3 Pages, and feedback submission in TTG CE3 Client Response Gallery – utilize the free PHP mail script from http://formtoemail.com/. The Form-to-Email script is powerful, secure and well-supported, hence our decision to include it in the CE3 framework. TTG galleries including mail functionality – the Contact page in TTG CE3 Pages, and feedback submission in TTG CE3 Client Response Gallery – utilize the free PHP mail script from http://formtoemail.com/. The Form-to-Email script is powerful, secure and well-supported, hence our decision to include it in the CE3 framework.
upgrade_to_form-to-email_pro.txt · Last modified: 2013/05/03 07:07 by admin