I need to remove the captcha from the contact form according to client request.
How can I do that ?
Please your prompt reply,
Best,
Ronen
This topic has 19 replies, 3 voices, and was last updated 10 years, 5 months ago ago by ronen-webzit
I need to remove the captcha from the contact form according to client request.
How can I do that ?
Please your prompt reply,
Best,
Ronen
Hello,
You need edit the files wp-content/themes/royal/framework/shortcodes.php (line 223) and comment or delete the code
$captcha_instance = new ReallySimpleCaptcha();
$captcha_instance->bg = array( 244, 80, 80 );
$word = $captcha_instance->generate_random_word();
$prefix = mt_rand();
$img_name = $captcha_instance->generate_image( $prefix, $word );
$captcha_img = ETHEME_CODE_URL.'/inc/really-simple-captcha/tmp/'.$img_name;
and wp-content/themes/royal/framework/theme-functions.php (line 1364) and delete the code
$captcha_instance = new ReallySimpleCaptcha(); and this one in line 1375
if(!$captcha_instance->check( $_GET['captcha-prefix'], $_GET['captcha-word'] )) {
$return['status'] = 'error';
$return['msg'] = __('The security code you entered did not match. Please try again.', ETHEME_DOMAIN);
echo json_encode($return);
die();
}
Best regards,
Jack Richardson.
Hello Jack,
thank you for your fast reply.
1.
I found 1st code snippet eassly – but…
2.
$captcha_instance = new ReallySimpleCaptcha(); is found in wp-content/themes/royal/framework/theme-functions.php in:
line 1379 – registration form section – under et_registration_form()
line 1462 – send message from contact form section – under et_send_msg_action()
line 1550 – registration section – under et_registration_action()
3.
The last snippet is not in wp-content/themes/royal/framework/theme-functions.php file
Please your urgent advice.
Best,
Ronen
Hello,
2. You need remove the code from the section “send message from contact form section”.
3. Please provide us with WP Dashboard and FTP credentials in private content.
Best regards,
Jack Richardson.
Thank your Jack.
I’ll remove the code as instructed.
The contact form issues a “Error while ajax request” notice when send.
Please your urgent respond since Contact form is unusable and this is a live website !
Enclosed credentials in Private.
Please let me know as soon as you’re done, since Eva Kemp needs the same credentials to handle another issue for this project and it would interfere with yours.
Best,
Ronen
Hello,
There is an error on your site:
http://storage4.static.itmages.com/i/15/0630/h_1435656779_2844002_5e493eac21.png
You should ask your host to check error logs what is causing 500 error. This topic should be helpful:
https://wordpress.org/support/topic/ajax-500-errors
Regards,
Eva Kemp.
Hello Eva,
I followed Jack Richardson advice but couldn’t go through with it since the code he pointed to was not in the file.
The partly fixed issue returned an ajax error and I suspect this is the one.
I’v given him access credentials and still waiting for his reply on the matter.
As soon as that is handled, I would transfer these credentials to you as requested in comment #72149 from you.(topic: google map “full width” not showing right)
Fast handling will be highly appreciated.
Best,
Ronen
Hello,
You provided credentials for the site http://mmins.webzit.co.il/ , but in your screenshot http://www.a-giv.co.il/wp-content/uploads/2015/05/Screenshot-2015-05-05-08.52.09.png the site is a-giv.co.il. So what site should we check? Provide us with the correct credentials.
Thank you.
Regards,
Eva Kemp.
Hi Eva,
Domain a-giv.co.il is the project in which I used the
versions on VC & Ultimate Addons as a temporary solution until I’ll hear from you. So it is not relevant at the moment.
Domain mmins.webzit.co.il uses the latest versions of these plugins (as suggested by you).
Related image can be found in comment #72134 (topic: google map “full width” not showing right)
NOTE: Jack Anderson is using these same access details to resolve the CAPTCHA remove request – so make sure not to login and make changes at the same time. THIS IS A LIVE SITE so please be cautious !
Best,
Ronen
Hello,
I’ve edited the file theme-functions.php and shortcodes.php.
Please check contact form now and clear browser cache now.
Also as I see the map is shown properly:
http://storage4.static.itmages.com/i/15/0630/h_1435698091_2816410_4331ba45da.png
Regards,
Eva Kemp.
Hן Eva,
The contact form looks and works well, thank you. I need though the exact changes you’ve made so I’ll be able to implement them when new Royal versions are released.
For the map – the issue concerns FULL WIDTH & EXTEND FULL WIDTH, current definition is width 100% & default width – which gives a boxed layout – that is not what I need.
Please send the corrections made and keep me posted re the google map issue.
Best,
Ronen
Hello,
I’ve commented the code in shortcodes.php file:
$captcha_instance = new ReallySimpleCaptcha();
$captcha_instance->bg = array( 244, 80, 80 );
$word = $captcha_instance->generate_random_word();
$prefix = mt_rand();
$img_name = $captcha_instance->generate_image( $prefix, $word );
$captcha_img = ETHEME_CODE_URL.'/inc/really-simple-captcha/tmp/'.$img_name;
in line 227
and the code
<div class="captcha-block">
<img src="<?php echo $captcha_img; ?>">
<input type="text" name="captcha-word" class="captcha-input">
<input type="hidden" name="captcha-prefix" value="<?php echo $prefix; ?>">
</div>
in line 268.
Also in the file theme-functions.php:
$captcha_instance->remove( $_GET['captcha-prefix'] );
in line 1559
if(!$captcha_instance->check( $_GET['captcha-prefix'], $_GET['captcha-word'] )) {
$return['status'] = 'error';
$return['msg'] = __('The security code you entered did not match. Please try again.', ETHEME_DOMAIN);
echo json_encode($return);
die();
}
in line 1503
and the code
$captcha_instance = new ReallySimpleCaptcha();
in line 1492
To prevent losing changes you should copy theme-functions.php and shortcodes.php to a child theme.
I’ve added this code in CSS block of VC editor for the map:
http://storage2.static.itmages.com/i/15/0630/h_1435699838_4480450_839b5bb244.png
Please clear browser cache and check Contact page.
Regards,
Eva Kemp.
Hi Eva,
If I’ll just put these files in the child theme’s folder – would they simply overwrite the ones in the parent theme ? or do I need to edit them on every new Royal version ?
The map issue still not resolved. Please see, if you can, what was changed from vc 4.4.3{4.5.1 by now} & Ultimate Addons 3.4.9{3.11.1 by now} – that introduced this problem.
Let me know if you further need the credentials, else I’ll suspend them.
Best,
Ronen
Hello,
You just need copy the files to child theme folder in the same hierarchy as they are added in the parent theme. Create the same subfolders as in the parent theme where the files are located and then copy the files.
Please remove “Raw HTML” element that you added to Contact page and keep only Google Map element.
As I see you’ve commented the code and map is shown this way now:
http://storage2.static.itmages.com/i/15/0701/h_1435768715_4714838_bcfb130169.png
So please specify what the exact issue is and show us screenshots.
How can we replicate the problem?
Regards,
Eva Kemp.
Hi Eva,
The raw html is switching google map into hebrew – so I need to have it.
You removed it while working on the site and I still had the map issue.
To get the map to look like the image you sent – In the google map element settings width is set to 100% and overwrite width to ‘default width’ – that brings up a page width map.
I think that the issue is with rtl settings. Basically the map becomes full width and pulled hard to the left.
I managed to bring in back using margin (negative values) on the ultimate-map-wrapper element(see image below) BUT on the expense of responsiveness that went askew.
The map is loosing its “center” settings starting from the right main content edge and extends leftward (2nd image below) – though keeping the right width value.
We basically need to center the map again and maintain responsiveness. Since I have no idea on how the map in implemented and cannot query Ultimat Addons support (due to the fact that I got the plugin in the Royal package) – I addressed the issue to you.


Please your further advice,
Best,
Ronen
Hello,
Please check now.
Currently the map is shown this way: http://storage4.static.itmages.com/i/15/0702/h_1435822269_3434869_acd499d325.png
Regards,
Eva Kemp.
Hi Eva,
The map shifted a bit to the right but certainly not centered. a gig portion is still hidden on the left. You need to see the “Google” watermark on the left-hand bottom corner of the map in full width mode.
Best,
Ronen
p.s
Please keep me posted on every final changes so I’ll be able to use them in the future.
Hello,
I’ve added this code in CSS block of VC editor:
@media (min-width: 1900px) {.vc_custom_1435749935966 {
left: 385px !important;
}}
Clear browser cache and check now.
Regards,
Eva Kemp.
Hi Eva,
This fix works only for full wide screen, yet not responsive.
As screen width is reduced, even a notch, the map is off center again and loses content to the margins.
How can we keep the map in center regardless of width change ?
Best,
Ronen
The issue related to '‘Removing captcha from contact form’' has been successfully resolved, and the topic is now closed for further responses