Page 2 of 10

Re: Bigo Captcha

Posted: Thu Jan 31, 2008 3:41 am
by Dannymh
I have this working to an extent in J1.5 and registration.

The Captcha shows and if you don't enter it correctly you are taken to the error page but it still sort of looks like registration was successful. I need to get it to run via Javascript

Any clues, hints or ideas?

Re: Bigo Captcha

Posted: Thu Jan 31, 2008 4:14 am
by Dannymh
Dannymh wrote: I have this working to an extent in J1.5 and registration.

The Captcha shows and if you don't enter it correctly you are taken to the error page but it still sort of looks like registration was successful. I need to get it to run via Javascript

Any clues, hints or ideas?
I got this workinginstead of javascript I needed to add

$this->register();

after the error and it returns the register screen below the error.

If anyone is interested in the code please let me know

Re: Bigo Captcha

Posted: Thu Jan 31, 2008 4:08 pm
by RECS
I am interested if you can please post the information!

Thanks,

Charlie

Re: Bigo Captcha

Posted: Fri Feb 01, 2008 12:38 am
by Dannymh
Ok here is what you do.

Open
/components/com_user/controlller.php

Find the function

Code: Select all

register_save()
[code]

find
[code]
global $mainframe;
add the following code on the next line

Code: Select all

if (!$this->_checkCaptcha()) {
			JError::raiseWarning("","You have entered the wrong CAPTCHA sequence. Please try again.");
			$this->register();
			return false;
}
The above is the flag that checks Captcha was filled in

Add the following two functions on the bottom immediately before the last

Code: Select all

}

add this

Code: Select all

	function displaycaptcha() {
        global $mainframe;

        $contactId = JRequest::getVar('contact_id', 0, '', 'int');   
            $Ok = null;
            $mainframe->triggerEvent('onCaptcha_Display', array($Ok));
            if (!$Ok) {
                echo "<br/>Error displaying Captcha<br/>";
			}
	}

	function _checkCaptcha() {
		global $mainframe;

		// load the contact details
		$return = false;

		$word = JRequest::getVar('word', false, '', 'CMD');
		$mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return));
		if ($return) {
			return true;
		} else return false;
	}
open /components/com_user/views/register/tmpl/default.php

Wherever you want to add the captcha stuff add

Code: Select all

<tr>
	<td height="40">
		<label id="captcha" for="captcha">
			<img src="index.php?option=com_user&task=displaycaptcha">
		</label>
	</td>
	<td>
		<input type="text" name="word" id="word"/> *
	</td>
</tr>

You can see this running on my site http://www.silvertails.net and has immediately stopped the auto account creation I was getting from random spam users and bots.

I modified this from the tutorial at
http://www.joomla.com.br/blog/2008/01/2 ... component/

so that it would work here.

Dan
[/code][/code]

Re: Bigo Captcha

Posted: Fri Feb 01, 2008 11:24 am
by ewel
Thanks or this Dan, but I could not get it to work. I probably put the flag that checks if Captcha was filled in in the wrong place. Can you be more specific as to where to put it?

What I have now in components/com_user/controller.php on line 393 is this:

Code: Select all

	function register_save()

	{

		global $mainframe;

		
		/*INSERTED FOR CAPTCHA*/
	    if (!$this->_checkCaptcha()) {
    			JError::raiseWarning("","You have entered the wrong CAPTCHA sequence. Please try again.");
    			$this->register();
    			return false;
    }
			/*END INSERTION*/
		

		// Check for request forgeries

		JRequest::checkToken() or die( 'Invalid Token' );
At the end of the same file, starting at line 1035 is this:

Code: Select all

			}

		}

	}

	
	/*INSERTED FOR CAPTCHA*/
	function displaycaptcha() {
        global $mainframe;

        $contactId = JRequest::getVar('contact_id', 0, '', 'int');   
            $Ok = null;
            $mainframe->triggerEvent('onCaptcha_Display', array($Ok));
            if (!$Ok) {
                echo "<br/>Error displaying Captcha<br/>";
			}
	}

	function _checkCaptcha() {
		global $mainframe;

		// load the contact details
		$return = false;

		$word = JRequest::getVar('word', false, '', 'CMD');
		$mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return));
		if ($return) {
			return true;
		} else return false;
	}
	/*END INSERTION*/


}

