[COREblog-en] comment spam
Yusuke NAKAI
nyusuke at nagosui.org
Sun Jun 4 21:06:00 CEST 2006
Hi.
I'm using PloneCaptcha on Plone+COREBlog2 and it works well.
> . Now everything
> seems to work - but verification is never done. Trying to modify validateComment.py
> gave an error when trying to import CaptchasDotNet (authorization failure??).
>
> I do not understand why validation does not call validation of the captcha
> code "automatically". Am I missing something? Has anybody else tried to solve
> this problem?
Did you set 'name' and 'secret key' at
'Zope-instance/Products/PloneCaptcha/config.py'?
Here is a procedure to use PloneCaptcha on Plone+COREBlog2.
1. Get account of captchas.net -> http://captchas.net/registration/
After registration completed, you'll get 'name' and 'secret key' by
e-mail.
2. Download and extract PloneCaptcha, and put it in 'Products' folder of
Zope-instance.
3. Edit 'name' and 'secret key' settings in
'Zope-instance/Products/PloneCaptcha/config.py'.
4. Restart zope and install PloneCaptcha from portal_quickinstaller(site
settings -> add/remove products).
Now you can use captcha on plone. But to use it on COREBlog2, further
settings are needed.
5. Edit 'portal_skins/COREBlog2/cbcomment_form' on ZMI.
Simply add this code to just before 'remember cookie' code.
<div metal:use-macro="here/captcha/macros/edit" />
Or more completely, add these code.
-------------------------------------------------------------
<div class="field"
tal:define="error errors/captcha| nothing;"
tal:attributes="class python:test(error, 'field error',
'field')">
<label i18n:translate="label_captcha_help">Verification
Code</label>
<div class="formHelp" i18n:translate="help_plone_captcha">
This helps us prevent automated spamming.
</div>
<div tal:content="error">Validation error output</div>
<div metal:use-macro="here/captcha/macros/edit" />
</div>
-------------------------------------------------------------
6. Edit validator on 'cbentry_view' and 'cbcomment_preview'.
Go to 'portal_skins/COREBlog2/cbentry_view' on ZMI, and click
'Validation' tab. Add validator like this:
Context type: Any
Button : (empty)
Validators : validate_captcha
Repeat for 'portal_skins/COREBlog2/cbcomment_preview'.
Now you can use captcha on Plone+COREBlog2.
Regards,
--
NO LEARNING, NO MEANING.
Yusuke NAKAI
mail: nyusuke at nagosui.org
web : http://nagosui.org
More information about the COREblog-en
mailing list