|
|
Line 15: |
Line 15: |
| | | |
| NATS can protect some pages with CAPTCHAs, providing an additional security measure that helps to prevent against automated login attempts. | | NATS can protect some pages with CAPTCHAs, providing an additional security measure that helps to prevent against automated login attempts. |
| + | |
| + | To use the Captcha feature, insert the following somewhere between the <FORM> and </FORM tags on the desired form template: |
| + | <PRE> |
| + | <img src="{$image_url}" > //this will make the captcha image |
| + | <input type="text" name="signup[captcha:1]" value="{$vars.captcha}"> // this is where the users will type in what they see in the Captcha box |
| + | {if $errors.captcha}{$errors.captcha}{/if} //if there any errors when the users typed in what they saw in the Captcha box, this will display the errors |
| + | {if $captcha_key}<input type="hidden" name="signup[captcha_key]" value="{$captcha_key}">{/if} // if present, add the additional captcha key into the form as a hidden field |
| + | </PRE> |
| + | |
| + | <HR> |
| + | |
| + | A more stylized example is shown below: |
| + | <PRE> |
| + | <fieldset> |
| + | <legend>Captcha Image</legend> |
| + | <div class="form_input"> |
| + | <center><img src="{$image_url}" width="150" height="45" border="0" style="padding: 3px; padding-left: 10px; padding-top: 6px"></center> |
| + | </div> |
| + | <div class="form_input"> |
| + | {if $errors.captcha}<div class="join_error">{$errors.captcha}</div>{/if} |
| + | <label class="memberinfo">Verify Text:</label> |
| + | <input type="text" class="signup_input" name="signup[captcha:1]" size="35" value="{$vars.captcha}"> |
| + | </div> |
| + | |
| + | {if $captcha_key} |
| + | <input type="hidden" name="signup[captcha_key]" value="{$captcha_key}"> |
| + | {/if} |
| + | |
| + | </fieldset> |
| + | </PRE> |
| + | <HR> |
| | | |
| If your CAPTCHA image is missing from a page, ensure your server has both GD and FreeType installed, and that GD was compiled with FreeType support. Also, make sure the CAPTCHA is enabled on the template. | | If your CAPTCHA image is missing from a page, ensure your server has both GD and FreeType installed, and that GD was compiled with FreeType support. Also, make sure the CAPTCHA is enabled on the template. |
| + | |
| + | |
| + | <HR> |
| | | |
| For more information on CAPTCHA images and how to add them in [[NATS4]], please see our [[NATS4 Adding a Verification Image]] wiki article. | | For more information on CAPTCHA images and how to add them in [[NATS4]], please see our [[NATS4 Adding a Verification Image]] wiki article. |