Page 1 of 10

Bigo Captcha

Posted: Sat Nov 17, 2007 8:35 pm
by bigodines
Hello,

I've created an alternative to CoolAcid's OSTCaptcha because my visitors thought it was too hard to read his captcha. In theory, it will work with every extension that uses OSTCaptcha without need of code changing (i said, "in theory").

Bigo Captcha is a native 1.5 plugin and uses animated captchas to keep spam bots away from your site. It also has a protection that avoid "guessing" from spambots, so If your visitor tries to guess 15 times without success, he/she will be ignored until next session.

I've tested this extension with yvComment and it seems to be working pretty well.

Download / Demo / Price ( :laugh:) available here:
http://extensions.joomla.org/component/ ... Itemid,35/

Use this thread for suggestions and comments. If you use my captcha, please write a review.

Re: Bigo Captcha

Posted: Sun Nov 18, 2007 3:36 pm
by brimba
Hi,

Does it work with the Contact Us form in Joomla 1.5 ?

Re: Bigo Captcha

Posted: Sun Nov 18, 2007 4:20 pm
by yvolk
Hi, I've tested last version and it works without errors, but IMHO it is not ready for use without hacks.
I have some suggestions, if you don't mind  :)

1. Change name of plugin in bigocaptcha.xml from "System - Captcha" to something unique.
2. Please, increase version number (in the same xml file) in each release of your plugin (its now 1.0  :( ) - otherwise we wouldn't understand each other, about which version we are talking...
3. It is very inconvenient, that Captcha counts, how many times it displayed image, and not how many times user tried to guess the number (calls to "confirm" function).
I suggest this simple scenario:
- Captcha shows the same image (not the same word, but "exactly the same image"!) for the same session, don't matter, how many times
- After user tries to guess the word, tries counter increases and Captcha shows next word...

If this is hard to implement, show every time different word, but count only calls to confirm function.

4. Add more parameters to the backend (including "Number of attempts", "Phrase after ran out of attempts", "Count displayed images or attempts to guess secret word"...)

5. "echo $something" for errors is not good, better $mainframe->enqueueMessage($something, 'notice');

6. Add debugging mode to test if your plugin works by itself  :) (you may see yvSmiley as an example...)

And, of cause, thank you, Bigodines, for your work! I'm waiting for your following successes!

Re: Bigo Captcha

Posted: Sun Nov 18, 2007 7:54 pm
by bigodines
yvolk wrote: 1. Change name of plugin in bigocaptcha.xml from "System - Captcha" to something unique.
2. Please, increase version number (in the same xml file) in each release of your plugin (its now 1.0  :( ) - otherwise we wouldn't understand each other, about which version we are talking...

well pointed. fixed.
3. It is very inconvenient, that Captcha counts, how many times it displayed image, and not how many times user tried to guess the number (calls to "confirm" function).
I suggest this simple scenario:
- Captcha shows the same image (not the same word, but "exactly the same image"!) for the same session, don't matter, how many times
- After user tries to guess the word, tries counter increases and Captcha shows next word...
you are right. I've implemented it wrong :/ must be a red herring or smthing :D
4. Add more parameters to the backend (including "Number of attempts", "Phrase after ran out of attempts", "Count displayed images or attempts to guess secret word"...)
I don't think it is worthy to implement something like this.. who would like to configure how many time a user can put the wrong word? the value is there just to avoid bots.. Only blind people would insert 15 times the wrong verification word.
5. "echo $something" for errors is not good, better $mainframe->enqueueMessage($something, 'notice');
Removed the message. System will just ignore user attempts.
6. Add debugging mode to test if your plugin works by itself  :) (you may see yvSmiley as an example...)

added to my "todo list"? I'll do this right after documentation :D

thanks for testing and for your feedback :D!

Re: Bigo Captcha

Posted: Tue Nov 20, 2007 11:59 am
by yvolk
I've just tested v.1.1

1. There is wrong cache-control information in the Captcha image, so Internet Browser uses cached image and doesn't request new one from server.
See header returned:
---
HTTP/1.1 200 OK
Date: Tue, 20 Nov 2007 11:53:14 GMT
Server: Apache/2.2.0 (Win32) DAV/2 mod_ssl/2.2.0 OpenSSL/0.9.8a mod_autoindex_color PHP/5.1.2
X-Powered-By: PHP/5.1.2
Set-Cookie: cf92232c128d07ed61f7ef3923cab392=6bf5217227a0e28ddd968b162df39c80; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Cache-Control: max-age=100
Expires: Tue, 20 Nov 2007 11:54:54 GMT

Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: image/gif
---

2. Please change name of the directory with bigocaptcha files from "Captcha04"  (???) to "bigocaptcha".

Re: Bigo Captcha

Posted: Wed Nov 21, 2007 9:27 am
by yvolk
Another observation and suggestion:

