Difference between revisions of "TNG captcha"

From Genwiki

Jump to: navigation, search
(TNG Modifications)
(TNG Modifications)
Line 59: Line 59:
 
# copy all the ".ht****" files and the freecap.php file to the new "freecap" folder
 
# copy all the ".ht****" files and the freecap.php file to the new "freecap" folder
 
#* ensure they are all readable
 
#* ensure they are all readable
#* MAC uses - please note that the .ht*** files are reported to be hidden files and may not be visible.  The program "Trnasfer" has been recommended to assist with this.
+
#* MAC users - please note that the .ht*** files are reported to be hidden files and may not be visible.  The program "Trnasfer" has been recommended to assist with this.
 
# copy the newacctform.php and/or the suggest.php file to your base TNG folder.  This should replace an existing TNG file of the same name
 
# copy the newacctform.php and/or the suggest.php file to your base TNG folder.  This should replace an existing TNG file of the same name
 
# check it out
 
# check it out

Revision as of 22:19, 24 July 2006

If you are not comfortable with html and php editing, this page may not be for you


Overview

This TNG modification provides a CAPTCHA for the TNG "New User Registration" form and/or the TNG "Suggest" form. It will provide a user challenge screen before the form will be made available.

This implementation is based upon PureMango's code version 1.41. Check the link for a demo of how it works. The original package from PureMango contains an additional php wrapper file that provides the demo example.

This was a fairly quick implementation. There may be a more elegant way to integrate the PureMango code in such a way that it is much more modular. I leave that as an exercise for the ambitious. If someone has already integrated the PureMango captcha with TNG, drop me a note.


Revision 1.0 July 23, 2006 - No functional difference, the code is a little nicer looking, a note added for the visually disabled.
Revision 2.0 July 23, 2006 - Added the captcha for the TNG suggest.php file.
Revision 2.1 July 23, 2006 - minor text change to the suggest page comment requesting email assistance.
- removed the 'Hidden' attribute from the original distribution files to make handling a little easier (especially in the MAC world)
Revision 2.2 July 23, 2006 - added a version of the account login form with French and Spanish translation examples


Requirements

  1. A working TNG installation - see The Next Generation of Genealogy Sitebuilding
  2. A backup of your TNG newacctform.php and suggest.php files


Side Effects

  1. As with any modification to a TNG file, this modification will get lost during your next TNG version update and you will need to re-implement the mod.
    • Since I am using this mod, and stay current with TNG, I would expect that updated mods would be available quickly. Of course that's not much of a guarantee coming from a volunteer.
  2. The default version does not support alternate languages, it has been implemented as a single Language only. The default file is English. A French and Spanish translation file has been provided courtesy of Francis Amar. (Francis may be contacted via the TNG user list).


TNG Modifications

The following zip file contains the necessary files to allow the addition of this feature.

  • The zip file TNG_captcha_Rev_2.2.zip contains:
    • the "freecap" fonts, backgrounds, dictionary, and freecap.php file
    • newacctform.php - a modified TNG 5.1.4 file
    • suggest.php - a modified TNG 5.1.4 file
    • newacctform_french_spanish.php - a modified TNG 5.1.4 file


  • IF you are running v 5.1.4 then

If you have previously modified your TNG newacctform.php or suggest.php file, do not continue. You WILL lose any changes to that file you have previously made.

  1. backup your existing TNG v5.1.4 newacctform.php and suggest.php file
  2. download this zip (TNG_captcha_Rev_2.2.zip)
  3. unzip it, examine the contents
  4. create a "freecap" folder in the main TNG directory
    • make sure it is readable and executable by all
  5. copy all the ".ht****" files and the freecap.php file to the new "freecap" folder
    • ensure they are all readable
    • MAC users - please note that the .ht*** files are reported to be hidden files and may not be visible. The program "Trnasfer" has been recommended to assist with this.
  6. copy the newacctform.php and/or the suggest.php file to your base TNG folder. This should replace an existing TNG file of the same name
  7. check it out


  • IF you are NOT running v5.1.4 or you HAVE made changes to newacctform.php then, you are on your own. The file is completely different from the TNG 5.1.4 version. The modifications are significant. If you are not completely comfortable doing this sort of update, then try upgrading to TNG v5.1.4 first.


  • In the event of a problem with your TNG site
  1. copy your backup newacctform.php and/or suggest.php to your base TNG directory
    • all should be well now
  2. you may also delete the "freecap" folder and files

Alternate Language - French/Spanish

At this time, the account request form has been coded in a single language. By default, the newacctform.php file has been provided in English. If you wish to convert this to either French or Spanish:

  1. extract the newacctform_french_spanish.php from the zip file
  2. edit this file and remove the languages that you do not want. (Most of the text is near the bottom of the file)
  3. rename the file to newacctform.php
  4. copy the edited newacctform.php to your base TNG directory


Support

  1. You're sort of on your own... If you have a specific question, or feel some additional info in the above would help others, feel free to contact me directly. Mail me here
    • Please post suggestions, or your own flavour of this mod to the forum or list


Acknowledgements

A big thanks goes out to all those TNG users in the TNGuser list that contributed to the discussion regarding the use of a Captcha in TNG.

  • A special thanks goes out to Francis Amar who provided the FrAcknowledgmentsench and Spanish translations.