[TYPO3-realty] Spam problem, need easy solution

Christoph Stadler christophe at stadler.com
Tue Aug 9 13:47:56 CEST 2011


so i'm trying to get this to work: http://www.myjqueryplugins.com/QapTcha

this is how far i've progressed (if you can call it that):

First, include the CSS & jQuery files in the main Typo3 HTML template 
(i'm using a Templavoila template so i'm putting it there)

<!-- QapTcha CSS -->
<link rel="stylesheet" href="QapTcha.jquery.css" type="text/css" />

<!-- QapTcha and jQuery files -->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script type="text/javascript" src="jquery.ui.touch.js"></script> <!-- 
Added in v2.5 for iPhone and iPad -->
<script type="text/javascript" src="QapTcha.jquery.js"></script>


Then in typo3conf/ext/realty/pi1/tx_realty_pi1.tpl.htm
at the beginning of the contact form, right after the

<fieldset class="tx-realty-pi1-fieldset">
         ###CONTACT_FORM_ERROR###
<form method="post" action="">


I put this:

<div class="tx-realty-pi1-field" id="QapTcha"></div>

Then ...

After

<!-- ###CONTACT_FORM_WRAPPER_LAW### -->
</form>
</fieldset>


I add

<script type="text/javascript">
     $(document).ready(function(){
         $('#QapTcha').QapTcha({disabledSubmit:false});
     });
</script>

Then i guess i need to put somewhere in

typo3conf/ext/realty/pi1/class.tx_realty_contactForm.php

the code from the validation and there i don't know how to do that :(


On 8/9/11 1:32 PM, Christoph Stadler wrote:
> hello,
>
> i have a site where the realty contact form is heavily spammed by some 
> bot since the contact form does not have a captcha protection.
>
> As it is i had to take the mail form offline but need to find a simple 
> solution fast. Even if it's not the ultimate protection (i know 
> javascript is not a perfect solution) i just need this form to work 
> again and provide some protection.
>
> so i'm looking at jQuery plugins but haven't had any luck getting one 
> to work, any of these solutions would be great:
>
> http://visionwidget.com/tuts/webtuts/591-jquery-captcha-plugin-with-tutorial.html 
>
>
> but i'm not a php coder, i normally know how to make jquery plugins 
> work but not how to combine this with the realty contact form ...
>
> i'm on 4.5.3 with the realty dev build 0.5.63
>
> this is really an essential feature and it would be cool if someone 
> could help me get this to work so we could integrate it to the next 
> release or at least post some instructions here so everyone using 
> realty could implement this easily
>
> any suggestions or help is welcome
>
> PS: due to my lack of php and t3 extension development knowledge i 
> can't develop this myself but can maybe still be helpful in the proces 
> of documenting and implementing it ?
>
> cheers
>
> chris



More information about the TYPO3-project-realty mailing list