Difference between revisions of "TNG captcha"

From Genwiki

Jump to: navigation, search
(Overview)
Line 5: Line 5:
 
==Overview==
 
==Overview==
  
This TNG modification provides a [http://en.wikipedia.org/wiki/Captcha CAPTCHA] for the TNG "New User Registration" form.  It will provide a user challenge screen before the registration form will be made available.
+
This TNG modification provides a [http://en.wikipedia.org/wiki/Captcha 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 [http://www.puremango.co.uk/cm_php_captcha_script_113.php PureMango's code] version 1.41.  Check the link for a [http://www.puremango.co.uk/freecap14/freecap_wrap14.php demo] of how it works.  The original package from PureMango contains an additional php wrapper file that provides the demo example.
 
This implementation is based upon [http://www.puremango.co.uk/cm_php_captcha_script_113.php PureMango's code] version 1.41.  Check the link for a [http://www.puremango.co.uk/freecap14/freecap_wrap14.php demo] of how it works.  The original package from PureMango contains an additional php wrapper file that provides the demo example.
  
This implementation was done in a couple of hours, not knowing much about the TNG newacctform.php file.  I suspect there is a better way to integrate the PureMango code in such a way that it is much more modular.  I leave that as an exercise for the ambious.  If someone has already integrated a captcha with TNG, drop me a note.
+
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 ambious.  If someone has already integrated the PureMango captcha with TNG, drop me a note.
  
  
 
<font color="green">
 
<font color="green">
 
''Revision 1.0 July 23, 2006'' - No functional difference, the code is a little nicer looking, a note added for the visually disabled.<br/>
 
''Revision 1.0 July 23, 2006'' - No functional difference, the code is a little nicer looking, a note added for the visually disabled.<br/>
 +
''Revision 2.0 July 23, 2006'' - Added the captcha for the TNG suggest.php file.<br/>
 +
 
</font>
 
</font>
  
Line 19: Line 21:
  
 
# A working [http://lythgoes.net/genealogy/software.php TNG] installation - see ''[http://lythgoes.net/genealogy/software.php The Next Generation of Genealogy Sitebuilding]''
 
# A working [http://lythgoes.net/genealogy/software.php TNG] installation - see ''[http://lythgoes.net/genealogy/software.php The Next Generation of Genealogy Sitebuilding]''
# A backup of your TNG newacctform.php file
+
# A backup of your TNG newacctform.php and suggest.php files
  
  
Line 32: Line 34:
 
The following zip file contains the necessary files to allow the addition of this feature.
 
The following zip file contains the necessary files to allow the addition of this feature.
  
* The zip file [[Media:TNG_captcha_Rev_1.zip|TNG_captcha_Rev_1.zip]] contains:
+
* The zip file [[Media:TNG_captcha_Rev_2.zip|TNG_captcha_Rev_2.zip]] contains:
 
** the "freecap" fonts, backgrounds, dictionary, and freecap.php file
 
** the "freecap" fonts, backgrounds, dictionary, and freecap.php file
 
** newacctform.php - <font color="red">a modified TNG 5.1.4 file</font>  
 
** newacctform.php - <font color="red">a modified TNG 5.1.4 file</font>  
 
+
** suggest.php - <font color="red">a modified TNG 5.1.4 file</font>
  
 
* '''IF you are running v 5.1.4 then'''  
 
* '''IF you are running v 5.1.4 then'''  
  
''If you have previously modified your TNG newacctform.php file, do not continue. You WILL lose any changes to that file you have previously made.''
+
''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.''
  
# backup your existing TNG v5.1.4 newacctform.php file
+
# backup your existing TNG v5.1.4 newacctform.php and suggest.php file
# download this zip ([[Media:TNG_captcha_Rev_1.zip|TNG_captcha_Rev_1.zip]])
+
# download this zip ([[Media:TNG_captcha_Rev_2.zip|TNG_captcha_Rev_2.zip]])
 
# unzip it, examine the contents
 
# unzip it, examine the contents
 
# create a "freecap" folder in the main TNG directory
 
# create a "freecap" folder in the main TNG directory
Line 49: Line 51:
 
#* ensure they are all readable
 
#* ensure they are all readable
 
#* the freecap.php should be executable
 
#* the freecap.php should be executable
# copy the newacctform.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
  
Line 59: Line 61:
 
* '''In the event of a problem with your TNG site'''
 
* '''In the event of a problem with your TNG site'''
  
# copy your backup newacctform.php to your base TNG directory
+
# copy your backup newacctform.php and/or suggest.php to your base TNG directory
 
#* all should be well now
 
#* all should be well now
 
# you may also delete the "freecap" folder and files
 
# you may also delete the "freecap" folder and files

Revision as of 07:52, 23 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 ambious. 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.

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 modication will get lost during your next TNG version update and you will need to re-implement the mod.
  2. This version does not support alternate languages, it has been implemented in English only.


TNG Modifications

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

  • The zip file TNG_captcha_Rev_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
  • 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.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
    • the freecap.php should be executable
  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


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