cotonti.com : Add mCaptcha to contactus plugin https://www.cotonti.com Laatste forum onderwerpen Cotonti en Mon, 13 Oct 2025 14:42:55 -0000 foxhound
Thanks for all the help!!
On to the next plugins :)]]>
Za, 29 Aug 2009 22:34:50 -0000
esclkm Za, 29 Aug 2009 21:29:52 -0000 foxhound So, its a bit confusing for a noob like me :)

Anyway, I just installed the plugin version you provide there and seems to work perfectly, thanks a lot!! :)


[edit]
I assume I can not use the Captcha manager with this plugin version which I downloaded from that tutorial page right?]]>
Za, 29 Aug 2009 21:19:31 -0000
esclkm If you can you may translate in translate.google.com my article : http://www.cotonti.com/docs/ru/misc/231
In which I show how to integate different types of captchas in you plugin. As exaple was - the simplest contactus]]>
Za, 29 Aug 2009 20:30:25 -0000
foxhound


And if you want to see the plugin, I uploaded it to my site so you can see for yourself :)
- Contactus plugin]]>
Za, 29 Aug 2009 20:21:40 -0000
esclkm please show me screen]]> Za, 29 Aug 2009 20:00:34 -0000 foxhound
mcaptcha for Cotonti is installed and working on my test site. Now I wanted to add it to the contactus plugin as well. I assumed I had to add the code as specified on the download page.]]>
Za, 29 Aug 2009 19:50:08 -0000
esclkm You can find it on this site.]]> Za, 29 Aug 2009 19:27:41 -0000 foxhound mcaptcha to the contactus plugin which was originally made for seditio but works without problems in Cotonti as well.

I have added the following to the contactus.php:
// Add mcaptcha to contactus
$t->assign(array(   'CONTACTUS_MCAPTCHA' => mcaptcha_generate(),
		  'CONTACTUS_VERIFY' => '<input type="text" name="rverify" size="4" />',));

$rverify = sed_import('rverify', 'P', 'INT');
if(!sed_captcha_validate($rverify))
	{   
		$error_string .= $L['captcha_wrong'].'<br />';
	}


Than I tried to add it to the form itself but that is where I am stuck (yes, I know, I am a php noob :( )

// adding captcha
$plugin_body .= "<tr><td>".$L['plu_contactcaptcha'].": </td><td>\n;
$plugin_body .= "{CONTACTUS_MCAPTCHA}\n";
$plugin_body .= "<tr><td>".$L['plu_contactcaptcha'].": </td><td>\n;
$plugin_body .= "{CONTACTUS_VERIFY}\n";

// end captcha

I realise it wont work with the tags now in php so I tried to copy how the forum was build with other parts of the contactus plugins, changing it to the mcaptcha variables etc but I keep just getting php errors when I try to acces the contactus page.
If someone can help me on this that would be appreciated :)]]>
Za, 29 Aug 2009 19:25:05 -0000