( Latest versions: 1.8.3 Stable, compatible with Joomla 3.6.4+   &   0.8.3 Stable, compatible with WordPress 4+ )
×
Support Policy

We only provide official support for Solidres's subscribers, all subscribers can request support by using forum or support ticket system. For more information please check our Support Policy at www.solidres.com/support-policy

emo Prevent SPAM with captcha

More
2 years 6 months ago #4536

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
2 years 6 months ago #4537

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
2 years 6 months ago #4538

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
2 years 6 months ago #4540

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
2 years 6 months ago #4541

Hi,

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

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)

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
2 years 6 months ago #4545

Modifications are done, but it doesn't work.

From your reply I thought your modification are done?
The post before attached files is related to my issue.

This:
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?

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?