All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
captcha-0.1.zip | 4.7 KB | open | download | arlo | 12/01/2004 | Read message |
captcha_screenshot.jpg | 27.5 KB | open | download | arlo | 12/01/2004 | Read message |
captchaMK_03.tar.gz | 4.2 KB | open | download | MiKolar | 05/06/2006 | Read message |
captcha3b2b8ec081b00cc94d624feef25042a3.png | 6.1 KB | open | download | Timothy | 08/10/2006 | Read message |
captcha61967b49122df07d9878c5af22fabef4.png | 5.6 KB | open | download | Timothy | 08/10/2006 | Read message |
captchaf72a5e277c8c5dbf460e85bd52bd181b.png | 5.7 KB | open | download | Timothy | 08/10/2006 | Read message |
captcha-0.4.zip | 5.6 KB | open | download | amilcarpt | 03/13/2008 | Read message |
captcha module (image security codes for registration) December 01, 2004 11:43PM |
Registered: 20 years ago Posts: 47 |
I saw this on the todo list and thought I'd give it a try:
"optional image security code for posting to prevent scripted posts (um, mod?)"
captcha = "completely automated public Turing test to tell computers and humans apart"
Demo: [www.alouie.com]
Screenshot: see attachment
contents of readme.txt:
----------------------
mod_captcha: adds a captcha image to the user registration process
more info about captchas: [en.wikipedia.org]
Phorum 5 module by arlo, based on Arnab Nandi's captcha drupal module [drupal.org]).
Requirements:
------------
- the GD library, which is usually pre-installed on linux systems
[www.php.net]
- Phorum 5.0.10 or higher. mod_captcha uses module localization.
Installation:
------------
In addition to placing the captcha directory inside mods and turning the
captcha module on, you need to do the following:
1. Go to the captcha module settings in the admin and enter the two
paths. These are required (if they're left blank, you'll get an error message
on the registration page).
Temporary image file path: this is the complete path to a world-writable
directory on your server. mod_captcha will store its PNG files here.
We recommend that you create a captcha_tmp directory inside phorum/images.
Example: /home/site/www/phorum/images/captcha_tmp
The commands to create this directory would be:
cd /home/site/www/phorum/images
mkdir captcha_tmp
chmod a+w captcha_tmp
Temporary image web path relative to phorum: in the example above, the
path to type in would be: images/captcha_tmp
2. Add a line to the register.tpl template
Near the bottom of register.tpl, immediately before the </table>, add the line:
{IF MOD_CAPTCHA_HTML}{MOD_CAPTCHA_HTML}{/IF}
3. You're done. When a new user attempts to register, he/she will need to identify
the captcha image to proceed. One last thing: you'll need to delete the
captcha*.png files from the temporary file directory from time to time.
Images get deleted for you when people correctly identify captchas, but they
stay on the server when they're misidentified. You could either do this manually
or set up a cron job to do it automatically.
"optional image security code for posting to prevent scripted posts (um, mod?)"
captcha = "completely automated public Turing test to tell computers and humans apart"
Demo: [www.alouie.com]
Screenshot: see attachment
contents of readme.txt:
----------------------
mod_captcha: adds a captcha image to the user registration process
more info about captchas: [en.wikipedia.org]
Phorum 5 module by arlo, based on Arnab Nandi's captcha drupal module [drupal.org]).
Requirements:
------------
- the GD library, which is usually pre-installed on linux systems
[www.php.net]
- Phorum 5.0.10 or higher. mod_captcha uses module localization.
Installation:
------------
In addition to placing the captcha directory inside mods and turning the
captcha module on, you need to do the following:
1. Go to the captcha module settings in the admin and enter the two
paths. These are required (if they're left blank, you'll get an error message
on the registration page).
Temporary image file path: this is the complete path to a world-writable
directory on your server. mod_captcha will store its PNG files here.
We recommend that you create a captcha_tmp directory inside phorum/images.
Example: /home/site/www/phorum/images/captcha_tmp
The commands to create this directory would be:
cd /home/site/www/phorum/images
mkdir captcha_tmp
chmod a+w captcha_tmp
Temporary image web path relative to phorum: in the example above, the
path to type in would be: images/captcha_tmp
2. Add a line to the register.tpl template
Near the bottom of register.tpl, immediately before the </table>, add the line:
{IF MOD_CAPTCHA_HTML}{MOD_CAPTCHA_HTML}{/IF}
3. You're done. When a new user attempts to register, he/she will need to identify
the captcha image to proceed. One last thing: you'll need to delete the
captcha*.png files from the temporary file directory from time to time.
Images get deleted for you when people correctly identify captchas, but they
stay on the server when they're misidentified. You could either do this manually
or set up a cron job to do it automatically.
Re: captcha module (image security codes for registration) November 19, 2005 09:05AM |
Registered: 21 years ago Posts: 687 |
Has anybody written a module to apply image security for posting messages?
Thanks,
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Thanks,
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: captcha module (image security codes for registration) November 19, 2005 09:42AM |
Registered: 22 years ago Posts: 1,076 |
I quess you can do as instructed, but put {IF MOD_CAPTCHA_HTML}{MOD_CAPTCHA_HTML}{/IF} in post form instead and change the module to process post too
lines with:
The module runs in after header, and common hooks which are run after post as well so that should do it?
Maybe someone wamts to enhance the module so that it's user definable where to use it?
---
-=[ Panu ]=-
lines with:
if (phorum_page == "register" && !empty($_POST)) { should be something like if (phorum_page == "register" || phorum_page == "posting") && !empty($_POST)) {
The module runs in after header, and common hooks which are run after post as well so that should do it?
Maybe someone wamts to enhance the module so that it's user definable where to use it?
---
-=[ Panu ]=-
Re: captcha module (image security codes for registration) November 22, 2005 12:28PM |
Registered: 21 years ago Posts: 687 |
Thanks Panu,
If I implemented this, I would try and log a "session timeout" each time the code was entered. Having to enter a code per post would be excruciating, but once per visit to the site wouldn't be too bad.
/\
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
If I implemented this, I would try and log a "session timeout" each time the code was entered. Having to enter a code per post would be excruciating, but once per visit to the site wouldn't be too bad.
/\
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: captcha module (image security codes for registration) February 03, 2006 02:04PM |
Registered: 18 years ago Posts: 2 |
FYI, I had to remove the following section from captcha.php to get the module to work:
//rotate
$im2 = imagerotate($im,rand(-20,45),$background);
imagedestroy($im);
$im = $im2;
Until I removed that bit of code, I got an error message, if I recall correctly something about an undeclared function.
Now, the image appears where it should in a horizontally-situated rectangle. The module nonetheless works fine.
Just thought you might like to know. Thanks for the excellent work..... Regards
//rotate
$im2 = imagerotate($im,rand(-20,45),$background);
imagedestroy($im);
$im = $im2;
Until I removed that bit of code, I got an error message, if I recall correctly something about an undeclared function.
Now, the image appears where it should in a horizontally-situated rectangle. The module nonetheless works fine.
Just thought you might like to know. Thanks for the excellent work..... Regards
Re: captcha module (image security codes for registration) February 07, 2006 11:28AM |
Registered: 21 years ago Posts: 687 |
As an update, I have now implemented a non-graphical CAPTCHA module when posting.
You can download it here: [www.phorum.org]
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
You can download it here: [www.phorum.org]
/\dam
--
My notable Phorum sites:
Movie Deaths Database - "review comments" system mostly powered by Phorum
Learn Chinese! - integrated forum quiz
Re: captcha module (image security codes for registration) May 01, 2006 02:46AM |
Registered: 18 years ago Posts: 11 |
I have added to this module an automatic cleaning of the png temporary image directory by the module itself (after a number of minutes that is apecified in admin). I have also increased somewhat the size of the letters in the image.
Module with these modifications is attached.
mk
Edited 1 time(s). Last edit at 05/06/2006 01:31AM by MiKolar.
Module with these modifications is attached.
mk
Edited 1 time(s). Last edit at 05/06/2006 01:31AM by MiKolar.
Re: captcha module (image security codes for registration) May 01, 2006 03:13AM |
Registered: 18 years ago Posts: 11 |
Well it was not as simple as suggested below. For post forms one has to write a different hook function for verification (for the check_post hook). Initially I tried to add this second hook into the original module, but I couldn't make it work properly in all cases, and so I made it into a separate module captchaP posted here: [www.phorum.org]
I've also added into both modules an automatic deletion by the modules themselves of the unused captcha images - see my previous post in this thread.
I've also added into both modules an automatic deletion by the modules themselves of the unused captcha images - see my previous post in this thread.
Quote
Panu
I quess you can do as instructed, but put {IF MOD_CAPTCHA_HTML}{MOD_CAPTCHA_HTML}{/IF} in post form instead and change the module to process post too
lines with:
if (phorum_page == "register" && !empty($_POST)) { should be something like if (phorum_page == "register" || phorum_page == "posting") && !empty($_POST)) {
The module runs in after header, and common hooks which are run after post as well so that should do it?
Maybe someone wants to enhance the module so that it's user definable where to use it?
I have installed this module, and it works. However . . . August 10, 2006 06:02PM |
Registered: 18 years ago Posts: 36 |
. . . the graphics images that are generated are EXCEEDINGLY difficult to read. I have attached some samples.
Are there any settings that can be configured to make the generated graphics more legible?
I understand that the point of the module is to generate graphics that a computer cannot read, but it seems that these graphics cannot be read by humans either! ;o)
Otherwise it is a very useful enhancement, and I thank the developers for it. Does anyone have any suggestions for a fix? Thanks!
--Timothy
Are there any settings that can be configured to make the generated graphics more legible?
I understand that the point of the module is to generate graphics that a computer cannot read, but it seems that these graphics cannot be read by humans either! ;o)
Otherwise it is a very useful enhancement, and I thank the developers for it. Does anyone have any suggestions for a fix? Thanks!
--Timothy
Re: I have installed this module, and it works. However . . . August 30, 2006 12:56PM |
Registered: 19 years ago Posts: 10 |
FYI, I used to get the following error:
I figured it out how to fix is and solve Timothy's issue above:
Edit capthca.php
Lines 77 to 80
change to:
Note that IM2 will be used as the image and the words will be readable. Also, I get no more errors.
Edited 1 time(s). Last edit at 08/30/2006 12:57PM by yorktown.
Quote
Fatal error: Call to undefined function: imagerotate() in /home/yorktown2/www/forums/asroc/mods/captcha/captcha.php on line 78
I figured it out how to fix is and solve Timothy's issue above:
Edit capthca.php
Lines 77 to 80
Quote
// rotate
$im = imagerotate($im2,rand(-13,21),$background);
imagedestroy($im2);
$middleground = imagecolorallocatealpha($im, rand(160, 200), rand(160, 200), rand(160, 200), 80);
change to:
Quote
/*rotate
$im = imagerotate($im2,rand(-13,21),$background);
imagedestroy($im2);
*/
$middleground = imagecolorallocatealpha($im2, rand(160, 200), rand(160, 200), rand(160, 200), 80);
Note that IM2 will be used as the image and the words will be readable. Also, I get no more errors.
Edited 1 time(s). Last edit at 08/30/2006 12:57PM by yorktown.
Sorry, only registered users may post in this forum.