?>
In /components/com_user/views/register/tmpl/default.php I have this on line 147 (which should put the image and text field onthe right with a label "Captcha" left):

Code: Select all

<!-- INSERTED FOR CAPTCHA -->
<tr>
	<td>
		<label id="captcha" for="captcha">
			Captcha:
		</label>
	</td>
	<td height="40">
		<table width="100%">
			<tr>
				<td width="50%">
					<img src="index.php?option=com_user&task=displaycaptcha">  
				</td>
				<td width="50%">
					<input type="text" name="word" id="word" size="20" /> *
				</td>
			</tr>
		</tabe>
	</td>
</tr>
<!-- END INSERTION -->

Re: Bigo Captcha

Posted: Sun Feb 03, 2008 11:40 pm
by Dannymh
First of all, I know this may sound like an odd question, but are you using Joomla! 1.5?

I have attached my modified J! 1.5 files so you can try using these and let me know.

Enable BigoCaptch in 1.5, backup your original

components/com_user/controller.php
components/com_user/views/register/tmpl/default.php

Extract the attached zip and manually replace the files on your server with the ones within.

Let me know how you go.

Dan

Re: Bigo Captcha

Posted: Sun Feb 03, 2008 11:53 pm
by ewel
Thanks! It works now, I had put !$this->_checkCaptcha in the wrong place.

Re: Bigo Captcha

Posted: Fri Feb 08, 2008 11:51 am
by ewel
I just noticed that the captcha is animated in Firefox but not in IE7. In IE7 I thought Bigo Captcha was the only convenient captcha and slightly better than the other one, but in FF it really is great.

Is it possible to get animation working in IE7? Without it there is always one letter that is half hidden under the wave of the suspended animation and is difficult to read.

Re: Bigo Captcha

Posted: Fri Feb 08, 2008 2:50 pm
by bigodines
as a linux user, i'm not able to test in IE properly... I can't even confirm this issue with IE :)

Re: Bigo Captcha

Posted: Fri Feb 08, 2008 6:08 pm
by ewel
Understood. Obviously my single pc cannot provide confirmation either. Can others please report if they see a difference in the rendering between IE and FF, in other words does anyone have an animated captcha in IE?

Re: Bigo Captcha

Posted: Sat Feb 09, 2008 4:53 am
by yvolk
ewel wrote: Understood. Obviously my single pc cannot provide confirmation either. Can others please report if they see a difference in the rendering between IE and FF, in other words does anyone have an animated captcha in IE?
I see Captcha animated in IE7 (both under Windows XP and Vista)

Re: Bigo Captcha

Posted: Sat Feb 09, 2008 10:25 am
by ewel
Thanks Yuri. I looked up some sites featuring your component and most of them have Bigo Captcha, and I did not see animations anywhere. A quick Google search taught me that it is the IE7 setting of Play animations in webpages that was the culprit. I am not sure yet if the default IE7 setting plays animations or not, but it seems the default will show visitors the animated captcha.

No Image Using Bigo Captcha

Posted: Fri Feb 22, 2008 2:35 am
by jayR
I hope I am not posting out of sequence here..
I was trying out yvcomment and Bigo Captcha in local set up, the modules are enabled but I can not see Catcha image following is screen capture of the comment section.

I have checked the permissions and www-data has full access to the relevant directories etc. I do not see any errors in apache logs or Joomla logs. I am not sure what I am doing wrong. Any ideas would help.

Thanks,

Jay

Re: Bigo Captcha

Posted: Fri Feb 22, 2008 12:54 pm
by bigodines
is your error reporting set to maximum? which image libraries do you have enabled in your phpinfo()?

Re: Bigo Captcha

Posted: Fri Feb 22, 2008 1:56 pm
by ewel
Another possibility: in your .htaccess you might have switched on protection against hotlinking images.

Re: Bigo Captcha

Posted: Fri Feb 22, 2008 10:56 pm
by jayR
Thanks for your help. The problem is resolved as soon as enabled gd support for php5. In ubuntu you just need to install php5-gd and restart apache, in case this turns out to be useful for somebody else.

Thanks again for response and your work on Bigo Captcha.

Jay

Re: Bigo Captcha - image not showing up

Posted: Mon Feb 25, 2008 5:10 pm
by bokonon
Hi there! The bigocaptcha plugin works perfectly in the offline version of my website, but it doesn't work on the server. You can check it out here:

