Math Captcha

Simple Mathematical Capcha

#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

  1. Unpack the plugin into your plugins folder.
  2. Install in Administration => Plugins.
  3. Configure the plugin. Do not limit attempts if you use mcaptcha in such plugins like comments and shoutbox.
  4. 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.

1. 3axap  2009-07-07 20:12
Почему то не хочет работать. Пишет невреный код и все тут.
2. Rio  2009-08-14 04:35
Код вставки:
[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">&nbsp;</div>

<!-- END: COMMENTS_NEWCOMMENT -->
[/code]
Спасибо Dayver
3. Rio  2009-08-14 04:36
PS Levf. в сам ngk надо внести подсказку или сноску -"Поля помеченные * должны быть заполнены"
4. elfrenazo  2010-07-16 04:58
thanks, and implemented without any problem. Good health :)
5. MIHDev  2010-11-24 07:47
Great plugin, thanks :)
6. booka  2010-12-09 06:56
///
7. Macik  2011-11-29 16:33

Version converted for Siena for use with Captcha manager: http://www.cotonti.com/datas/users/mcaptcha_siena_fixed_461.zip

 

Alleen geregistreerde gebruikers kunnen reacties plaatsen.