Image Captcha Add-on

From TNG_Wiki
Jump to: navigation, search
Ambox notice.png The Image Captcha Add-on should work with any TNG version since TNG V6 when the conditional include for the TNG_captcha.php was added to the suggest.php and newacctform.php.
If you currently are using a different version of TNG_Captcha.php, installing this mod will overlay the TNG_captcha.php script, so you might want to rename your existing TNG_captcha.php as a backup before installing this mod.
Note that this mod does not use the Mod Manager for installation but rather provides its own installation.
TNG All


Please note that the Image Captcha is now a Mod. Future updates will be to the Image Captcha Mod only.


Image Captcha Add-on
Summary Adds a captcha using images to TNG contact pages.
Validation n/a
Mod Updated {{{mod_last_update}}}
Download link
version 10.1.0.11
TNG 10.1.0
version 9.0.0.8
TNG All
Download stats view statistics
Author(s) Rick Bisbee
Homepage Bisbee Family Connection
Mod Support Support for Image_Captcha_Add-on
Contact Developer As Above
Latest Mod 10.1.0.11
Min TNG V 10.1.0
Max TNG V 11.0.1
Files modified
TNG_captcha.php
Related Mods
Notes
Add-on should work with any version of TNG that supplies a dummy TNG_captcha.php.



Introduction

This Captcha requires users to select one of a series of images that differs from the others. There is nothing to type, so you don't have to lay the mouse down to enter impossibly obscured words. It's quick and efficient and most users will actually enjoy the exercise. Those already logged into the website as registered users will not be presented with the Captcha, but will be given direct access to the page.

The Captcha display consists of a series of 'fill' images which are all the same. A subtly different 'target' image will be arbitrarily positioned among them. You can choose from several sets of images included with the add-on, or you can use your own custom images.

While the Image Captcha Add-on does not modify any TNG files, it does replace any previous TNG_captcha.php file that you might have been using. Save a copy if you think you might want to go back to it. Image Captcha has been tested with TNGv9, but it should work with previous versions that supplied the TNG captcha file. Image Captcha provides language support via a small text file (cap_text.php) added by the installer to the English and English-UTF8 folders. Other languages can be supported by using these files as templates. They are very efficient because, unlike cust_text.php, they are only included when a script like suggest.php needs them.


Visualizations

Cap001.jpg

Cap002.gif

Cap003.jpg

Revision History

Version Date Description
v10.1.0.11 28 Feb 2015
  • Fixes bug that returned challenge after successfully passing it.
v10.1.0.10 1 Feb 2015
  • adds Czech language support courtesy of Michal Papousek.
  • not tested.
v10.1.0.9 31 Jan 2015
  • removed variable name that conflicted with new TNG database handle ($link).
v9.0.0.8 14 Dec 2012
  • Added language support to the 'Go' button (now 'Continue')
  • Added several language support files -- info from this article
  • Fixed oversight that prevented logging in from captcha page
v9.0.0.7 3 Dec 2012
  • Additional fields added to setup program to enter paths for custom captcha images
v9.0.0.6 7 Oct 2012
  • fixed variable name conflict that broke the page on some sites (rare)
v9.0.0.5 19 May 2012
  • Added additional image sets courtesy of Liane Benway.
v9.0.0.4 10 Apr 2012
  • Fixed PHP4 backward compatibility issues
v9.0.0.3 31 Mar 2012
  • Improved generic installation script that allows you to select available languages to install. Only English, French and German are available in this version.
v9.0.0.2 16 Mar 2012
  • Fixes minor issues
v9.0.0.1 11 Mar 2012
  • Initial release

Upgrading From An Earlier Version

To upgrade to a new version of Image Captcha you must first go to the existing imcap folder to start the setup program and uninstall it. Then you must either rename the folder (e.g., to _imcap), or remove it entirely. Follow the instructions below for installing the new one.

Self Installing

The Image Captcha Add-on will install itself (with your permission). Download and unpack imcap.zip. Place the imcap folder in your TNG website's 'extensions' folder. Be sure you are logged in as an administrator and navigate to imcap with a web browser. In other words, enter the full URL path to the folder into your browser's address bar. For Example:

http://www.mydomain.com/extensions/imcap
Of course you will need to replace "www.mydomain.com" with your own domain name. If you are logged in as an administrator, you will see a small screen where you can select the languages to install. Click on the 'Install' button and That's all there is to it.

Selecting Options

Cap004.gif

After the Image Captcha Add-on has successfully installed, you will see an options screen that lets you choose the number of images presented and the image set you prefer to use. You can return to this screen to change them or uninstall the Image Captcha at any time. Test the captcha by logging out and selecting the 'Contact' link from the 'Info' drop down menu.

Customizing the Images

It is easy to provide your own images.

  • Create two images about 64 x 64 pixels to serve as your target and fill images. The target image is the one which must be selected among the fill images to pass the captcha challenge.
  • On the setup screen, click the Custom Images radio button and enter paths to the target and fill image files. Paths must be relative to the TNG root folder -- for example, img/mytarget.gif and img/myfill.gif. Do not enclose them in quotes. The setup program will check to see if the image files exist. If not, setup will warn you, clear the file path fields and revert back to the default image set. If you want to reenter corrected file paths, be sure to also select the Custom Images button again.

Uninstall Image Captcha

To uninstall the Image Captcha, log in as administrator, go to the installation page (extensions/imcap/index.php) and click on 'Uninstall'.

Custom Text

If you want to use the Image Captcha Add-on with other languages, you will need to create a cap_text.php file similar to those provided for the English and English-UTF8 in your other languages/folders.

Note: imcap_v9003 now includes English, French and German language support for both the setup script and the captcha. Corrections and additions are always welcome and will be added to future versions of the basic package.

English