http://serbiatravelers.org/cms/index.ph ... je?start=3

As you can see, instead of the picture with letters, I just get the alt text "The word for verification. Lowercase letters only with no spaces."

Maybe I should change permissions on some folders? I tried erasing and then installing the captcha plugin again, but to no avail. Any ideas?

Thanx,
Lazar

Re: Bigo Captcha

Posted: Mon Feb 25, 2008 5:23 pm
by bigodines
Hello Lazar,

There are a couple things you could check to help us helping you:

- have you tried with SEO disabled?
- is there anything in the error logs?
- which version of php are you using?

Re: Bigo Captcha

Posted: Tue Feb 26, 2008 5:13 am
by hanlylim
Hi Bigo and everybody,

I can't get the captcha to show on my contact form (Joomla 1.5 stable release).
I tried Bigo's patch and they don't work either. Any idea why ?

Thanks,

Hanly

Re: Bigo Captcha

Posted: Tue Feb 26, 2008 5:30 am
by hanlylim
Hi Bigo and fellow Joomlats,

My apology to Bigo. YES Bigo's captcha is working on my contact form.

Sorry for previous comment.

Thanks.

Hanly

Disaster install...

Posted: Thu Feb 28, 2008 2:19 pm
by borisgoodenough
Installed Bigo Captcha, uploaded and extracted the patch from Bigodines' website. Now getting a gigantic error string at the top of the contact pages:

http://newsite.aarecon.org/index.php?op ... &Itemid=64

I'm not a programmer, so this leaves me seriously stumped. Help, please?

Joel

Re: Disaster install...

Posted: Thu Feb 28, 2008 2:52 pm
by bigodines
borisgoodenough wrote:Installed Bigo Captcha, uploaded and extracted the patch from Bigodines' website. Now getting a gigantic error string at the top of the contact pages:

http://newsite.aarecon.org/index.php?op ... &Itemid=64

I'm not a programmer, so this leaves me seriously tumped. Help, please?

Joel
this is not an error. this is a debug message I've accidentaly forgot to remove >:D

in components/com_contact/views/contact/view.html.php there is a print_r($pparams); (around line 80). You just need to comment or remove it to "fix" the patch.

cheers

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 3:17 pm
by borisgoodenough
Thanks, Matheus! Debug message is gone, plugin is enabled but I'm still not getting a captcha code on the page. Any ideas?

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 3:24 pm
by bigodines
have you published the bigo captcha plugin?

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 3:35 pm
by borisgoodenough
Yup, and it's showing as enabled in the plugin manager.

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 3:48 pm
by bigodines
it looks like you haven't set the "use captcha" param in your contact options.

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 4:41 pm
by borisgoodenough
Matheus, I think I'm taking stupid pills today. ??? I'm usually not this helpless...

I opened each of my contacts -- and "use captcha" was already enabled on them all. But I saved them anyway, and now the captcha image appears on the contact page!

But two questions:

(1) As you can see, the captcha image is showing up ABOVE the contact form. http://newsite.aarecon.org/index.php?op ... &Itemid=64 Is there a way to make it display below the form, and add a "Word verification" tag to the field?

(2) Is there a way to enable it for my CB registration form?

Thanks very, very much!\

Joel

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 4:57 pm
by bigodines
borisgoodenough wrote:(1) As you can see, the captcha image is showing up ABOVE the contact form. http://newsite.aarecon.org/index.php?op ... &Itemid=64 Is there a way to make it display below the form, and add a "Word verification" tag to the field?
all u need to do is adapt the view file.. shouldn't be a problem.
(2) Is there a way to enable it for my CB registration form?
not automatically. someone must create a CB patch. I'm not a Community Builder fan though... Hopefully someone in the community will create and release it for us ;)

Re: Bigo Captcha

Posted: Thu Feb 28, 2008 6:27 pm
by borisgoodenough
Working great now! Thanks for all the help.

Re: Bigo Captcha

Posted: Tue Mar 04, 2008 6:41 pm
by spaantje
Hey,

I have tried to install bigo captcha but it seems it won't display for me..
I have also installed "OSTWigits-Captcha" and that one does work right away.

But i like BIGO more..

Someone knows what goes wrong?
Do i need to CHMOD a folder or something?

Thanx,
Sonny