-
Re: Captcha using TTF & GD
Hello.
I am not sure if there is any support for this mod , but here , i give it a try .
I downloaded the mod from zen cart site.( 1.38x)
installation was ok for contact up page. captcha showing up , i can redraw , but i don't need to enter validation to send email .. went through all the post , some had the same problem but no cure ..
if i leave all the text field blank on contact us and submit , i see warning massage relating to all fields including captcha .. thats all .
I tried captch_test.php, and there everything works.
any idea why validation wont required ?
thanks.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
Hello.
I am not sure if there is any support for this mod , but here , i give it a try .
I downloaded the mod from zen cart site.( 1.38x)
installation was ok for contact up page. captcha showing up , i can redraw , but i don't need to enter validation to send email .. went through all the post , some had the same problem but no cure ..
if i leave all the text field blank on contact us and submit , i see warning massage relating to all fields including captcha .. thats all .
I tried captch_test.php, and there everything works.
any idea why validation wont required ?
thanks.
As long as someone answers, the support is never dead...
Of coarse, we're bland as bats without links, info so on... so for a shoot in the dark, I say you missed one edit or did not upload captcha.php in the classes folder.
Also check the header_php.php files for the validation call.. like this one for 'contact_us'.
Code:
if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
$error = true;
$messageStack->add('contact', ERROR_CAPTCHA);
}
-
Re: Captcha using TTF & GD
Thanks.
I am using my developer server at home. sorry if there were no links ..
I did upload all the file. i checked , double checked for the files. the code you supplied was posted before , so i did also check for the code in the header_php.php and everything seems to be ok ..
didn't have any problem installing and showing captcha like many have had , is just Email can be send without entering validation .
I will try to reinstall it tonight again and see what happens. i might have missed something. :no:
Thanks.
-
Re: Captcha using TTF & GD
Hi ..
I reinstalled this mod , again, im back at same problem . no need for validation on contact Us page..
when i do test .. using captch_test.php, everything works fine.
i did configure few directive of apache , thinking those maybe the result , but logically , if it works on test , it should work on contact us , but i guess , validation code is somehow not inserted in correct location on the page.
any more info would be great .
thanks.
-
Re: Captcha using TTF & GD
Oh well, seems dead support on this mod.. is amazing that many had the same issue and it seems to find a way to solve it , but yet no one bothered to post the solution ..
contribution like this , should be removed from zen download section.
just my 2 cents:censored:
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
Oh well, seems dead support on this mod.. is amazing that many had the same issue and it seems to find a way to solve it , but yet no one bothered to post the solution ..
contribution like this , should be removed from zen download section.
just my 2 cents:censored:
The support isn't dead, the Author of this contribution a_berezin still continues to help out in this thread.
This contribution works fine for me and alot of others, try uninstalling it and reinstalling it again and follow the instructions thoroughly, doesn't hurt to read the thread over too.
Keep in mind, support here is free, others are using their own free time and patience to help everyone here. Not everyone can be answered immediately with a solution.
I have found that out, I was the same way. But I know am choosing to respect that now and be a lil more patient :)
another option is to post help in the commercial help thread, but you'd have to pay some $$
-
Re: Captcha using TTF & GD
Thanks.
I read through all the pages from page 1 to page 41 ..
I have installed , uninstalled , installed.
I have looked inside the codes.. not that i understand anything but i had to look upon others suggestion for missing code .
now , Either the script is not working , or my server is miss configured.
base on what i can find on my server , everything working just fine.
if i can use captcha test page to test and if it validates there . then server is fine.
zen cart , is serious program , and is for business and is not playground for kiddy scripters .. I appreciate efforts that are put toward making mods and making zen even better ..
but if anyone going to make efforts of writing something , they should at least make sure those things really work ..
not everyone pro with php, mysql and stuff . and not every server configured the same way .. so either do it right or don't do it.
most of the modes here looks just like puzzle .
:frusty:
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
Thanks.
I read through all the pages from page 1 to page 41 ..
I have installed , uninstalled , installed.
I have looked inside the codes.. not that i understand anything but i had to look upon others suggestion for missing code .
now , Either the script is not working , or my server is miss configured.
base on what i can find on my server , everything working just fine.
if i can use captcha test page to test and if it validates there . then server is fine.
zen cart , is serious program , and is for business and is not playground for kiddy scripters .. I appreciate efforts that are put toward making mods and making zen even better ..
but if anyone going to make efforts of writing something , they should at least make sure those things really work ..
not everyone pro with php, mysql and stuff . and not every server configured the same way .. so either do it right or don't do it.
most of the modes here looks just like puzzle .
:frusty:
The instructions are detailed, explains exactly what to do to step by step, if you don't understand the coding, or if you find this too difficult of a task to do, you can hire someone to do the code for you or rebuild the code to suit your needs.
-
Re: Captcha using TTF & GD: Install SQL Patches Copy/Paste
Quote:
Originally Posted by
a_berezin
In zen-cart 1.3.8a you can install install.sql using upload.
Not sure if I did something wrong, but once in Admin->Tools->Install SQL Patches, it did not seem to work using the *Upload* function. I had the file in a directory on my desktop and navigated to that file. I got an error message using that method, so I went back and used the copy/paste method we discussed a few posts back and it went through fine.
Thanks again Andrew, chrx
-
Re: Captcha using TTF & GD: Install SQL Patches Copy/Paste
Quote:
Originally Posted by
chrx
I had the file in a directory on my desktop and navigated to that file. I got an error message using that method
What's error you got?
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
mydanilo
I hear you. The captcha does insert in to the contact us once I enable it again but it only shows the
Enable this picture Redraw Capture Image
Verification code: * (case insensitive)
Just no captcha picture is showing up.
What gets me is that I installed the same thing on my other site and they are almost identical.:(
in file .htaccess add
Code:
RewriteRule ^captcha_img.php.html$ captcha_img.php [L]
-
Re: Captcha using TTF & GD
Hi! I added the version of this mod that is combined with the telephone not required on sign up. I also have swguy's Ask a Question mod installed and wondered if there was any chance of the captcha support being added for that?
I managed to get the captcha showing, but it doesn't validate it, i.e...the message still gets sent even if you don't fill out the captcha characters so I took it off again and I just don't know enough to know where I am going wrong LOL
**ETA I think I found something about this further back in the thread...my apologies for not reading first and I am off to try that LOL
-
Re: Captcha using TTF & GD
Working now, please ignore me, I really do know better to search first, just having a blonde morning LOL
-
Re: Captcha using TTF & GD
so what was the solution to the problem you had with captcha?
not validating
any info would be great .
-
Re: Captcha using TTF & GD
this is one I cannot get to work
have installed and uninstalled numerous times
have checked, double checked and triple checked that files all uploaded correctly
on contact us page ... if I leave every box blank and click submit I get the validation error as well as all the other errors (although they seem to show red error box twice for each error message ... except for validation error message .. which only shows once)
if I fill all boxes in except validation box then it still sends (even if I enter wrong validation code it still sends)
wondering if the code for checking the validation is in wrong place ?
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
so what was the solution to the problem you had with captcha?
not validating
any info would be great .
If you were replying to my post....as it says in the post my problem was related to getting the captcha to work with swguy's Ask A Question mod, of which I found the solution by using the Thread Tools at the top here, specifically Search This Thread with the keywords Ask a Question....beyond that if your problem is not to do with the other mod I cannot help, sorry :)
-
1 Attachment(s)
Re: Captcha using TTF & GD
give this a try. I remember I edited the header file
-
Re: Captcha using TTF & GD
Thanks romy .. i just downloaded your zip file , used the winmerg to compare with mine. yours uses the phone number and not mine .. but i notice missing ! before captchavalidate function .. and also , i guess major problem with not validating was that I renamed header_php.php to header_phpOLD.php.. well, it seems zen cart still load this php file along with new one .. not only it duplicates the error massages ( red box ) also is killing the captcha function .. so after removing it .. and adding " ! " , is working :clap:
im running on production server, installed under winxp with PHP5 + ..
Thanks again ..
-
Re: Captcha using TTF & GD
I know the feeling. It feel great when a problem is solved. Glad to help.
-
Re: Captcha using TTF & GD
is there SOME way to make the captcha code as actual words? i've seen that on other sites... seems like a neat way for a captcha.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
stevefriedman71
is there SOME way to make the captcha code as actual words? i've seen that on other sites... seems like a neat way for a captcha.
"captcha code as actual words"? Interesting idea. Give links to those sites.
I think about simple simple math question, like this - http://sw-guide.de/wordpress/plugins...am-protection/
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
a_berezin
"captcha code as actual words"? Interesting idea. Give links to those sites.
it isn't a zencart site but it shows what i mean...
https://www.greendotonline.com/contents/login.aspx
also, some game sites use something like that.
-
Contact Us page not working
I'm having a problem with the Contact Us page.
I seem to have installed the mod. correctly, and there are no other mods., etc., running on my site to cause conflicts.
Captcha works on the login function, and it works on the captcha_test.php file, but it doesn't work on the Contact Us page for my test shop.
The captcha IS appearing but it's not locking out users (Test dummy one - me) :smile:
This means that anyone can enter a message and hit send without completing the captcha and they'd be allowed to go ahead.
I'm running it on Zen 1.3.8a with no other problems (because I've locked everything else out).
I haven't made any modifications that I can recall on the Contact Us template page.
Any thoughts or suggestions?
:unsure:
-
Re: Contact Us page not working
worldmaker,
Only one suggestions - search for your error.
-
No function on Contact Us page
Thanks for responding.
It's a tricky situation, as it's working perfectly on login and on the captcha_test.php, which suggests the underlying function is okay. But as I mentioned the Contact Us page doesn't stop people.
Only thing I can think of is the I edited the html element of html_elements/define_contact_us.php, but none of the captcha files.
If there are no other alternatives I can either try reloading everything or just switch the contact us function off.
:cool:
-
Re: Captcha using TTF & GD
I had the same problem . you need to over ride the hearder_php.php with the one supplied by captcha .. that should work. ( look in pages/contact us / hearder_php.php )
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
I had the same problem . you need to over ride the hearder_php.php with the one supplied by captcha .. that should work. ( look in pages/contact us / hearder_php.php )
Thanks Tony, but I've done that three times, even deleting the one online to be certain the captcha one was uploaded.
Still got the problem with the Contact Us page.
:unsure:
-
Not working Tell A Friend, Contact Us......
Not working on Tell-A-Friend either.
Very odd.
Although I don't need it on Tell A Friend, I've enabled it there to see how it compares with Contact Us (not working) and Log In (working).
Log In does enforce the captcha protection but neither Tell A Friend nor Contact Us work.
Does anyone know if there is anything distinct about the special pages, apart from login? I wonder if this is a problem relating to all of them?
:unsure:
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
stevefriedman71
Looked. Why do you think that this is better than just a set of random characters?
And what do you think about the math question?
-
Re: Not working Tell A Friend, Contact Us......
worldmaker,
Maybe you have disable this in admin?
-
Re: Captcha using TTF & GD
Do you have SSL installed on your site ?
IF you enabled the captcha for tell a friend and other pages. and not working , try this ..
open captcha.php located in include / classes ..
on line 68 ish .. change SSL to NONSSL .. save and update with the one on your server , and see if it works.
if it didn't then change it back to SSL again to make sure everything is back to what it was.
PS. do you have a link to the contact us section of your site ?? might be able to figure out something from there.
-
Re: Contact Us not working
Tony,
Thanks for those thoughts, I did notice the SSL last night, but didn't know what to do with it, so now I've tried your amendment, but without success, LogIn still works on SSL and the Contact Us doesn't.
I've left the change in place if you want to look at it yourself.
Test Site is here: BonDevZone Marketplace
:unsure:
-
Re: Not working Tell A Friend, Contact Us......
Quote:
Originally Posted by
a_berezin
worldmaker,
Maybe you have disable this in admin?
Andrew,
Thanks for that, but the only item I had disabled in admin was Tell A Friend, which I then enabled last night to test it.
You can see for yourself if you have a moment here: BonDevZone Marketplace, and as you'll see I have tried Tony's suggestion without result.
:unsure:
I just know it's something really simple, but I don't know where to look.
:smile:
-
Re: Not working Tell A Friend, Contact Us......
worldmaker,
Can you send me /pages/contact_us/header_php.php and list of directory /pages/contact_us/*.*
-
Re: Captcha using TTF & GD
looking at your source file for contact us page.. some of captcha files seems to reside on folder called bdz and some in bdz_tests folder.
create proper template override in your bdz_tests folder and move all captcha files to that folder , and see if they work Ok ..
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
tony_sar
looking at your source file for contact us page.. some of captcha files seems to reside on folder called bdz and some in bdz_tests folder.
create proper template override in your bdz_tests folder and move all captcha files to that folder , and see if they work Ok ..
Tony,
bdz is the proper override folder for the test site, and all the correct files are already in place there. Obviously some of the captcha files are no capable of being overridden and I've replaced the original files with the captcha versions (yes, I did make backups first).
:unsure:
-
Re: Not working Tell A Friend, Contact Us......
Quote:
Originally Posted by
a_berezin
worldmaker,
Can you send me /pages/contact_us/header_php.php and list of directory /pages/contact_us/*.*
Andrew,
It's all on its way.
:smile:
-
Re: Contact Us and Tell A Friend not working
MANY thanks to Andrew, his suggestion worked perfectly.
Here's what I did "wrong".
When inserting the new captcha version of header_php.php I had preserved the original under the name header_php-ORIGINAL.php
THIS was the source of the problem.
Once the ORIGINAL was removed the captcha version worked perfectly.
:clap:
-
Re: Captcha using TTF & GD
Works fine except now most of my pages have the title Contact Us. Anyone know why?
-
Re: Captcha using TTF & GD
Nevermind, I accidentally uploaded something into the wrong folder.
-
Re: Captcha using TTF & GD
Hi to all, my captcha was working great until it stoped.I dont hnow why or wen.I have ZenCart 1.38a
I checked all the filles and fonts and they whare OK and i place.
Captcha in on every page but i get ENABLE THIS PICTURE and nothing shows up, not even on captcha_test.php or captcha_debug.php.
I installed the new version Captcha using TTF & GD 2-9, still the same problem.
I installed the older version again, still the same problem.
I have reverted to backups, still the same problem.
I have checked the server configuration and i have GD libraries enabled.
I dont know what else to check.I have tried everything from this thread.
Somebody has eny suggestions? any....:no:
Thanks, Zoli.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
lumpylumpy
Hi to all, my captcha was working great until it stoped.
Thanks, Zoli.
Zoli,
My first impression is that, if you did absolutely nothing to your store before the event, then you ought to look at your server/service provider and ask if they did anything to their server configurations.
Explain that you're using zen cart (they ought to be familiar with it) and see what they say.
From your post I wonder if you've tried a clean installation from your offline copy of the cart? You DO have a full copy of all your store's original files from before the problem?
:unsure:
-
Re: Captcha using TTF & GD
Hi worldmaker, i did not try a full backup off my shop, i have done that now and the captcha WORKS.
Now all i have to do is to search and compare.Since the backup i have done some customisation to my cart.
I am going to dig in to this now.....
THANK FOR THE TIP.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
lumpylumpy
Hi worldmaker, i did not try a full backup off my shop, i have done that now and the captcha WORKS.
Now all i have to do is to search and compare.Since the backup i have done some customisation to my cart.
I am going to dig in to this now.....
THANK FOR THE TIP.
Glad I could help.
The easiest way to deal with any upgrading is to use a test copy of your store, either online alongside your live store, or offline on a standalone PC. That saves a lot of problems when you do carry out a major change, or upgrade.
:smartalec:
-
Re: Contact Us page not working
Quote:
Originally Posted by
worldmaker
I'm having a problem with the Contact Us page.
I seem to have installed the mod. correctly, and there are no other mods., etc., running on my site to cause conflicts.
Captcha works on the login function, and it works on the captcha_test.php file, but it doesn't work on the Contact Us page for my test shop.
The captcha IS appearing but it's not locking out users (Test dummy one - me) :smile:
This means that anyone can enter a message and hit send without completing the captcha and they'd be allowed to go ahead.
I'm running it on Zen 1.3.8a with no other problems (because I've locked everything else out).
I haven't made any modifications that I can recall on the Contact Us template page.
Any thoughts or suggestions?
:unsure:
Worldmaker,
I had more-or-less the same problem and found this thread, which showed me what I did wrong:
http://www.zen-cart.com/forum/showth...CHA+validation
Basically, I re-named the old version of the pre-existing file, in its pre-captcha form to *filename_BAK.php*, to have it as a backup, while using the original *filename.php* for the new version of the file with captcha.
Removing that original, renamed file, so only the updated, captcha'd version was in the directory solved the problem. Now it works like a charm. Check out that thread shown above. If it does not help everyone, it deserves a review anyway, as it solved the problem for me!
Cheers, chrx
-
Re: Contact Us page not working
Quote:
Originally Posted by
chrx
Worldmaker,
I had more-or-less the same problem and found this thread, which showed me what I did wrong:
http://www.zen-cart.com/forum/showth...CHA+validation
Basically, I re-named the old version of the pre-existing file, in its pre-captcha form to *filename_BAK.php*, to have it as a backup, while using the original *filename.php* for the new version of the file with captcha.
Removing that original, renamed file, so only the updated, captcha'd version was in the directory solved the problem. Now it works like a charm. Check out that thread shown above. If it does not help everyone, it deserves a review anyway, as it solved the problem for me!
Cheers, chrx
Chrx,
Thanks for the thought, I'd done the same and only after advice from Andrew did I understand the problem and remove the backup copy of my original, unedited, file, but it's nice to know there are answers elsewhere too.
And if you do still want to keep the original unedited version of your .php file the answer is to rename it "(myfile).php.backup" or similar to stop it from being recognized as a functional .php file.
:blush:
-
Captcha User Intro
This morning I added "Captcha clarification" copy in an effort to help our site visitors who may not understand what they are looking at. Believe me, they are out there! Just added it to the Contact Us page at this point...
Here's what it looks like:
http://www.bhjdynamics.com/index.php...age=contact_us
Here's what I added to file
includes/templates/our_template/templates/tpl_contact_us_default.php:
------------------------------
// BOF Captcha
if(is_object($captcha)) {
?>
<br class="clearBoth" />
* ADDED THIS LINE --->* <?php echo '<br />' . INTRO_CAPTCHA . '<br /><br />'; ?>
* EDITED THIS LINE --->* <?php echo $captcha->img() . '<br /> ' . TEXT_CAPTCHA_REDRAW . ' '; ?>
<?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
<br class="clearBoth" />
<label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
<?php echo $captcha->input_field('captcha', 'id="captcha"') . ' <span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
<br class="clearBoth" />
<?php
}
// EOF Captcha
------------------------------
Here's what I added to file
includes/languages/english/extra_definitions/captcha.php:
------------------------------
* ADDED THIS DEFINITION --->* define('INTRO_CAPTCHA', 'In our effort to combat email spaming, BHJ now requires all contact emails to include verification. Please type the letters and numbers shown below into the verification code field.');
* ADDED THIS DEFINITION --->* define('TEXT_CAPTCHA_REDRAW', '(If this image is unclear, click the redraw button.)');
* EDITED THIS DEFINITION --->* define('TITLE_CAPTCHA', 'Enter verification code shown above:');
------------------------------
Just thought I'd post this, in case anyone else wants to tailor the user experience.
Cheers,
chrx
-
Re: Captcha using TTF & GD
Chrx,
Couldn't you have just added the formatted text to the tpl....php file? Saves having two files edited and the problems of keeping track of your edits?
:cool:
-
Re: Captcha User Intro
Quote:
Originally Posted by
worldmaker
Chrx,
Couldn't you have just added the formatted text to the tpl....php file?
:cool:
I'm just trying to stay within the established methodology of the ZC workspace.
Doing it the way I did will enable me to drop the same definitions into the other Captcha-edited templates (Tell A Friend, Reviews, etc.) and when I need to make a global copy edit, I can do it in the referenced language definition file only (captcha.php) and it will be reflected in all templates containing that definition. Beats having to manually edit every template.
Ahhh, dynamically-generated web pages!
Regarding keeping track of my edits - I add my name to the header of every ZC file I edit. Then, if I need to run an upgrade or archive all edited pages for any other reason, I just search for my name in Admin/Tools/Developers Toolkit and it shows everything.
Cheers, chrx
-
Re: Captcha User Intro
Quote:
Originally Posted by
chrx
Regarding keeping track of my edits - I add my name to the header of every ZC file I edit. Then, if I need to run an upgrade or archive all edited pages for any other reason, I just search for my name in Admin/Tools/Developers Toolkit and it shows everything.
Cheers, chrx
Ooooo, I LIKE that idea!
:D
-
Re: Captcha using TTF & GD
I finally got Captcha to work on all of my sites. I found the problem.
I had an empty enter, new line or space at the end of my english.php located in includes/languages/YOUR_TEMPLATE/english.php
This must have happened when I edited some lines for the footer customization. Hard to see with the editor. I just hit delete a few times at the end of the file and made sure no extra space or anything remains. If you have the same problem that there is no captcha, just the "Enable this picture" text, check out your english.php in your template override folder. Last thing in the file has to be just ?>
Don't know why this affected Captcha only but not the other customizations in the english file. All other customized text in the file worked just fine.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
mydanilo
I finally got Captcha to work on all of my sites. I found the problem.
I had an empty enter, new line or space at the end of my english.php located in includes/languages/YOUR_TEMPLATE/english.php
Interesting... I have spaces at the end of my english file and Captcha works! May be the editor is leaving something behind... I use Notepad++ for editing.
I did come across something the other day that may shed some light for some. I added some rewrites to my .htaccess file to stop hotlinking. Without thinking I added png to the list. After that, no captcha image would show. Removed png and it was back... I use png images for my layout and captcha so that shouldn't be a problem for me.
mydanilo -- Glad to hear you got yours worked out.
-
Re: Captcha using TTF & GD
Yea, I am glad too. :yes:
I use Notepad ++ too. I had issues before when editing files that there were some additional things left in it that I did not see, but they caused problems. Not sure how to prevent this....
I already set it to not do word wrap.
I saw the problem when I did a winmerge and compared with an out of the box english.php. Winmerge showed me that extra thing just before ?>.
-
Re: Captcha using TTF & GD
if i wanted captcha just on the contact us page... and i don't want to merge the captcha files with my current files... can i just upload the contact us files and NOT upload the other files?
should i also delete reference to the other files from the sql patch?
thanks.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
gsdcypher
if i wanted captcha just on the contact us page... and i don't want to merge the captcha files with my current files... can i just upload the contact us files and NOT upload the other files?
should i also delete reference to the other files from the sql patch?
thanks.
To the best of my understanding you can certainly limit the captch to the pages you want and ignore the rest, and you can leave the SQL untouched, so don't worry about having to edit it; but you will have to edit/replace the appropriate files for the pages where you do want to implement the captcha.
Set up a test copy of your site if you have the capability, and try it out there first.
:cool:
-
Re: Captcha using TTF & GD
Yes, you can just add captcha for your contact us page. that what i did on my site , I didn't even install the SQL patch .. it will work without the patch , but limit you to default number of chars on captcha , i think is 4 character by default.
-
Re: Captcha using TTF & GD
If you don't do the sql to setup the defaults, you can edit the class file and replace the variable defaults with what you want.
You also need to remove the IF statement in the tpl_ and Header pages for it to work.
if(is_object($captcha){
and the trailing }
Here's another tidbit... if you don't want Captcha for login customers, this is what I added...
In the header and tpl_ page replace the IF statement with this..
if(is_object($captcha) && (!$_SESSION['customer_id'])) {
If they are login, I don't drive them nuts trying to read a captcha image..
-
Re: Captcha using TTF & GD
thanks everyone...
i uploaded just the basic files and the contact_us files.
i installed the sql (unedited).
i have the captcha only on the contact us page.
i can edit the parameters via the admin.
and everything "seems" to be working.
Thanks!
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
davewest
if(is_object($captcha) && (!$_SESSION['customer_id'])) {
Yes, i did that too, should probably be better default.
Did anyone manage to code a snapshot if someone fails the matching code that they don't have to rewrite the whole form.
I want them just to retry the code and not redo the whole form again.
Thanks,
Jeroen
-
Re: Captcha using TTF & GD
Hello,
I wanted to add this option to my return authorization form. I have search for link with instructions..but couldn't find any... does anyone know how to get this to work with return authorization form? I tired but to no avail :(.
thanks nicole
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
nikki72
Hello,
I wanted to add this option to my return authorization form. I have search for link with instructions..but couldn't find any... does anyone know how to get this to work with return authorization form? I tired but to no avail :(.
thanks nicole
If it's the Return Authorization by Clyde, then for tpl_returns_default.php add the following, I placed mine just above the submit button..
Code:
<?php
// BOF Captcha
if(is_object($captcha) && (!$_SESSION['customer_id'])) {
?>
<br class="clearBoth" />
<?php echo $captcha->img(); ?>
<?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
<br class="clearBoth" />
<label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
<?php echo $captcha->input_field('captcha', 'id="captcha"') . ' <span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
<br class="clearBoth" />
<?php
}
// BOF Captcha
?>
Then for the header file in >modules/pages/retuns/header_php.php you need to add it in two places, first anywhere near the top this section of code..
Code:
//BOF Captcha
if((CAPTCHA_RETURNS != 'false') && (!$_SESSION['customer_id'])) {
require(DIR_WS_CLASSES . 'captcha.php');
$captcha = new captcha();
}
// EOF Captcha
$error = false;
I did mine just above this line..
Quote:
if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
Notice the CAPTCHA_RETURNS in the if statement, this turns it on or off through admin. if you don't do a SQL statement to add this, you'll need to change it to something else like CAPTCHA_CONTACT_US which has an admin control.
Look for this line
Quote:
if ($zc_validate_email and !empty($reason) and !empty($name)) {
replace it with the following code..
Code:
//BOF Captcha
if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
$error = true;
$messageStack->add('returns', ERROR_CAPTCHA);
}
// if ($zc_validate_email and !empty($reason) and !empty($name)) {
if ($zc_validate_email and !empty($reason) and !empty($name) and !$error) {
//EOF Captcha
To turn it on or off in admin.. add a sql statement using the Zen-Cart Sql Patches tool. Please backup your database before doing this... you never know when something will go wrong..
Code:
SET @configuration_group_id=0;
SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'CAPTCHA' LIMIT 1;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES
(NULL, 'Return Authorization', 'CAPTCHA_RETURNS', 'true', 'Activate Validation on Return Authorization', @configuration_group_id, 23, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');
Again... BACKUP before running the SQL statement.. I do my testing on a testing server before making any changes to a live site!
-
Re: Captcha using TTF & GD
worked like a charm! TY Nicole
-
Re: Captcha using TTF & GD
I usually make my Return Authorization form available only to registered users, but I have a current client who is insisting on Captcha even with this option activated.. So this is SWEEEEEEEEET!!! Thanks a bunch.. (BOOKMARKING THIS!!!)
Quote:
Originally Posted by
davewest
If it's the Return Authorization by Clyde, then for tpl_returns_default.php add the following, I placed mine just above the submit button..
Code:
<?php
// BOF Captcha
if(is_object($captcha) && (!$_SESSION['customer_id'])) {
?>
<br class="clearBoth" />
<?php echo $captcha->img(); ?>
<?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
<br class="clearBoth" />
<label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
<?php echo $captcha->input_field('captcha', 'id="captcha"') . ' <span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
<br class="clearBoth" />
<?php
}
// BOF Captcha
?>
Then for the header file in >modules/pages/retuns/header_php.php you need to add it in two places, first anywhere near the top this section of code..
Code:
//BOF Captcha
if((CAPTCHA_RETURNS != 'false') && (!$_SESSION['customer_id'])) {
require(DIR_WS_CLASSES . 'captcha.php');
$captcha = new captcha();
}
// EOF Captcha
$error = false;
I did mine just above this line..
Notice the CAPTCHA_RETURNS in the if statement, this turns it on or off through admin. if you don't do a SQL statement to add this, you'll need to change it to something else like CAPTCHA_CONTACT_US which has an admin control.
Look for this line
replace it with the following code..
Code:
//BOF Captcha
if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
$error = true;
$messageStack->add('returns', ERROR_CAPTCHA);
}
// if ($zc_validate_email and !empty($reason) and !empty($name)) {
if ($zc_validate_email and !empty($reason) and !empty($name) and !$error) {
//EOF Captcha
To turn it on or off in admin.. add a sql statement using the Zen-Cart Sql Patches tool.
Please backup your database before doing this... you never know when something will go wrong..
Code:
SET @configuration_group_id=0;
SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'CAPTCHA' LIMIT 1;
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES
(NULL, 'Return Authorization', 'CAPTCHA_RETURNS', 'true', 'Activate Validation on Return Authorization', @configuration_group_id, 23, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');
Again...
BACKUP before running the SQL statement.. I do my testing on a testing server before making any changes to a live site!
-
Re: Captcha using TTF & GD
Keep in mind that this line turns it off for log in customers.
Quote:
if((CAPTCHA_RETURNS != 'false') && (!$_SESSION['customer_id'])) {
If you wish to run it for all customers even log in ones, change it to this..
Code:
if (CAPTCHA_RETURNS != 'false') {
Glade it helped!
-
Re: Captcha using TTF & GD
Hi,
I was testing this on a clean install on my local server, and all was going well until I installed the "Display Inc/Ex Tax or VAT Prices" module. Now I get the "enable this picture" text instead of the image. I ran the captcha_debug.php, but it may as well be chinese.
Code:
captcha::__set_state(array(
'captchaCode' => 'K97W',
'captchaCode_length' => 4,
'img_width' => 240,
'img_height' => 50,
'img_type' => 'jpeg',
'chars_min_size' => 0.6,
'chars_max_size' => 0.8,
'chars_shadow' => true,
'chars_rotation' => 23,
'noise' => 30,
'backgroundColor' =>
array (
0 =>
array (
0 => 220,
1 => 220,
2 => 220,
),
1 =>
array (
0 => 255,
1 => 255,
2 => 255,
),
),
'linesColor' =>
array (
0 =>
array (
0 => 150,
1 => 150,
2 => 150,
),
1 =>
array (
0 => 185,
1 => 185,
2 => 185,
),
),
'textColor' =>
array (
0 =>
array (
0 => 30,
1 => 30,
2 => 30,
),
1 =>
array (
0 => 199,
1 => 199,
2 => 199,
),
),
'dir_fs_fonts' => 'C:/wamp/www/CLEAN MODIFIED SITE/fonts/',
'ttf_list' =>
array (
0 => 'C:/wamp/www/CLEAN MODIFIED SITE/fonts/VERDANA.TTF',
),
'max_try' => 5,
'failure_proc' => '',
'quality' => 60,
'chars' =>
array (
0 => '1',
1 => '2',
2 => '3',
3 => '4',
4 => '5',
5 => '6',
6 => '7',
7 => '8',
8 => '9',
9 => 'A',
10 => 'B',
11 => 'C',
12 => 'D',
13 => 'E',
14 => 'F',
15 => 'G',
16 => 'H',
17 => 'I',
18 => 'J',
19 => 'K',
20 => 'L',
21 => 'M',
22 => 'N',
23 => 'O',
24 => 'P',
25 => 'Q',
26 => 'R',
27 => 'S',
28 => 'T',
29 => 'U',
30 => 'V',
31 => 'W',
32 => 'X',
33 => 'Y',
34 => 'Z',
),
'_background' => NULL,
'img' => NULL,
'_gd_version' =>
array (
'GD Version' => 'bundled (2.0.34 compatible)',
'FreeType Support' => true,
'FreeType Linkage' => 'with freetype',
'T1Lib Support' => true,
'GIF Read Support' => true,
'GIF Create Support' => true,
'JPG Support' => true,
'PNG Support' => true,
'WBMP Support' => true,
'XPM Support' => false,
'XBM Support' => true,
'JIS-mapped Japanese Font Support' => false,
'version' => '2',
),
'debug' => true,
'img_href' => 'http://localhost/CLEAN MODIFIED SITE/captcha_img.php?zenid=cjr7niaienpcclr2hb9hmqqdb0',
'imageColorFunc' => 'imagecolorallocate',
))
Any suggestions on what could be the problem?
TIA
-
Re: Captcha using TTF & GD
I'm also having the "enable this picture" issue. I've uninstalled and reinstalled multiple times. I've read all the pages. I've updated my .htaccess. I'm fairly confident it isn't a coding issue, as I've replaced the MYTEMPLATE/account code with my archived code after determining that I don't need it (just want the contact_us).
When I run captcha_debug.php it bounces me to my home page. Does that mean there are no errors?
When I look at the code in Firebug I see the image is secure (https). That is strange.
Thanks in advance for the help.
-
Re: Captcha using TTF & GD
I also had the "enable this picture" problem, read the posts, tried different things and then realized- the captcha_img.php file needs to be uploaded to the root directory (or the same directory as /includes). :bangin:
That may be obvious to some, but not to a layman like me. The readme file doesn't mention it and I thought it was part of the other non-upload files like install.slq, update, etc.
Robbie
-
blank pages
Hi all,
I'm trying to install this module on the NEW site I'm building, and I seem to have buggered something up with the install. The contact us page and the tell-a-friend page both come up completely blank. I've tried to search through this thread to help solve the problem, but in all honesty I'm a bit lost.
And I feel pretty silly saying this but I don't know how to run a debug file or whatever it is...
I'm running several mods, FEC, COWOA, and a few others that I'd honestly have to go and look up to find. The test site is at w w w . t i f f s t r i n k e t s . c o m / f r d t e s t (sorry I don't want it indexed :P)
Now, it doesn't break the account creation page, but the tell a friend and contact us pages come up completely blank. Oddly enough, there was ALREADY a 'captcha' edit in the tpl_modules_create_account.php file that I had in there... I'm not sure why. I am (almost) 100% sure that I have not tried to install ANY captcha module on this test site yet... I've only been working on it for a couple of months now. I do have a pretty bad memory, but not THAT bad. :blink:
I have tested it on the create-account page, and I do have to input the characters to create an account, so I know that part of it, at least, is working. It's really the 'contact us' page that I'm most worried about; I get the most problems from that page.
If anybody can help, I'd really appreciate it. Thanks all! :unsure:
-
Re: Captcha using TTF & GD
Nevermind, everyone. ... :oops:
I had renamed the captcha files in a way that the page was still loading them, and it broke it.
(more detailed explanation: I had made all of my edits but kept the original mod files, just renamed them as header_php.captcha.php etc. so I had the untouched mod files if I needed them, but this rename wasn't quite enough! I changed it to captcha.header_php.php or somesuch and now my page works again...)
Whew! :bigups:
I always seem to figure out my own problems RIGHT after I make a forum post about it... :)
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
misticloudz
I always seem to figure out my own problems RIGHT after I make a forum post about it... :)
Always helps to talk it through.... also, file renaming for backups. Best to remove them to a backup set of your store or just remove the extension '.php' change it to something like'.bak' or '.old'. leaving the '.php' even renaming the file can lead to more problems.
-
Re: Captcha using TTF & GD
Hi,
I installed this mod, could see Captcha on the "Tell A Friend" Page, however cannot see it on the "Create Account Page"
I have rechecked the Modules and Templates folder twice, Where can I be wrong, any help will be appreciated.
The Sql has been installed, and the configuration page says "Yes" while testing for "Create Account" page
-
Re: Captcha using TTF & GD
Haven't seen this mentioned anywhere so I thought I would see if it had a solution. The captcha doesn't display the code (it's a broken image link) if either Customer Approval Status - Authorization Pending or Customer Shop Status - View Shop and Prices are set to 1 (must be authorized to browse) and/or (must login to browse). Seems to work on any of the other settings.
I did think of a use for that broken link.
If you only want the add customer through admin to be used to create an account, then either of those will definately stop them in their tracks! Actually, a pixel_trans.gif renamed to button_create_account.gif works better, but why be picky?
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
harry2cool
Hi,
I installed this mod, could see Captcha on the "Tell A Friend" Page, however cannot see it on the "Create Account Page"
I have rechecked the Modules and Templates folder twice, Where can I be wrong, any help will be appreciated.
The Sql has been installed, and the configuration page says "Yes" while testing for "Create Account" page
Weird, I see it on my create account, tell-a-friend and contact us but not on the login (split screen mode). It's optioned in the config for the login but does not show. Wasn't planning on using it there, but....
-
Re: Captcha using TTF & GD
I'm using version 2.9 of this mod and all of a sudden (not sure how long this has been going on) my login and contact us pages are completely blank.
I used the Debug Error Logging Utility and this is the error that appears:
PHP Fatal error: Call to a member function close() on a non-object in /home/saraspix/public_html/mypixelprints.com/includes/classes/captcha.php on line 341
I haven't edited this file since I installed the mod (back in January) so I have no clue what's going on. I have turned off the CAPTCHA on for now but I really REALLY need this mod as I get swamped with spam if I don't have something to stop the bots.
Thanks in advance for any help on this :)
-
Re: Captcha using TTF & GD
Hi, thanks for such a great mod to zen cart.
I have the mod installed as per the instructions and I can see the captcha image on the appropriate pages on the store however I do not have the Admin > Configuration > Captcha option?
Can any one offer help as to why this may be or what I have missed? I have triple checked the instructions and what I have done and I am darn if I can see what i have did wrong or missed as to why I do not have the Captcha appearing in the Configuration menu.
You can see the site at www.missesbeehaven.com/shop/index.php
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
missesbeehaven
Hi, thanks for such a great mod to zen cart.
I have the mod installed as per the instructions and I can see the captcha image on the appropriate pages on the store however I do not have the Admin > Configuration > Captcha option?
Can any one offer help as to why this may be or what I have missed? I have triple checked the instructions and what I have done and I am darn if I can see what i have did wrong or missed as to why I do not have the Captcha appearing in the Configuration menu.
You can see the site at
www.missesbeehaven.com/shop/index.php
What comes to mind is the patch. If it was inserted correctly then you should have a Captcha option added to the end of your configuation tab.
If you missed that, just open install_captcha.sql with notepad, do a select all and copy/paste it with the tools option. if you upgraded from an earlier version, you may want to try the version specific sql patch.
Hope it is as simple as that!
If you did the patch, then pleasee disreard my reply.:smile:
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
sara*spixels
I'm using version 2.9 of this mod and all of a sudden (not sure how long this has been going on) my login and contact us pages are completely blank.
I used the Debug Error Logging Utility and this is the error that appears:
PHP Fatal error: Call to a member function close() on a non-object in /home/saraspix/public_html/mypixelprints.com/includes/classes/captcha.php on line 341
I haven't edited this file since I installed the mod (back in January) so I have no clue what's going on. I have turned off the CAPTCHA on for now but I really REALLY need this mod as I get swamped with spam if I don't have something to stop the bots.
Thanks in advance for any help on this :)
My best guess (don't think it would actually qualify as help though):
Since line 341 in the classes/captcha.php is
function _get_gd_version() {
I am led to believe that gd library is not either installed on your server, is broken, or some parameter has been changed.
Most hosts will let their users see that info, so if you can verify that gd lib is there, and if it is, then I would check with your host. They may have done an upgrade and haven't tweaked it yet.
If anyone has a better suggestion, please let us know!
-
Re: Captcha using TTF & GD
haello,
use sql in ur database. then it works correct!
greetz
-
Re: Captcha using TTF & GD
Dennis,
Thanks for the reply...but what is the gd library??
How do I know if it's there or missing?
Thanks!
-
Re: Captcha using TTF & GD
Also I have two Zen Carts, both on the same servers, both run with this mod...one is working just great and this one isn't. What could that mean??
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
awhfy99
My best guess (don't think it would actually qualify as help though):
Since line 341 in the classes/captcha.php is
function _get_gd_version() {
I am led to believe that gd library is not either installed on your server, is broken, or some parameter has been changed.
Most hosts will let their users see that info, so if you can verify that gd lib is there, and if it is, then I would check with your host. They may have done an upgrade and haven't tweaked it yet.
If anyone has a better suggestion, please let us know!
Got things sorted out thanks for the help. Turns out that the Admin Profile mod I have installed was the cause. I had to change my admin user permissions and tick the CAPTCHA box and all was good after that. Thanks again for the help.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
awhfy99
Haven't seen this mentioned anywhere so I thought I would see if it had a solution. The captcha doesn't display the code (it's a broken image link) if either Customer Approval Status - Authorization Pending or Customer Shop Status - View Shop and Prices are set to 1 (must be authorized to browse) and/or (must login to browse). Seems to work on any of the other settings.
I did think of a use for that broken link.
If you only want the add customer through admin to be used to create an account, then either of those will definately stop them in their tracks! Actually, a pixel_trans.gif renamed to button_create_account.gif works better, but why be picky?
Anyone got ideas on how to get the image to display if (as Dennis points out above) the Customer Approval Status - Authorization Pending or Customer Shop Status - View Shop and Prices are set to 1 (must be authorized to browse) and/or (must login to browse).
I need the restrictions on access, but I ALSO need captcha...
-
Captcha worked for a while, then stopped
I had this up and running fine for about a month and did not add or remove any other mod since then. And now all of a sudden I notice the images no longer appear. I have a new computer with all the latest browsers and it's the same problem in all.
I deleted all the Captcha files and uninstalled the SQL patch and then re-loaded everything and copied in the install.sql. And the problem persists. I don't know what else to try and didn't see a similar issue in the forum.
My only suspicion is that the image source seems to be on the secure server, https. (I saw this by copying the source of the blank image space.)
Does that mean anything? Any help would be appreciated.
alexandergifts.ca
ZC 1.38a
Cheers,
Robbie
-
Re: Captcha using TTF & GD
Check php-scripts in the presence of extra lines and spaces.
Take this script, unzip it, upload it to a root directory and running it.
-
Re: Captcha using TTF & GD
That worked!! It found 8 with space at the bottom, I adjusted them myself, it still showed 3 with space and then I used the built-in fixer.
Thanks a lot!
R
-
Re: Captcha using TTF & GD
I've installed captcha_ttf v2.9 on a fairly basic zen-cart 1.3.8a installation and it almost works, except the image is always blank.
I've read through this thread (49 pages!) and I see lots of other people with the same problem, but none of the solutions work for me.
I've tried removing all backup files, disabling .htaccess temporarily (I'm not using SEO or any other mods), disabling SSL temporarily, checking for extra lines and spaces, checking that the fonts file is found and so on. There are no errors in the log. I'm on PHP v5.2.6 (Zend 2.2.0) in "apache" mode.
There's one interesting thing I don't understand - if I run captcha_test.php then right-click on the blank image and view it using IrfanView (for example) I can see the image. But that only works in jpeg mode - in png or gif mode I get "invalid header". The image never displays in firefox or IE (latest versions).
My captcha_test with the above symptoms can be seen at http://skeptic.org.uk/inquirer/captcha_test.php if that helps. (The captcha in the main store is disabled for obvious reasons.)
--
Phil McKerracher
www.mckerracher.net
-
Re: Captcha using TTF & GD
Yes, you have a bad header in the image file. Some files have a BOM - find and remove it.
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
a_berezin
Yes, you have a bad header in the image file. Some files have a BOM - find and remove it.
Hmm. The image file is purely generated by the script though, isn't it? So how can I stop the script doing this? I can't see any BOM in any of the source files, but it's possible the editor is hiding it.
I thought it might be a UTF-8 issue, but I couldn't find any setting for charset in Zen-Cart. Am I missing it?
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
philmck
I can't see any BOM in any of the source files, but it's possible the editor is hiding it.
Yes, the editor is hiding it. Use my script to find the bad files.
-
Re: Captcha using TTF & GD
Aha! That has fixed it, many thanks. I had run your script but hadn't realised the BOMs had to be removed (as well as blank space).
Does anyone have suggestions to avoid this problem affecting people in future?
(Also, how did the BOMs get there in the first place, and why do they only affect the captcha script?)
Also, what is the "built-in fixer" that giftmeister refers to?
-
Re: Captcha using TTF & GD
I have no idea what is going on but I cant get this thing to pull the fonts file. It just displays small text. I guess its no big deal because it works but its pretty hard to read. I have been searching the forums all day with no luck. Any help is appreciated.
http://palmettomattress.com/index.ph...r_of_uploads=0
-
Re: Captcha using TTF & GD
I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?
Thanks!
John
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
ethical
I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?
Thanks!
John
Keep digging for the answer I'm sure it is possible, but it's been so long since I came on the answer that I can't remember where I found it.
:blush:
-
Re: Captcha using TTF & GD
Quote:
Originally Posted by
ethical
I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?
Yes, in admin/configuration/CAPTCHA set the "Contact us page" and "Tell A Friend page" options to true.
-
1 Attachment(s)
Re: Captcha using TTF & GD
Hmmm..:frusty:
Ive installed the "Captcha using TTF & GD" module on my Windows LocalHost test machine. Alas.. she no worky.
I followed instructions explicitly, but my site will not show the images on the validation pages ! ReDraw dont help.
My cart uses PHP 5. with database prefix"zcprefix_" (not the actual name).
Ive installed the SQL seq as per instruction.
Attached image ... contact_Us example
The Log-In page shows no CAPTCHA data at all.
All admin>CAPTCHA options are set to true as installed.
Can anyone please help? I have big problems with SPAMBots and MUST fix this asap !
Is my prefix causing sql problems, I changed nothing in install.sql ?
Cheers
-
Re: Captcha using TTF & GD
I may have not followed instructions properly...
It looks like there are 8 files I need to edit ????? !!!
I assumed that these files did not need to be edited as the my existing files are all unchanged from the original install.
Do I still need to edit these files?:shocking:
Quote:
Originally Posted by
remoteone
Install:
========
0. BACKUP! BACKUP! BACKUP! BACKUP! BACKUP! BACKUP!
1. Unzip and upload all new files to your store directory;
2. EDIT:
Use applied files as a sample. All changes of a code are made in brackets
// BOF CAPTCHA
... code ...
// EOF CAPTCHA
/includes/modules/pages/contact_us/header_php.php
/includes/modules/pages/links_submit/header_php.php
/includes/modules/pages/tell_a_friend/header_php.php
/includes/modules/YOUR_TEMPLATE/create_account.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_links_submit_default.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_contact_us_default.php
/includes/templates/YOUR_TEMPLATE/templates/tpl_tell_a_friend_default.php
-
Re: Captcha using TTF & GD
Well after installing CAPTCH ttf on my local windows server, and re-booting, clearing the cache etc etc etc. CAPTCHA still would not show the Validation Image.
Then several days after installing it just started working! even tho I made no changes. Go figure that out? !
So I uploaded and SQL patched to my live site and I get the same problem. :
Instead of a Validation Image, I get a box that says: "enable this picture"
How can I fix this please ?:frusty:
-
Re: Captcha using TTF & GD
Ok its working.
I found that on both my localhost and my live Linux host that started to work only after running the tesy and/or debug files.
*captcha_test.php ,captcha_debug.php and/or captcha_img.php"
Not sure wich one triggered it to start working, but it just would not work until I broused to those files.
No mention of that in the Install Text.
http://www.remoteone.com.au
-
Re: Captcha using TTF & GD
Hi,
I am using version 2.9.
Congratulations on this mod, very well done, worked first time apart from the sql would not run in zen admin without an error, fine in phpmyadmin though.
I have found two minor validation errors, I could not find any reference to them in the thread so,
in classes/captcha.php
there are two unencoded ampersands.
1)
change this line:
Code:
$image = '<img id="captcha-img" src="' . $this->img_href . '&rand=' . str_replace(' ', '', microtime()) . '" alt="' . $alt . '"';
to this:
Code:
$image = '<img id="captcha-img" src="' . $this->img_href . '&rand=' . str_replace(' ', '', microtime()) . '" alt="' . $alt . '"';
2)
change this line:
Code:
$redraw = ' onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
to this:
Code:
$redraw = ' onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';
regards
Steve
-
Re: Captcha using TTF & GD
Hi all,
I was trying to decide on a captcha addon and initially installed captcha number subject in 1.0 and was having trouble getting it to work. There is no support thread and I have not seen it mentioned much on the forums, so I decided to change.
Captcha using ttf & gd has some got some great remarks so I decided to change to that one.
After I ran the uninstall for the previous addon, I went to work on installing Captcha using ttf & gd, all went smooth!
However I do have an error:
Fatal error: Call to a member function close() on a non-object in /home/autoXXX/public_html/includes/classes/captcha.php on line 341
Does anyone know what this is? Any ideas/solutions are greatly appreciated. Thanks.