1
kerkyra
Contact Us module v1 for 2.3 with captcha
  • 2008/9/28 15:08

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


i used the contact us module version 1 in my site for making the contact form and added the captcha image using the XOOPS 2.3 method. It seems to work for me and since i dont see it in the modules repository i thought maybe we could add it there... ??
www.guidemap.gr - Beta is out...

2
sailjapan
Re: Contact Us module v1 for 2.3 with captcha

Can you direct me to any info on the "xoops 2.3 captcha method"? I'd like to apply it to as many modules as I can...
Never let a man who does not believe something can be done, talk to a man that is doing it.

3
Anonymous
Re: Contact Us module v1 for 2.3 with captcha
  • 2008/10/5 16:18

  • Anonymous

  • Posts: 0

  • Since:


Quote:
sailjapan wrote:

Can you direct me to any info on the "xoops 2.3 captcha method"? I'd like to apply it to as many modules as I can...


Ditto

4
kerkyra
Re: Contact Us module v1 for 2.3 with captcha
  • 2008/10/6 9:03

  • kerkyra

  • Just can't stay away

  • Posts: 553

  • Since: 2005/2/14


well i havent found any info regarding this! just had a look at how it is appliedy in the register form and followed that logic

first thing to do is create the captcha object.
To do this you have to use the following code...(i applied this to the contact us module as stated in my first post, the following code was added in the contactform.php file to show the captcha image)
Quote:
xoops_load("XoopsFormCaptcha");
$cpatcha = new XoopsFormCaptcha();
$cpatcha->getCaption();
$cpatcha->render();

this includes it to the contact form object
Quote:
$contact_form->addElement($cpatcha, true);


then in the index.php file we want to check if the user has entered the correct letters...

to do so I added the following code..
//get the instance of the captcha object
Quote:
xoops_load("captcha");
$xoopsCaptcha = XoopsCaptcha::getInstance();

//check if the captcha is cool
Quote:
if ( !$xoopsCaptcha->verify() ) {
$error = $xoopsCaptcha->getMessage();
echo "<script >alert('".$error."')</script>";
redirect_header(XOOPS_URL."/modules/contact/index.php");
return false;
}

that's it actually! Didn't have to include any files or anything else! That did the trick! I hope this helps you out a lil bit!:)
www.guidemap.gr - Beta is out...

5
sailjapan
Re: Contact Us module v1 for 2.3 with captcha

Cool! Many thanks, kerkyra. I'll give it a go.
Never let a man who does not believe something can be done, talk to a man that is doing it.

6
micmek
Re: Contact Us module v1 for 2.3 with captcha
  • 2008/11/21 4:25

  • micmek

  • Just popping in

  • Posts: 2

  • Since: 2007/6/26


Hey guys..
Where do you get the Contact Us module V1 for XOOPS 2.3?

7
krauh
Re: Contact Us module v1 for 2.3 with captcha
  • 2008/11/21 5:13

  • krauh

  • Just popping in

  • Posts: 70

  • Since: 2005/2/25


Am Contact seems to work
https://xoops.org/modules/news/article.php?storyid=4480

Dunno about the v1 module

8
ghia
Re: Contact Us module v1 for 2.3 with captcha
  • 2008/11/21 11:22

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Why, adding Captcha to the Contact Us module?
It has already a security image of its own!

Quote:
Where do you get the Contact Us module V1 for XOOPS 2.3?
At XOOPS.nl. It's a Dutch and English version.

9
bjbtexas
Re: Contact Us module v1 for 2.3 with captcha
  • 2009/2/25 18:46

  • bjbtexas

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/7/3 2


I've been trying to get this hack to work for AMS submit on 2.3.2b. Any ideas as to how to do that?

Login

Username:
Password:

Lost Password? Register now!

Who's Online

82 user(s) are online (44 user(s) are browsing Support Forums)


Members: 0


Guests: 82


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits