Support Forums

ReCaptcha

This is a discussion on ReCaptcha within the TemplateCodes forums, part of the Third Party Support category; Gave it a try and got the following error: PHP Parse error: syntax error, unexpected '<' in /mywebsite/modules/recaptcha/libs/recaptchalib.php on line ...


Go Back   68 Classifieds Forums > Third Party Support > TemplateCodes

Reply
 
Thread Tools Display Modes
Old 11-14-2009, 12:27 PM   #11
Member
 
Join Date: Aug 2008
Location: Canada
Posts: 54
Rep Power: 7
freeze2 is on a distinguished road
Default

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?
__________________
Developer-v4.1.5 | Customized Theme
freeze2 is offline   Reply With Quote
Old 11-14-2009, 01:32 PM   #12
Member
 
Join Date: Aug 2008
Location: Canada
Posts: 54
Rep Power: 7
freeze2 is on a distinguished road
Default

Ok...was playing around and got 1 step closer:

I added the following to the very top of the recaptchalib.php file:

HTML Code:
<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.
__________________
Developer-v4.1.5 | Customized Theme
freeze2 is offline   Reply With Quote
Old 11-14-2009, 08:48 PM   #13
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,107
Rep Power: 51
seymourjames has a spectacular aura about
Default

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.
__________________
TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is offline   Reply With Quote
Old 11-14-2009, 09:16 PM   #14
Member
 
Join Date: Aug 2008
Location: Canada
Posts: 54
Rep Power: 7
freeze2 is on a distinguished road
Default

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...
__________________
Developer-v4.1.5 | Customized Theme
freeze2 is offline   Reply With Quote
Old 11-15-2009, 03:11 PM   #15
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,107
Rep Power: 51
seymourjames has a spectacular aura about
Default

Sorry I see a comment tag in the code - should be as I originally put

<?php
<script>
var RecaptchaOptions = {
theme : 'clean'
};
</script>
__________________
TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is offline   Reply With Quote
Old 11-15-2009, 04:44 PM   #16
Member
 
Join Date: Aug 2008
Location: Canada
Posts: 54
Rep Power: 7
freeze2 is on a distinguished road
Default

Yup...had caught that.

Gave it another try and still get the error...
__________________
Developer-v4.1.5 | Customized Theme
freeze2 is offline   Reply With Quote
Old 11-20-2009, 04:54 AM   #17
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,107
Rep Power: 51
seymourjames has a spectacular aura about
Default

Works for me. Not sure why you are getting that error.
__________________
TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is offline   Reply With Quote
Old 11-20-2009, 12:53 PM   #18
Member
 
Join Date: Aug 2008
Location: Canada
Posts: 54
Rep Power: 7
freeze2 is on a distinguished road
Default

...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.
__________________
Developer-v4.1.5 | Customized Theme
freeze2 is offline   Reply With Quote
Old 11-28-2009, 03:08 PM   #19
Junior Member
 
Join Date: Mar 2009
Posts: 12
Rep Power: 4
teggen is on a distinguished road
Default 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?

Quote:
Note: it will not work if it appears after the main script
__________________
Developer version 4.1.6 - TC Fluid template customised

Last edited by teggen; 11-28-2009 at 04:00 PM.
teggen is offline   Reply With Quote
Old 11-29-2009, 05:57 AM   #20
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,107
Rep Power: 51
seymourjames has a spectacular aura about
Default

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
__________________
TemplateCodes.com for 68 Classifieds, Matching WordPress Themes & Magento Online Stores
seymourjames is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
V4.1.x reCaptcha Module bollskis Modules / Plugins / Modifications 2 10-01-2009 04:21 PM
reCaptcha Module Eric Barnes Modification Release 5 12-19-2008 05:58 PM


All times are GMT -4. The time now is 05:48 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0