MOD: Form Image Verification (CAPTCHA)

Nice… got it :slight_smile:



Thanks!



Regards,

Scott

Hi Nwsco



Thanks for this mod, will save me some time figuring it out myself…

Once again, appreciated ! :wink:

I’ve noticed zip files mysteriously becoming corrupt recently…

This is a sweet little mod im setting up my site im looking forward to add some more security to cscart for me…



ill post the link soon for your taughts on some basic work.

i did everything like it said but it does not seem to work i go into register and it doesnt show any errors or anthing diffrent i did a test sighn up and it did not display any errors can someone please help

Hi macstudiodesign



This mod is for the “contact us” form.

how is see captcha picture because its error; if i think linux server error; how is write .htaccess code …

is there a way i can put this captcha by the registration from

thank you so much nwsco, about 1 hour ago I was getting 20 spam emails per hour… Thank you!!

i dont know if its in plan already but this little module could be added as default



chahine

well i installed this in my 1.3.4 script and got it to work perfectly… the question i have is what do i need to update or change to make it available in lets say the login screens.



thnx

chahine

Gents,



I finally moved/transfered my site to the right destination (other server)… but regarding to this MOD which it doesn`t work anymore…



I verified every step again without success, any ideas ?



BTW the link contains adult material!



www.dildoman.eu

Hi,



Installed it properly but the verification image doesn’t display.



Any help would be appreciated.



See problem here



Thanks,

John

Hi Metatech



Check the captcha.php





//Background Image

$config[‘BackgroundImage’] = [COLOR=Red]“./captcha.png”;



[COLOR=Black]And your captcha.tpl






the path could be,



[/COLOR][/COLOR][COLOR=Red][COLOR=Black]


[url]http://www.megapcs4u.co.uk/index.php?target=forms&name=contact_us[/url]



Hope that helps

[/COLOR][/COLOR]

Fixed it.



Thanks so much zardos!! :slight_smile:

This mod works great, many thanks. However I’m now starting to notice spam coming in from the discussion / ratings module on product’s page and would like to include the image verification there as well - anyone know how to do this?



I’ve tried updating the /addons/discussion/discussion.tpl file however with no joy. Any help would be greatly appreciated.

Ok, you’re right. this needs to be added i think as well, so here it is:

(Quick & Dirty tested, as well as code)





[SIZE=“4”]CAPTCHA verification for discussion[/SIZE]





[COLOR=“Red”]STEP 1

--------------------------[/COLOR]


[COLOR=“Green”]Open skins/YOURSKIN/customer/addons/discussion/discussion.tpl

Go to around line 90, it should read:

```php {include file=“buttons/button.tpl” but_text=$lang.submit but_onclick=“javascript: document.add_post_form.submit();”} ```Delete this line, BUT KEEP THE ate the end of this line![/COLOR]









[COLOR=“Red”]STEP 2

--------------------------[/COLOR]


[COLOR=“Green”]Around line 97 or so, you will see:

```php ```

BEFORE, insert these 2 lines:[/COLOR]

```php {assign var=“captcha_discussion” value=“true”}

{include file=“forms_pages/captcha_discussion.tpl”} ```







[COLOR=“Red”]STEP 3

--------------------------[/COLOR]


[COLOR=“Green”]Open notepad, or any other simple editor and

paste all the code below in there.

then save as file:

skins/YOURSKIN/customer/forms_pages and name it captcha_discussion.tpl[/COLOR]



```php

{* $Id: captcha.tpl 2007 nwsco $ *}





{if $captcha_discussion ne “true”}









{include file=“buttons/button.tpl” but_text=$lang.submit but_onclick=“javascript: document.add_post_form.submit();”}



{else}





{php} function generateCode() { $length = 4; $Code = “”; while(strlen($Code)<$length){ mt_srand((double)microtime()1000000); $random=mt_rand(48,122); $random=md5($random); $random = str_replace(“0”,“2”,$random); $random = str_replace(“O”,“P”,$random); $Code .= substr(strtoupper($random), 17, 1); } return $Code; } $capcode = generateCode(); {/php}





{$lang.captcha_descr}

























{include file=“buttons/button.tpl” but_text=$lang.submit but_onclick=“javascript:if (isvalidCaptcha(‘add_post_form’)) document.add_post_form.submit();”}





{/if}

```



Of course you need to have the initial Captcha-Mod installed to have this one working…



Voila.

It works fine here with me. If not in your case, please help each other out:

after all, i’m doing this for free as well…





[SIZE=“1”]p.s.

Of course i could have chosen for an integration in the existing captcha.tpl

instead of making a new tpl-file (captcha_discussion.tpl), but that would

take some 10+ steps to change, and i presume you’re all looking for the fast

way, right? :wink: lol

Be my guest to merge the 2 files if you want to…i see no reason 4 now.[/SIZE]

I’ve been saying it alot but here it goes again - great mod! Thanks to all involved for all the effort! :smiley:

you’re most welcome m8, and thx for your support!



unlike “flitterbox”, whom i especially did all this work for

to get it working in discussions as well, and he doesnt even reply!

jee…now that makes me think twice b4 doing thát for others again!!!

I’ve just installed the captcha mod, works perfectly.



Some issues that may need to be addressed :



“” creation once installed. I’ve got no idea what this is apart from a possible unclosed tag/javascript error.



Double submit buttons on the contact us cms pages.