I confirm need of one addition to the plugin interface, that we should make:
"Text description of Captcha image" should be received from Captcha plugin (Maybe in the form of text constant, translated by Joomla, so you have to add language files...): Now we see "...Lowercase letters only"
- this statement is not true for your plugin: user have to type case sensitive word.

Re: Bigo Captcha

Posted: Wed Nov 21, 2007 11:51 am
by bigodines
bigo captcha is not case sensitive.

I'll try to tackle the problems you mentioned tomorrow. I've gotta finish my college courseworks first :/

thanks again for your feedback.

Re: Bigo Captcha

Posted: Mon Dec 03, 2007 7:16 am
by yvolk
bigodines wrote: I'll try to tackle the problems you mentioned tomorrow. I've gotta finish my college courseworks first :/
Hi, Matheus!

If you need help fixing that "cache control" problem, just let me know! I really want to add your Captcha to the list of supported extensions  :), so people may start using it with yvComment.

Re: Bigo Captcha

Posted: Mon Dec 03, 2007 11:58 am
by bigodines
I think the cache problem is solved (although I didn't test with IE yet), I will create the package and release it asap.

Today I will present my graduate project and then I'll be free to code again :P sorry about the delay! I will keep you guys up-to-date.

Re: Bigo Captcha

Posted: Mon Dec 03, 2007 8:54 pm
by NeoAnderson1982
Could you write a short tutorial how to implement your plugin in our own components. I didn't use a captcha-plugin before.
Thanks a lot
Aljoscha

Re: Bigo Captcha

Posted: Mon Dec 03, 2007 9:36 pm
by bigodines
@NeoAnderson1982:

You may use CoolAcid's documentation or see yvComment's source-code to learn how to implement the captcha mechanism in your components. (writing documentation is also in my "todo" list. That's the next thing I'll do once the cache bug is solved).

here's CoolAcid's "howto":
http://www.ostlabs.com/our-software/joo ... s/captcha/

to use Bigo Captcha, you'll need to use the trigger to "call" the plugin. It should be easy to implement. Let me know if you have any trouble.

Re: Bigo Captcha

Posted: Wed Dec 05, 2007 6:37 pm
by bigodines
hello guys, could you please test bigo captcha v1.2 with IE to see if the cache problem had been solved? (I don't have a windows box :/)

http://extensions.joomla.org/component/ ... Itemid,35/

thanks for you feedback.

Re: Bigo Captcha

Posted: Thu Dec 06, 2007 5:48 am
by yvolk
bigodines wrote: hello guys, could you please test bigo captcha v1.2 with IE to see if the cache problem had been solved? (I don't have a windows box :/)
From my first test I see, that cache problem is solved, thank you! (XAMPP, PHP5, Windows, IE7)

Re: Bigo Captcha

Posted: Sun Dec 16, 2007 1:18 pm
by iosoft
I am eagerly waiting for Joomla 1.0.x version so that I can kick out CB's captcha.

Re: Bigo Captcha

Posted: Thu Dec 20, 2007 7:37 am
by yvolk
bigodines wrote:
3. It is very inconvenient, that Captcha counts, how many times it displayed image, and not how many times user tried to guess the number (calls to "confirm" function).
I suggest this simple scenario:
- Captcha shows the same image (not the same word, but "exactly the same image"!) for the same session, don't matter, how many times
- After user tries to guess the word, tries counter increases and Captcha shows next word...
you are right. I've implemented it wrong :/ must be a red herring or smthing :D
Hi, Matheus!
Did you forget about this? ... And, by the way, if I will see your "Todo list", I wouldn't bother you with such reminders  :) any more.
Thank you!

Re: Bigo Captcha

Posted: Thu Dec 20, 2007 3:20 pm
by bigodines
I thought it was fixed :/

Re: Bigo Captcha

Posted: Mon Dec 31, 2007 9:54 am
by Maarten-Square
Thanks for this great component. I would like to use it with my contact form in Joomla 1.5. How do I do this? Is there an option to do so or do I have to manually edit the code?

Regards,
Maarten

Re: Bigo Captcha

Posted: Mon Dec 31, 2007 1:05 pm
by bigodines
You'll have to manually edit the code. com_contact isn't captcha ready yet.

Re: Bigo Captcha

Posted: Thu Jan 17, 2008 8:13 pm
by xillibit
Thanks for it's good component.

I have an issue when i use the function trigger displayimg(). I tried to place a captcha in com_contact, I have placed the function displayimg() in \com_contact\controller.php and I have placed displayimg(); in \com_contact\views\contact\tmpl\default.php , but instead display a captcha image , it display a php code. I'am a beginner , when i use the url index.php?option=com_freecap&task=displayimg it's do not display the captcha, I have maybe forget a thing.

Re: Bigo Captcha

Posted: Fri Jan 18, 2008 6:20 pm
by jaron
Hi Bigodines,

I'm trying to implement Bigo Captcha in my com_contact component.  I went to the link you suggested, http://www.ostlabs.com/our-software/joo ... tcha/  and I can't figure out where to put the code in my controller.php file. I will attach my file as a text file so you can go through it.  I also commented the places where I added the code with BIGOCAPTCHA so you can search for it easily.  I also didn't understand when in the OTSWigits instructions they say "call your own component with &task=displayimg appending the url:"  I don't know where they are talking about. 
If you can give me some insight, I would really appreciate it.  Been trying at this for so long now.  I just don't know enough.

Re: Bigo Captcha

Posted: Fri Jan 18, 2008 6:34 pm
by bigodines
Guys,

in order to add captcha to com_contact you'll need to add a display() method to it. Something like:

Code: Select all

function displaycaptcha() {
		global $mainframe;
		global $yvComment;
		if ($yvComment->getConfigValue('use_captcha', 0)) {
			$Ok = null;
			$mainframe->triggerEvent('onCaptcha_Display', array($Ok));
			if (!$Ok) {
				echo "<br/>Error displaying Captcha<br/>";
			}		
		}
	}
This will result in a captcha image when you call, for example, &option=com_contact&task=displaycaptcha

so:

Code: Select all

	    echo "<img src='/index.php?option=com_contact&task=displaycaptcha'><BR>";
	    echo "<input type='text' name='word'><BR>";
should be added to the contact form.

To verify if the word is correct or not you'll just need something like:

Code: Select all

global $mainframe;
            $return = false;
            $word = JRequest::getVar('word', false, '', 'CMD');
            $mainframe->triggerEvent('onCaptcha_confirm', array($word, &$return));
            if ($return) {
                /* SEND-MAIL ROUTINE */
            }

hope this help is enough.

If not, I have plans to provide a com_contact patch to use it with bigocaptcha as soon as j!1.5 goes stable.

cheers,
bigo

Re: Bigo Captcha

Posted: Fri Jan 18, 2008 7:54 pm
by jaron
Thanks anyway bigo,

I just spent the last hour trying to implement that, but I don't think I know enough about php to do it.  Joomla won't allow me to add onto the link for a contact menu item, so I tried making an external link menu item that directed internally.  That seemed to work, but I couldn't get the all the code in the right place.  I'll be looking forward to your update.

Thanks again.
jaron.

Re: Bigo Captcha

Posted: Tue Jan 22, 2008 4:17 pm
by bigodines

Re: Bigo Captcha

Posted: Sat Jan 26, 2008 12:12 pm
by iosoft
any news about Joomla 1.0.x version ?

Re: Bigo Captcha

Posted: Sat Jan 26, 2008 12:38 pm
by bigodines
I won't create a 1.0.x version, sorry dude.

But this is a free software :) feel free to adapt Bigo Captcha to make it compatible with 1.0.x :D

Re: Bigo Captcha

Posted: Sat Jan 26, 2008 10:01 pm
by RECS
I tried to install this on my test computer but can't get it to work. I down loaded the complete file  (com contach patch) but the controller.php  file is corrupted. There are little square blocks in the code adding the Captcha. Some  I changed file using the posts, but I can't see the image captcha. It does give me an error "the captcha does match" or something close to that. I am not a programmer so don't know what is wrong.


Thanks for the extension. I hope to get it to work!

Charlie 

Re: Bigo Captcha

Posted: Sun Jan 27, 2008 3:23 pm
by bigodines
Hum... wordpress changed the file name during the upload :/ try this link:
http://www.bigodines.com/files/contact_patch.tar.gz

I'll fix it in my post. Lemme know if you have trouble making it work.

cheers,
bigo

Re: Bigo Captcha

Posted: Sun Jan 27, 2008 5:28 pm
by RECS
Thanks for the updated post. I got it to work last night. Thanks again for the extension.

Re: Bigo Captcha

Posted: Wed Jan 30, 2008 3:48 am
by mayeska
I've installed the component and added the following files from your patch: controller.php, default_form.php, and contact_items.xml.  It almost works...  The input box appears, but no image -- just a spot where the image should be.  I'm not a programmer or a developer, but your plugin looks like the easiest way for me to add a captcha image to my joomla 1.5 contact form.  (Thanks, by the way, for offering such a great tutorial on your blog.)  Any ideas what might be wrong?

Using the firefox web-development plugin, I found the following information:  Line 188, Column 53: general entity "task" not defined and no default entity.    Does that help?

Oh -- and I host on a Windows server.  I've run into weird issues because of this before.  Might this be part of the problem?
Thanks!

Re: Bigo Captcha

Posted: Thu Jan 31, 2008 1:19 am
by Dannymh
Hi,

Has anyone implemented this in the registration forms yet?

My site is under almost contact attack at the moment from automatic registrations

Cheers
Dan