Author Topic: Tutorial - Hidden Captcha for Product Inquiry (Ask a Question) to Reduce Spam  (Read 5477 times)

markvding

  • Beginner
  • *
  • Posts: 3
Are you sick and tired off receiving those spam messages in your mailbox which look like regular product inquiries? Then I have got the solution for you. Now Joomla! 1.5 and VirtueMart 1.1.19 are no longer actively support, I see an increase off spam on my customers webshops. Reducing the spam is possible by making some minor changes to your virtuemart files.

Effected files:
/administrator/com_virtuemart/classes/ps_communication.php
/components/com_virtuemart/themes/YOURTEMPLATE/templates/pages/shop.ask.tpl.php
/templates/YOURTEMPLATE/css/template.css


Around line 130 in ps_communication, right after:

Code: [Select]

global $vmLogger,  $Itemid, $_SESSION, $VM_LANG,$mosConfig_live_site,$mosConfig_lang, $sess;


add:

Code: [Select]

if(!empty($_POST['kaasvlinder'])) {
// it's spam
} else {
// a real user is asking for more info


Next, in your shop.ask.tpl.php file, add the following lines around line 32 / 33:

Code: [Select]
<label for="kaasvlinder" class="kaasvlinder">Are you a human? Then please let this empty</label>
<input type="text" name="kaasvlinder" id="kaasvlinder" class="kaasvlinder" />

In your stylesheet, please add

Code: [Select]
.kaasvlinder { display: none; }


That's it! Happy coding!

endorfin_kaan

  • Beginner
  • *
  • Posts: 1
where the following code to implement them? (template.css ,index.php ?)

In your stylesheet, please add

Code: [Select]

.kaasvlinder { display: none; }



That's it! Happy coding!


  ====> Is it possible to share these files here?
Effected files:
/administrator/com_virtuemart/classes/ps_communication.php
/components/com_virtuemart/themes/YOURTEMPLATE/templates/pages/shop.ask.tpl.php
/templates/YOURTEMPLATE/css/template.css

thank you

_Brake_

  • Beginner
  • *
  • Posts: 2
Is this solution still working? Because it is generating errors for me after clicking the send button :(

datnengiagoc

  • Beginner
  • *
  • Posts: 1
  • Can Ho Thu Duc
    • Chung cu gia re
  • Skype Name: dangthien.dangthien
Is this solution still working? Because it is generating errors for me after clicking the send button :(

I also like this, hoping for help me
Dang Thien