Prevent SPAM with captcha

More
8 years 2 months ago #4536 by Gokk
Replied by Gokk on topic Prevent SPAM with captcha
I understand how it works, but I have a problem;
I had to implement a customized version of Securimage Captcha plugin in order to work with your extension, because of the Ajax Processing. The page that loads the Captcha image is called using Ajax therefore it wasn't display the recaptcha;

If the captcha code is valid it works, however if it is not valid it doesn't work. I'm not sure why.

The problem probably lies in the /components/com_solidres/controllers/reservation.json.php file.

In the processGuestInfo() method I have added the captcha verification and in case the Captcha code is wrong it returns this:
$response = array('status' => false, 'message' => JText::_('PLG_CAPTCHA_SECURIMAGE_VALIDATION_CODE_WRONG'), 'next_step' => 'guestinfo');
echo json_encode($response);
$this->app->close();

The Page hangs and nothing happens;

I have also changed the status to 0 instead of false for testing purposes, but it did not work either.

Can you please help?

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4537 by Gokk
Replied by Gokk on topic Prevent SPAM with captcha
I've attached modified files! This could really help you if you plan to implement captcha in the future!
Modification have been made to:
/administrator/components/com_solidres/config.xml (You have to configure the default captcha library OR set it up in the component options);
/components/com_solidres/layouts/asset/guestform.php (This is the Booking registration form right?);
/components/com_solidres/helpers/captcha.php (Added a captcha helper);
/components/com_solidres/controllers/reservation.json.php (Added captcha checkAnswer in the processGuestInfo() method/function)

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4538 by vietvh
Replied by vietvh on topic Prevent SPAM with captcha
Hi,

We are glad to see you got it implemented and we appreciate your shared code. This would be useful for us when we implement Captcha for Solidres.

Regards,

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4540 by Gokk
Replied by Gokk on topic Prevent SPAM with captcha
Can you please tell me did you at least read my post previous to shared captcha files? Can you assist or no?

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4541 by vietvh
Replied by vietvh on topic Prevent SPAM with captcha
Hi,

Just want to make thing clear, have you done with your modification or not?

From your reply I thought your modification are done?

If you are not done with it then we will try our best to assist you.

Regards,

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4545 by Gokk
Replied by Gokk on topic Prevent SPAM with captcha
Modifications are done, but it doesn't work.
The post before attached files is related to my issue.

This:
And yes, I need your help with this, I don't know what else to do, thanks.

Please Log in or Create an account to join the conversation.

Moderators: solidres
Powered by Kunena Forum

All the things you need to make your work easier. Did you like Solidres?