<?php 
$text['cap_info'] = "Please help us reduce spam."; 
$text['cap_instruct'] = "Select the image above that differs from the rest and click"; 
$text['cap_error'] = "Wrong selection, try again"; 
?>

French

<?php 
$text['cap_info'] = "Svp aidez-nous à réduire le Spam."; 
$text['cap_instruct'] = "Choisissez l'image au-dessus qui est différente et clique sur "; 
$text['cap_error'] = "Mauvais choix, essayez encore"; 
?>

German

<?php
$text['cap_info'] = "Bitte helfe mit Spameinträge zu reduzieren.";
$text['cap_instruct'] = "Wähle oberhalb ein Bild aus, das sich von den anderen Bildern unterscheidet.";
$text['cap_error'] = "Falsche Auswahl! Versuche es erneut.";
?>

Dutch

<?php
$text['cap_info'] = "Help ons alsjeblieft om minder spam te krijgen.";
$text['cap_instruct'] = "Kies het plaatje wat anders is en dan klik";
$text['cap_error'] = "Verkeerde keuze, probeer het nog eens";
?>

Tentative Translations

Portuguese, Spanish, Afrikaans and Italian

(I used google translate to make them, so they might be a bit off Henny 08:30, 10 December 2012 (CST))

<?php
$text['cap_info'] = "Por favor, ajude a ficar menos spam.";
$text['cap_instruct'] = "Selecione a imagem que é diferente e, em seguida, cliqueem";
$text['cap_error'] = "Escolha errada, tente novamente";
?>

<?php
$text['cap_info'] = "Por favor, ayúdenos a recibir menos spam.";
$text['cap_instruct'] = "Seleccione la imagen que es diferente y haga clic en";
$text['cap_error'] = "Mala elección, intente de nuevo";
?>

<?php
$text['cap_info'] = "Help ons asseblief om minder spam te kry.";
$text['cap_instruct'] = "Kies die prentjie wat anders is, en dan klik";
$text['cap_error'] = "Verkeerde keuse, probeer dit nog eens";
?>

<?php
$text['cap_info'] = "Si prega di contribuire a ottenere meno spam.";
$text['cap_instruct'] = "Selezionare l'immagine che è diverso e quindi fare clic su";
$text['cap_error'] = "Scelta sbagliata, prova di nuovo";
?>

Problems and Limitations

Few problems have arisen with the Image Captcha add-on.

One user found that the script would not execute in his extensions folder. The solution was to change folder permissions to 755 for the extensions folder and its subdirectories, and file permissions to 644.

PHP Safe mode prevents a php script (either this installer or Mod Manager) from copying files if the owner of the source file is different than the owner of the directory to which it is being copied. You can check the status of safe mode on your website by going to the Admin page, selecting Setup, then clicking on the Diagnostics tab at the top of the page. If your website has safe mode turned on, consult your web hosting provider about turning it off. The only alternative is for the administrator to manually upload each file from the package to its operational destination folder.

The Image Captcha will work with all the TNG pages that have a captcha capability built into them. To use it on a custom page you must insert the following statement in the code where you want to present a challenge:

include($cms['tngpath'] . "TNG_captcha.php");

NOTE: if your custom page requires 'POST' information (like a form processor), the 'POST' information will be lost and the page will likely fail. To make it work, your page would have to save the POST data externally and retrieve it after the challenge has been answered.

Disclaimer

No particular problems have been encountered with this add-on, but as always, use it at your own risk.



Sites using this mod

If you download and install this mod, please add your TNG Site to the table below:

URL User Note Mod-Version TNG-Version User-language
Bisbee Family Connection Rick Bisbee Mod Developer 9.0.0.7 9.0.4 EN
Our Roy and Boucher Family Ken Roy I replaced the reCaptcha mod with this mod in TNG V8, V9, and V10 9.0.0.8 10.0.0 EN, FR
Thames/Tims Family Association Dustin Thames After upgrading our site from v5 to v9, I added this Captcha mod. 9.0.0.8 9.0.4 EN
Kemp(e) Family History Andrew Kemp ReplaceReplaced the reCaptcha mod with td the reCaptcha mod with this mod in TNG V9 see User:Kempons see User:Kempons EN
DLMax-Max Westen's genealogy site Max Westen Love this version. Changed the dutch language a bit though! ;). 9.0.0.8 9.1.0 NL, EN
Our Family Genealogy Pages Roger Navarre No more complaints about illegible captcha words! Thanks 9.0.0.8 9.2.0 EN
MOTYER Family Genealogy John Mark Motyer Public site see here see here EN, DE, RU
De veenkoloniale genealogieën Henny Savenije Very effective against all kind of fake registrations. Thanks 9.0.0.8 9.2.1 English, Dutch, Afrikaans, German, French, Spanish, Korean, Portuguese, Italian
my family Oname.gif (no public site) see User:ojay see User:ojay D,(NL),(GB)
Familienforschung Scabell Helga Scabell Danke für die einfache Installation 9.0.0.8 9.2.2 D
MULLFAMILIES Michael 25 bot registrations one morning !! no more. Many thanks : TNG v 9.2
Roni & Jerry's Genealogy and Family History Jerry Liebowitz 10.1.0.11 TNG v 10.1 English
British 1820 Settlers to South Africa Paul Tanner-Tremaine 10.1.0.11 TNG v 10.1.1 English
Schmit / Heemskerk Familie Rudi Schmit 10.1.0.11 TNG v 10.1.3 English, Dutch, German
The Laumaster Project Barry Sherry So far stopped my daily spam requests 10.1.0.11 TNG v 11.1.1 English
Barta-Joggele Online aus Mauren, Liechtenstein Gerald Meier Thanks! 10.1.0.11 TNG V 12.0.2 DE, EN, ES, FR, PT