#1. Features
-
Replacement for standard php-captcha
-
Simple 2-digit integers in questions
-
Bruteforce, XSS and replay attack protection
-
Easy API to implement mcaptcha in other plugins
#2. Requirements
This plugin is recommended for use with CAPTCHA Manager.
Siena version of this plugin ships with the CMS by default.
#3. Installation
-
Unpack the plugin into your plugins folder.
-
Install in Administration => Plugins.
-
Configure the plugin. Do not limit attempts if you use mcaptcha in such plugins like comments and shoutbox.
-
Use same tags in users.register.tpl:
{USERS_REGISTER_VERIFYIMG},{USERS_REGISTER_VERIFYINPUT}
#4. API
Use this function to generate mcpatcha question:
$t->assign(array(
'SOMETHING_MCAPTCHA' => mcaptcha_generate(),
'SOMETHING_VERIFY' => '<input type="text" name="rverify" size="4" />',
));
Then check mcaptcha on form processing:
$rverify = sed_import('rverify', 'P', 'INT');
if(!mcaptcha_validate($rverify))
{
$error_string .= $L['captcha_verification_failed'].'<br />';
}
#5. Limitations
-
One mcaptcha per page. If it appears more than one times (like in header and main parts), the mcaptcha will reset itself and result into errors.
Thanked: 2 kez
[code}
<!-- BEGIN: COMMENTS_NEWCOMMENT -->
<form action="{COMMENTS_FORM_SEND}" method="post" name="newcomment">
<div class="block" style="float:left">
<!-- IF {PHP.usr.id} < 1 -->
<h4>{PHP.L.User}</h4> {COMMENTS_FORM_POSTER}
<!-- ENDIF -->
<h4>{PHP.skinlang.comments.Comment}</h4>
<div style="width:99%;">{COMMENTS_FORM_TEXTBOXER}</div>
<!-- IF {PHP.usr.id} < 1 -->
{PHP.L.plu_robot} {COMMENTS_FORM_VERIFY_IMG}: {COMMENTS_FORM_VERIFY}<br /> <h5>"обязательно введите проверочны код!"</h5>
<!-- ENDIF -->
<p><input type="submit" class="submit" value="{PHP.skinlang.comments.Send}" /></p>
</div>
<div class="clear"> </div>
<!-- END: COMMENTS_NEWCOMMENT -->
[/code]
Спасибо Dayver
Thanked: 7 kez
Thanked: 1 kez
Thanked: 181 kez
Version converted for Siena for use with Captcha manager: http://www.cotonti.com/datas/users/mcaptcha_siena_fixed_461.zip