Difference between revisions of "NATS3 CAPTCHA"
From TMM Wiki
Jump to navigationJump to search(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
{{NATS3 Manual | {{NATS3 Manual | ||
| show_troubleshooting_section = true | | show_troubleshooting_section = true | ||
Line 8: | Line 5: | ||
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> | <PRE> | ||
<img src="{$image_url}" > //this will make the captcha image | <img src="{$image_url}" > //this will make the captcha image | ||
Line 54: | Line 39: | ||
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. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See Also == | == See Also == | ||
Line 72: | Line 44: | ||
[[Category:External Links]] | [[Category:External Links]] | ||
− | |||
− |
Latest revision as of 13:55, 7 February 2020
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:
<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
A more stylized example is shown below:
<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>
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.
See Also
- CAPTCHA -- Wikipedia's CAPTCHA article