Author Topic: VM 1.1 and SecurityImages - CAPTCHA for VM  (Read 46176 times)

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
VM 1.1 and SecurityImages - CAPTCHA for VM
« on: September 08, 2007, 04:02:47 am »
According to this post by Soeren, VM 1.1 should be compatible with SecurityImages, Walter has made the necessary changes to  SecurityImages 4.2.0 to make it VM 1.1 compatible however I don't see any CAPTCHA option using Joomla 1.0.12, VM 1.1 r928, my question has SecurityImages compatibility changes been implemented in VM 1.1?

gregdev

  • Full Member
  • ***
  • Posts: 968
    • PlainlyCode
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #1 on: September 08, 2007, 05:45:19 am »
CAPTCHA has not been integrated yet. The last time we discussed it, we talked about moving it to a later release. I haven't looked at it - is it an easy integration?

Greg



Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #4 on: September 12, 2007, 08:48:53 am »
The integration of Security Images is very easy.
On the form you need to secure, just add

Code: [Select]
if(file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/config.securityimages.php')) {

      include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/config.securityimages.php');
      include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php');

$packageName = 'securityimage_XX-PAGENAME';

echo "<tr><td>".getSecurityImageTextHeader()." *</td><td>" .insertSecurityImage($packageName)."<br/>" .getSecurityImageTextHelp() .getSecurityImageField($packageName)."</td></tr>";

}

That's all. Maybe we should check if Security Images is enabled globally and only show the CAPTCHA if it is enabled...

ciao, Sören
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

niroth

  • Beginner
  • *
  • Posts: 7
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #5 on: September 26, 2007, 04:49:09 am »
I've been trying to find the file that needs to be edited, to add the secureimages to the VM user registration. Can someone please tell me what the file is to edit.

Thanks in advance, Jase

murfoni

  • Beginner
  • *
  • Posts: 16
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #6 on: September 29, 2007, 02:08:35 am »
I added it to  administrator/components/com_virtuemart/html/checkout_register_form.php  at line 223 and it works great!  :D
I did make one small change to Soeren's code; I added a <table> tag to the start and </table> at the end

Code: [Select]
else {
echo '<input type="hidden" name="remember" value="yes" />';
}

/* *** START SECURITY IMAGES CODE *** */
if(file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/config.securityimages.php')) {

      include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/config.securityimages.php');
      include_once($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php');

$packageName = 'securityimage_XX-PAGENAME';

echo "<table><tr><td>".getSecurityImageTextHeader()." *</td><td>" .insertSecurityImage($packageName)."<br/>" .getSecurityImageTextHelp() .getSecurityImageField($packageName)."</td></tr></table>";

}
/* *** END SECURITY IMAGES CODE *** */
echo '
<input type="submit" value="'. $VM_LANG->_BUTTON_SEND_REG . '" class="button" onclick="return( submitregistration());" />
</div>

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #7 on: October 01, 2007, 22:12:56 pm »
@Murfoni you must be referring to VM 1.0.x series cause there is no line 223 in checkout_register_form.php of VM 1.1

But the placement of the security code works.

patrik60

  • Guest
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #8 on: October 02, 2007, 14:53:12 pm »
hello

I have checked this. Captcha will be shown on the reg. form, but nothing happens. Even if I don't fill it out I will be directed to the checkout page.

patrik

VM svn rev 965

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #9 on: October 02, 2007, 21:14:47 pm »
I have checked this. Captcha will be shown on the reg. form, but nothing happens. Even if I don't fill it out I will be directed to the checkout page.

Confirmed but don't know if it is VM issue or SI

ichimonban

  • Beginner
  • *
  • Posts: 10
    • UrbanDezign.com
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #10 on: June 04, 2009, 22:24:23 pm »
The product inquiry form doesn't have a captcha yet.  So here's how I did it:
0.  Back up everything.
1.  I installed a component that would provide a failpage with a link back to the product, given the right options. Install com_fail.zip (attatched).
2.  Put the following code in the ask form, which will either be in your flypage (components/com_virtuemart/themes/default/templates/product_details/whateverflypageyourusing.tpl.php) or shop.ask.tpl.php (components/com_virtuemart/themes/default/templates/pages/shop.ask.tpl.php).
Code: [Select]
<? if (file_exists($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php')) {
include ($mosConfig_absolute_path.'/administrator/components/com_securityimages/client.php');
// Note that this package name must be used on the validation side too! If both are not equal, validation will fail
$packageName = 'securityVMRegistrationCheck';
echo insertSecurityImage($packageName);
echo getSecurityImageText($packageName);
}
else if (file_exists($mosConfig_absolute_path.'/plugins/system/securityimages.php')) {
echo "<script type=\"text/javascript\" src=\"".JURI :: root()."/components/com_securityimages/js/securityImages.js\"></script>";
echo "<img id='captchaSecurityImages' name='captchaSecurityImages' src=\"".JURI :: root()."/index.php?option=com_securityimages&task=displayCaptcha\" />";
echo "<a href=\"javascript:askNewSecurityImages('captchaSecurityImages');\">";
echo "<img src=\"".JURI :: root()."/components/com_securityimages/buttons/reload.gif\" id=\"securityImagesContactCaptchaReload\" name=\"securityImagesContactCaptchaReload\" border=\"0\">";
echo "</a>";
echo "<input type=\"text\" name=\"securityVMRegistrationCheck_try\" />";
}?>
3. Back up your old ps_communications.php (administrator/components/com_virtuemart/classes/ps_communications.php)
4. Put in the new ps_communications.php (attached) or, if your old one is modified for some reason observe the changes and make them to your old one.

P.S.  everything attached is zipped into one attachement.  ALSO the ps_communications.php file provided will not work with an unmodified inquiry form.

[attachment cleanup by admin]

Greg

  • Beginner
  • *
  • Posts: 19
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #11 on: July 22, 2009, 12:42:36 pm »
Hello,
I can't seem to find any newer discussion about Security Images or CAPTCHA for Virtuemart in general.
Surely we can be the only ones being overwhelmed by spammers in registration for Virtuemart.

I have tried the above solution but as others have seenthe aptcha shows but it lets registration through no matter what.

Anybody have any ideas?

Thanks,
Greg

Greg

  • Beginner
  • *
  • Posts: 19
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #12 on: July 23, 2009, 11:56:42 am »
Well, after spending hours and hours combing through the docs and forums I finally found this really well hidden little gem:

http://www.waltercedric.com/component/content/article/1532.html

As it turns out Virtuemart 1.13 has Security Images support built in.

Apparently Security Images 4x is for Joomla 1.0 and SI 5x is for 1.5.

Why this is so hidden away is a mystery. I can find no info on the Virtuemart site. If you can then please post it here for everybody.

It is working for me now (well, with a few problems but it is fixing the SPAM problem).

G

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #13 on: July 23, 2009, 17:20:31 pm »
I tried using the Walter Cedric Solution and the field type "captcha field....." wasx not among the items in the drop down list.  Did I somehow miss these files during the numerous updates I have made to VM?  Where are the files located?  Would love to implement this.  Can anyone help?

Bruce
www.pepper-passion.com

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: VM 1.1 and SecurityImages - CAPTCHA for VM
« Reply #14 on: July 28, 2009, 02:34:34 am »
My prblems was that I had not installed the custom plug in.  I was under the impression that is was already built in to Joomla or VM.  I was able to set up the custom filed but then I started receiving emails that customers were unable to register at my site so I disabled it.  Will try and figure this out later.

Bruce
www.pepper-passion.com