MikaB Posted December 19, 2018 Report Share Posted December 19, 2018 Hello, I'm making my own Crewcenter for some VAs but I can't remove the Recaptcha as it says that it is outdated. When I remove it from the 'registration.php' in modules it gives me an error. Can someone help me? Thanks Quote Link to comment Share on other sites More sharing options...
smokey68 Posted December 19, 2018 Report Share Posted December 19, 2018 2 hours ago, MikaB said: Hello, I'm making my own Crewcenter for some VAs but I can't remove the Recaptcha as it says that it is outdated. When I remove it from the 'registration.php' in modules it gives me an error. Can someone help me? Thanks Not sure why you would want to remove it because you will receive spam accounts. but you need to set your google recapatcha keys in your local.config.php for v2 of recapatcha to work Quote Link to comment Share on other sites More sharing options...
MikaB Posted December 20, 2018 Author Report Share Posted December 20, 2018 But I get some errors after that.. Quote Link to comment Share on other sites More sharing options...
Rickisani Posted February 21, 2019 Report Share Posted February 21, 2019 But then I get some mistakes, ... that's the same with me, I have brought everything back into normal again, the page is displayed again. Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted February 22, 2019 Report Share Posted February 22, 2019 As mentioned above, the recaptcha key needs to go into the local.config.php file, but ALSO the Registration Form File, it will not work without changing the script you get from google in your Google account that points to the recaptcha key, period.........examples below; The file registraion_mainform.php also "NEEDS" this to be changed, this file lives in the core/templates , folder of your server.......This must match of course the key you put into the local.config.php file. Go towards the very bottom of the registration_mainform.php file, you will find the below example.........example of mine; <div class="form-group" style="display: flex;justify-content: center;"> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="YOUR API KEY FOR RECAPTCHA GOES HERE"></div> <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>"></script> </div> </div> <div class="footer text-center"> <input type="submit" class="btn btn-fill btn-danger btn-wd" name="submit" value="Register!" /> <!--change this to your skin for the buttons--> </div> </div> </form> DO NOT change anything in the core/modules Registration.php file, you will really have issues if you do. The only 2 files you need to change are the above mentioned, if your Recaptcha keys are correct according to your Google Account. Hope this helps, Jim........ Quote Link to comment Share on other sites More sharing options...
Rickisani Posted February 22, 2019 Report Share Posted February 22, 2019 if I understood correctly, will the code be replaced with yours? registration_mainform.php: <dt>reCaptcha</dt> <dd> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>"> </script> </dd> <dt></dt> <dd><p>By clicking register, you're agreeing to the terms and conditions</p></dd> <dt></dt> <dd><input type="submit" name="submit" value="Register!" /></dd> </dl> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.