Jump to content

Secure Image in CONTACT FORM - whit Captcha


p1r4t0s

Recommended Posts

hello :) this can not be more easy XD.

first .... everything is based on:

http://www.phpcaptcha.org/documentation/

Profundis ally if you want more you can find out more.

^_^

STEPS TO INSTALL SECUREIMAGE:

1 .- i cant attach file :( but dont worry,
download archives here: http://todoprestashop.com/foro/download/file.php?id=297

2 .- Upload the entire contents of the folder "captcha" in the directory:
"yourshop/themes/prestashop"

3 .- In the "Replace" to replace the "contact-form.php" in
the directory where you installed your shop is:
"yourshop/contact-form.php"

4 .- In the "Replace" to replace the file "contact form.tpl" in
directory: "yourshop/themes/prestashop" ie:
"yourshop/themes/prestashop/contacts form.tpl"

5 .- Now customize the error message when you put a bad image
Capcha security (that need your help hans)

good form and if they prove they are wrong intentionally summer
I get the error that was destined to contact .... because that happens in
my case there is only one contact, and use that mistake in translation and change it
for if they do not place an image ... mmmm but it happens
not well !!!

the right thing to do would be to create a single error when the wrong place
image but HOW? is my question. I believe we have to insert a table in DB and
More recently, but i need learn more about Prestashop: (

PS: to change the error message has to go to the back office and
Translations enter ERRORS, and find translations of the error "please
select a contact in the list and change it to "incorrect image nusty " xD

grettings,
p1r4t0s

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...

[résolu]
bonjour a tous
je viens d'installer "captcha-prestashop.zip" mais j'ai un petit soucis - l'image n'apparait pas (voir fichier joint) - je pense que c'est lié au répertoire d'install de prestashop que je n'ai pas mis à la racine mais dans le répertoire "boutik".

Quelqu'un peut il me dire quel fichier modifié pour visuliser les CAPTCHA.

merci d'avance

j'ai trouvé la solution >> http://www.prestashop.com/forums/viewthread/11854/#53890

5164_iYCJKKwM295IrKxYKMaL_t

Link to comment
Share on other sites

  • 3 weeks later...

You do not want registration forms to use a captcha.It leads to shopping cart abandonment
What you DO want is a SIMPLE registration that takes as little time as possible and has as few steps as possible. Thats what PS has right now.

--Kevin

Link to comment
Share on other sites

Mandrake,

I have installed the latest captcha module and am having some problems in my Prestashop v1.1.0.5 testshop.
After copying across all the files, I go to my shop. When clicking on 'contact' I get:-
Parse error: syntax error, unexpected T_VARIABLE in /home/xxxxxx/public_html/xxxxxxxx.com/Shop/testshop/contact-form.php on line 1

(obviously with the x's being replaced by the correct path to an existing file.


Any ideas please?

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

i've all done with instruction from first post, but i dont have any Captcha Picture at all. just a plain "Send message form".
if i'm right, captcha catalog should be placed in modules directory, right? if so...
contact-form.php should have...

include(_PS_MODULE_DIR_.'/captcha/securimage.php');


in oryginal file is...

include(dirname(__FILE__).'/captcha/securimage.php');


without it "send message form" is blank.
any clue?

Link to comment
Share on other sites

Bonjour,

Est ce que quelqu'un la tester en local cette modification ? Car si l'installation ne pose aucun problème (le répertoire captcha à la racine, remplacement de contact-form.php également à la racine et enfin remplacement du contact-form.tpl dans le repertoire de notre theme), jusque là tout est ok. Le formulaire s'affiche bien mais pas le captcha. Je n'ai pas une "image cassée", je n'ai absolument rien qui s'affiche à l'endroit captcha.

Peut-être que le script nécessite une librairie qui n'est pas chargée de base dans xampp (package mysql+apache+ ...), bref j'en sais rien.

Merci d'avance.

Note: Je précise bien en local car en prod sur mon serveur (ovh) cela fonctionne.

Link to comment
Share on other sites

No Work for me. :-S

My Installation

1.-delete "contact-form.php" of www.mydomain.com/contact-form.php

2.-delete "contact-form.tpl" of www.mydomain.com/themes/prestashop/contact-form.tpl

3.-Upload "captcha" whit all files to www.mydomain.com/themes/prestashop/captcha

4.-Upload new file"contact-form.tpl" in www.mydomain.com/themes/prestashop/contact-form.tpl

5.-Upload new file "contact-form.php" of www.mydomain.com/contact-form.php

that I am making bad :question:

Help me Sr.Mandrake


Version 1.1.0.5

Link to comment
Share on other sites

  • 2 weeks later...

Hi

module was not work for me, i modified some code and it's now working (for me)

so i wanna share maybe it can be useful for someone


How to install

1. Modify 'contact-form.php' line 15, put your website url instead 'yourwebsitename' and save file

'captid' => 'http://yourwebsitename.com/captcha/securimage_show.php?sid='.md5(uniqid(time()))


2. Upload folder 'captcha' to your public_html directory (root directory)

3. replace 'contact-form.php' in your public_html directory (root directory)

4. replace 'contact-form.tpl' in your shop theme directory

done!!


Note: re-attached file

captcha.zip

  • Like 1
Link to comment
Share on other sites

Ying,
I keep getting an "invalid message" error every time I try to submit the form after installing your Captcha. It was working fine before. I thought I might not have entered the Captcha sequence correctly at first, but this is happening every time I try.

7832_jUhw2s95C6bDAcbngr5j_t

Link to comment
Share on other sites

Ying,
I keep getting an "invalid message" error every time I try to submit the form after installing your Captcha. It was working fine before. I thought I might not have entered the Captcha sequence correctly at first, but this is happening every time I try.


Hi JWToups,

I just re-attached file 'captcha.zip'
first time i attached, one file was missing from folder 'captcha', my mistake :(

try to download new file i attached above and re-upload captcha folder again, i guess your error message will be gone

it's work perfectly on my website
Link to comment
Share on other sites

Thanks for checking it out. The only issue is that it's working perfectly in Internet Explorer, but I'm still getting the same error as before in Firefox. Odd.


umm.. i tested it on IE, FF and Chrome
it's working

try to clear browser cache and test again

i think this captcha is needed, i've got spam via contact form many times
hope next version of presta will include it
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
try to write someting in the menssage.

and read the post # 47 and # 50


This message is being re-used to indicate that the Captcha response was incorrect. I tried editing this to something more friendly like "Incorrect Captcha entry, please try again" but then got the "Error: mail parameters are corrupted" message when entering the contact form because that error message did not exist. Looking into how to either add that to the list of error messages or changing the updated contact-form.php.
Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...

It doesn't work at all for me. Invalid message every time.

I compared the two versions and they are quit different.

ORIGINAL:

<?php

$useSSL = true;

include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/header.php');

$errors = array();

$smarty->assign('contacts', Contact::getContacts(intval($cookie->id_lang)));

if (Tools::isSubmit('submitMessage'))
{
   if (!($from = Tools::getValue('from')) OR !Validate::isEmail($from))
       $errors[] = Tools::displayError('invalid e-mail address');
   elseif (!($message = nl2br2(Tools::getValue('message'))))
       $errors[] = Tools::displayError('message cannot be blank');
   elseif (!Validate::isMessage($message))
       $errors[] = Tools::displayError('invalid message');
   elseif (!($id_contact = intval(Tools::getValue('id_contact'))) OR !(Validate::isLoadedObject($contact = new Contact(intval($id_contact), intval($cookie->id_lang)))))
       $errors[] = Tools::displayError('please select a contact in the list');
   else
   {
       if (intval($cookie->id_customer))
           $customer = new Customer(intval($cookie->id_customer));
       if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from)))
           $smarty->assign('confirmation', 1);
       else
           $errors[] = Tools::displayError('an error occurred while sending message');
   }
}

$email = Tools::safeOutput(Tools::getValue('from', ((isset($cookie) AND isset($cookie->email) AND Validate::isEmail($cookie->email)) ? $cookie->email : '')));
$smarty->assign(array(
   'errors' => $errors,
   'email' => $email
));

$smarty->display(_PS_THEME_DIR_.'contact-form.tpl');
include(dirname(__FILE__).'/footer.php');

?>

Link to comment
Share on other sites

  • 9 months later...
  • 2 months later...
  • 4 months later...
  • 2 years later...

Hi

 

module was not work for me, i modified some code and it's now working (for me)

 

so i wanna share maybe it can be useful for someone

 

 

How to install

 

1. Modify 'contact-form.php' line 15, put your website url instead 'yourwebsitename' and save file

 

 

 

2. Upload folder 'captcha' to your public_html directory (root directory)

 

3. replace 'contact-form.php' in your public_html directory (root directory)

 

4. replace 'contact-form.tpl' in your shop theme directory

 

done!!

 

 

Note: re-attached file

Thx, it work well on presta 1.4 ! =)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...