Thank you for the reCaptcha plugin. I got 2 questions:
1. How to enable the reCaptcha on a custom registration page?
2. Is it possible to move the reCaptcha from the top to the bottom of the form?
Ben
Question 1. Add the lines below to CUSTOM_userForm() function after you create Template object (e.g. just after "$user_templates->set_file('memberdetail', 'memberdetail.thtml' ;"
Question 2. reCAPTCHA, like other CAPTCHA's, should be displayed where you write {captcha} template variable in the template file. With the Modern Curve theme, {captcha} is written at line 22 (users/registration.thtml) before the buttons and reCAPTCHA is displayed there.
Ben, I forgot to say that you have to put {captcha} template variable in your "path_layout/custom/memberdetail.thtml" file. You can put it anywhere between <form> and </form> tags.
Okay,
I figured out the issue with the forum. It doesn't work with recaptcha because the forum looks for specific functions from the captcha plugin before it sets the template variable. I have updated createtopic.php of the latest forum version to work with both plugins. For those who want it, email me and I will send it to you (this fix will be included in the next version of the forum).
Also mystral-kk I see what Ben was talking about with the recaptcha appearing at the top of the forum. This happens in the forum unless you update the HTML of the submissionform_main.thtml file of the forum. The reason this happens is that some themes and plugins are setup in a way where the captcha is added to the table row. The captcha plugin handled this by having separate template files for each captcha type (ie registration, forum, article, etc..) and it had the table row information in the corresponding template file. This works fine unless you have a multi theme site or if the Geeklog theme has been updated to use something other than table rows (like Modern Curve).
With recaptcha it inserts a div only (plus the capthca stuff in the div). This is fine in a lot of cases except when you need to add some extra css to place the recaptcha if it is enabled. For example the forum still uses tables. I had to hardcode the extra table row in to the template file and it will appear whether the recaptcha plugin is turned on or off. I also had to add an extra div around the captcha template variable so I could float it to the right. A partial fix to the extra div issue is have the recaptcha plugin insert its own div with a class based on the type. This way in the css file of each Geeklog theme/plugin you could add your own styling for the recaptcha plugin based on the type (forum, registration, article, etc..)
What do you think?
As you know, I made the reCAPTCHA plugin in haste, so I didn't test it thoroughly with all item types. I just read functions.inc of the CAPTCHA plugin and learned how it works. Anyway, I think it would be better to change the template file of the Forum plugin (maybe submissionform_main.thtml?), because it is costly to deal with this issue on the CAPTCHA's side every time a new CAPTCHA plugin is created.
I'm testing a new version of the captcha plugin on geeklog.fr and notice no spam since 24H. You can see it in action on the registration page or on the contact page.
I will clean the code and make a new release on monday.
Ben
PS : Nothing is unbreakable... just a matter of time
It would be ideal to change Ben's CAPTCHA plugin into one like the Spam-X plugin in that it is a meta plugin, extensible by sub modules so that the user can choose how to provide a CAPTCHA from static images, dynamic images, external service like reCAPTCHA, and so on.
As you know, I made the reCAPTCHA plugin in haste, so I didn't test it thoroughly with all item types. I just read functions.inc of the CAPTCHA plugin and learned how it works. Anyway, I think it would be better to change the template file of the Forum plugin (maybe submissionform_main.thtml?), because it is costly to deal with this issue on the CAPTCHA's side every time a new CAPTCHA plugin is created.
I updated submissionform_main.thml to make it work. I also emailed you my updates to the recaptcha plugin. The update adds a div to make styling a little easier.
Thanks, Tom. Based on your improvements, I made v1.0.1 and submitted it to geeklog.net.
I switched to the ReCAPTCHA plugin and it works perfectly for me. No spammer registration attempts are getting past ReCAPTCHA.
I left the CAPTCHA plugin enabled, and that doesn't seem to be a problem. Also it makes it easy to check the captcha log, which shows this for every attempt since I switched to ReCAPTCHA:
"Detected an attempt to bypass CAPTCHA (no session id) in registration"
Maybe that's a clue as to a possible weakness in the CAPTCHA plugin?
Anyway, thanks!
I left the CAPTCHA plugin enabled, and that doesn't seem to be a problem.