Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

MOD: Form Image Verification (CAPTCHA) Rate Topic   - - - - -

 

Posted 10 December 2006 - 09:31 PM #21

Nice... got it :-)

Thanks!

Regards,
Scott

 
  • SWS
  • Senior Member
  • Members
  • Join Date: 30-Oct 06
  • 798 posts

Posted 10 December 2006 - 11:55 PM #22

Hi Nwsco

Thanks for this mod, will save me some time figuring it out myself...
Once again, appreciated ! ;)
[SIZE=3][/SIZE]

 
  • snorocket
  • Forum Janitor
  • Members
  • Join Date: 15-Mar 06
  • 2519 posts

Posted 12 December 2006 - 02:21 PM #23

I've noticed zip files mysteriously becoming corrupt recently...
SNOROCKET.COM, Now Accepting PRE-ORDERS:
Customer Service (Helpdesk) Addon for CS-Cart v4.3.1
Quote and Invoicing Addon for CS-Cart v4.3.1

 
  • chahinemm
  • Member
  • Members
  • Join Date: 09-Jan 07
  • 93 posts

Posted 13 January 2007 - 03:28 PM #24

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.

 

Posted 19 January 2007 - 05:25 PM #25

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

 
  • zardos
  • Senior Member
  • Members
  • Join Date: 08-Feb 06
  • 1062 posts

Posted 19 January 2007 - 10:14 PM #26

Hi macstudiodesign

This mod is for the "contact us" form.

 
  • Guray
  • Junior Member
  • Members
  • Join Date: 31-Oct 06
  • 21 posts

Posted 27 January 2007 - 04:08 PM #27

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

 

Posted 31 January 2007 - 03:27 AM #28

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

 
  • ZulloP
  • Member
  • Banned
  • Join Date: 15-Jan 06
  • 48 posts

Posted 03 April 2007 - 08:39 PM #29

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

 
  • chahinemm
  • Member
  • Members
  • Join Date: 09-Jan 07
  • 93 posts

Posted 05 April 2007 - 09:34 PM #30

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

chahine

 
  • chahinemm
  • Member
  • Members
  • Join Date: 09-Jan 07
  • 93 posts

Posted 05 April 2007 - 10:00 PM #31

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

chahine

 
  • chahinemm
  • Member
  • Members
  • Join Date: 09-Jan 07
  • 93 posts

Posted 06 April 2007 - 09:14 AM #32

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

 
  • crisje
  • Member
  • Members
  • Join Date: 24-Mar 07
  • 49 posts

Posted 11 April 2007 - 12:10 PM #33

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
1.34SP3
The DildoMan
any ideas and some help are always welcome!

 
  • Metatech
  • Junior Member
  • Members
  • Join Date: 19-Sep 06
  • 6 posts

Posted 17 April 2007 - 06:38 AM #34

Hi,

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

Any help would be appreciated.

See problem here

Thanks,
John

 
  • zardos
  • Senior Member
  • Members
  • Join Date: 08-Feb 06
  • 1062 posts

Posted 17 April 2007 - 07:26 AM #35

Hi Metatech

Check the captcha.php


//Background Image
$config['BackgroundImage'] = "./captcha.png";

And your captcha.tpl

<img src="../classes/captcha/captcha.php?cc1={php}echo md5($capcode)

the path could be,

<img src="/YOUR_DIR/classes/captcha/captcha.php?cc1={php}echo md5($capcode)

http://www.megapcs4u...name=contact_us

Hope that helps


 
  • Metatech
  • Junior Member
  • Members
  • Join Date: 19-Sep 06
  • 6 posts

Posted 17 April 2007 - 08:19 AM #36

Fixed it.

Thanks so much zardos!! :)

 
  • flitterbox
  • Member
  • Members
  • Join Date: 15-Jul 06
  • 32 posts

Posted 28 April 2007 - 08:36 AM #37

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.
James Mew

 
  • nwsco
  • Senior Member
  • Members
  • Join Date: 12-Sep 06
  • 372 posts

Posted 28 April 2007 - 01:48 PM #38

Ok, you're right. this needs to be added i think as well, so here it is:
(Quick & Dirty tested, as well as code)


CAPTCHA verification for discussion


STEP 1
--------------------------

Open skins/YOURSKIN/customer/addons/discussion/discussion.tpl
Go to around line 90, it should read:
{include file="buttons/button.tpl" but_text=$lang.submit but_onclick="javascript: document.add_post_form.submit();"}</td>
Delete this line, BUT KEEP THE </TD> ate the end of this line!





STEP 2
--------------------------

Around line 97 or so, you will see:
</table>

BEFORE, insert these 2 lines:

{assign var="captcha_discussion" value="true"}
{include file="forms_pages/captcha_discussion.tpl"}




STEP 3
--------------------------

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



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


{if $captcha_discussion ne "true"}

</table>
<p>

{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}

</tr><tr>
<td nowrap align="right">{$lang.captcha_descr} <span class="required-field-mark">*</span></td>
<td style="height: 23px;">
<img src="../../classes/captcha/captcha.php?cc1={php}echo md5($capcode);{/php}&cc2={php}echo substr(strrev($capcode),0,2).substr(md5($capcode),4,8).substr(strrev($capcode),2,2);{/php}&cc3={php}echo md5(strrev($capcode));{/php}" border="0" style="border:1px solid #cccccc" class="img_captcha"/>
<br>
<input type="text" class="input-text" style="width:137px;" name="capcode">
</td>
</tr>

<script type="text/javascript" language="javascript 1.2">
var cap_alert = '{$lang.captcha_warning}'; var cap = '%02%{php}echo substr(strrev($capcode),0,1);{/php}'+'%20{php}echo substr(strrev($capcode),1,1);{/php}'+'%23'+'{php}echo substr(strrev($capcode),2,1);{/php}%23'+'{php}echo substr(strrev($capcode),3,1);{/php}'+'%21';
{literal}
function isvalidCaptcha(f) { if (document.add_post_form.capcode.value.toUpperCase() != str_cap(cap)) { alert(cap_alert);document.add_post_form.capcode.select(); return false; } else { return true; } }
function str_cap(text) { text=str_doit('%20','',text);text=str_doit('%23','',text);text=str_doit('%21','',text);text=str_doit('%02%','',text); len=text.length; newtext=''; while(len>=0) { letter=text.charAt(len--); newtext=newtext+letter; } return newtext; }
function str_doit (search, replace, subject) { var result = ""; var oldi = 0; for (i = subject.indexOf (search); i > -1 ; i = subject.indexOf (search, i)) { result += subject.substring (oldi, i); result += replace; i += search.length; oldi = i; } return result + subject.substring (oldi, subject.length); }
document.add_post_form.onsubmit = "return isvalidCaptcha('add_post_form'));";
{/literal}
</script>

</table>
<p>
{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.......


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? ;) lol
Be my guest to merge the 2 files if you want to.......i see no reason 4 now.


 
  • tletourneau
  • Senior Member
  • Members
  • Join Date: 13-Apr 07
  • 179 posts

Posted 04 May 2007 - 05:29 PM #39

I've been saying it alot but here it goes again - great mod! Thanks to all involved for all the effort! :D
Thanks,
Tom
Version - 3.0.4
Hosting - RangeHosting.us

 
  • nwsco
  • Senior Member
  • Members
  • Join Date: 12-Sep 06
  • 372 posts

Posted 04 May 2007 - 06:03 PM #40

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!!!