Just a quick post to say many of the users of templatecodes are using Recpatcha for spam control. However the standard red color is pretty dominating and some might say awful. To give the ReCaptcha a neutral set of colors which are much more befitting you just need to uncomment this piece of code by moving it up above the */ <?php /* <script> var RecaptchaOptions = { theme : 'clean' }; </script> The code sits right at the top of the file in modules/recpatcha/libs/recaptchalib.php . Further styling can also be carried out if necessary: How to change reCAPTCHA colors - reCAPTCHA Wiki
How to change reCAPTCHA colors - reCAPTCHA Wiki . This is where the code comes from. It works fro me and a few of my customers. You must be doing something wrong (you have taken it out of the commenting haven't you). If you are using xampp then you are not on a live server but a local server setup!!! you cannot get the same behaviour. It even gives you this change in the actual module download (recaptcha/libs/recaptchalib.php). so if it is wrong then the wiki is wrong, the code supplied by recpatcha is wrong as well. <?php /* To make it clear <script> var RecaptchaOptions = { theme : 'clean' }; </script> * This is a PHP library that handles calling reCAPTCHA. * - Documentation and latest version * PHP CAPTCHA Library for reCAPTCHA * - Get a reCAPTCHA API Key * http://recaptcha.net/api/getkey * - Discussion group * reCAPTCHA | Google Groups * * Copyright (c) 2007 reCAPTCHA -- reCAPTCHA: Stop Spam, Read Books * AUTHORS: * Mike Crawford * Ben Maurer
You give no details and cannot be helped. Try to give details or what is the point in asking. And once again. If you are not on a live server, it may not work. Who knows what you are doing, what version of 68C you have , a screenshot or a link, etc.
For some reason, this code doesn't show up in my recaptchalib.php file. I downloaded Eric's module from: 68 Classifieds reCaptcha Module ? Eric Barnes According to the wiki...I should be able to add the code...would this go in the recaptchalib.php file? And if so, where in the file? Thanks!
OK I see now it is not included in Eric's download but it is part of the Wiki and standard download from ReCaptcha. Correct. Put it at the top. like this for example <?php <script> var RecaptchaOptions = { theme : 'clean' }; </script> /* bla bla */
Gave it a try and got the following error: PHP Parse error: syntax error, unexpected '<' in /mywebsite/modules/recaptcha/libs/recaptchalib.php on line 2 Any other thoughts?
Ok...was playing around and got 1 step closer: I added the following to the very top of the recaptchalib.php file: HTML: <script type="text/javascript"> var RecaptchaOptions = { theme : 'white' }; </script> This enabled me to change to any of the reCaptcha themes. The only problem now is that once the message is sent it adds that code to the top of the email confirmation page and screws up my css which in turn throws my site out of wack.
Add the code I gave to the top of the recaptchalib.php that Eric gives in his module. <?php /* To make it clear <script> var RecaptchaOptions = { theme : 'clean' }; </script> I see no reason if you have done that why it would do any of these things unless you have made changes elsewhere in your system. It worked for me the last time I tired it and id it for a customer. Not sure there is anything more I can add.
Yea...not sure why, but I always get that parse error when I do that: PHP Parse error: syntax error, unexpected '<' in /mywebsite/modules/recaptcha/libs/recaptchalib.php on line 2 The only thing I have done to the plugin is add my keys as per instructions...oh well, red template it is...
Sorry I see a comment tag in the code - should be as I originally put <?php <script> var RecaptchaOptions = { theme : 'clean' }; </script>
...one of those unexplainables... Not sure if you tried it on your demo site...would be interesting to see if it works normally there as well.
Getting the same error.. I am runing a modified version of Fluid, and getting the same error as well. Could it be because of the note found on reCAPTCHAwiki?
I see the issue. The script needs to come before the <?php Just tested and it works fine <script> var RecaptchaOptions = { theme : 'clean' }; </script> <?php /* * This is a PHP library that handles calling reCAPTCHA. * - Documentation and latest version * PHP CAPTCHA Library for reCAPTCHA * - Get a reCAPTCHA API Key * http://recaptcha.net/api/getkey * - Discussion group * reCAPTCHA | Google Groups * * Copyright (c) 2007 reCAPTCHA -- reCAPTCHA: Stop Spam, Read Books * AUTHORS: * Mike Crawford * Ben Maurer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * The reCAPTCHA server URL's */ define("RECAPTCHA_API_SERVER", "http://api.recaptcha.net"); define("RECAPTCHA_AP etc