Any volunteer to port this great module to Drupal 7? I would be happy to contribute testing and an updated README.txt file.

Comments

peterx’s picture

I had a crack at using captcha in D7. .info needs the following. The files specifications are ignored in D6 and could be added now.

core = 7.x
files[] = captcha.admin.inc
files[] = captcha.inc
files[] = captcha.install
files[] = captcha.module

All the database calls are changed. I could not find the equivalent of an SQL x = x+1 increment. The forms have lots of little changes that are not all documented. Both db and form errors crash Drupal with unhandled errors.

Captcha needs testing with strict because I ran into several strict errors before giving up. Most of the errors are in code that assumes all entries exist in arrays even when an array comes from an unknown source. Perhaps when captcha is strict, D7 gets more complete error handling, and the forms handling becomes reliable, a D7 conversion will be a 3 hour job instead of a 3 day job.

BenK’s picture

Subscribing...

soxofaan’s picture

port to Drupal 7 has started:
http://drupal.org/cvs?commit=331250
http://drupal.org/cvs?commit=331256
http://drupal.org/cvs?commit=331336

the dev snapshot should be available shortly (but it's very alpha at this point, so don't expect much)

soxofaan’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev

FYI: in http://drupal.org/node/868908#comment-3403774, R2-D8 started on port of image CAPTCHA module

R2-D8’s picture

Hello again,
better late than never here's the UNOFFICIAL first working release of captcha-7.x.

For a quick overview I attached an patch-file*.

@soxofaan
- I maybe left some dirty overrides; please have a look.
- I registered for GitHub but didn't come that far with all this svn-stuff yet. I'm working on it.

*UPDATE:
I forgot to revert some changes in folder structur this testing version-
so the patch is useless actually.

For now you can use the packed testing module.
I'll offer the corrected versions later on.

jen.c.harlan’s picture

subscribing

soxofaan’s picture

Awesome R2-D8!
I'll have a look into this when I have some more time
big thanks for your work

soxofaan’s picture

to be taken into account for image CAPTCHA port: #968792: file_directory_path() should be removed from Image Captcha (D7)

rfay’s picture

subscribe

Azol’s picture

StatusFileSize
new1.54 KB

I didn't see that these fixes were already supplied in #5, ignore this patch

pavel.karoukin’s picture

2Azol and others doing porting - while I was working on porting another feature to D7 for image_captcha, I ported image_captcha module itself. Here is combined patch - http://drupal.org/node/893170#comment-3688446 - probably you can use something.

Azol’s picture

Module version in #5 does fix the Image captcha, the only bug that remains is no font preview pictures available on captcha settings page (it displays picture placeholders only).

pavel.karoukin’s picture

@soxofaan - we need to do initial port of image_captcha.module first before we can port additional features =)) there is too much overlapping stuff already.

soxofaan’s picture

Hi all,

I found some time to review the patch from #5 by R2-D8 and committed already parts of it:
http://drupal.org/cvs?commit=452102 (image_captcha.info)
http://drupal.org/cvs?commit=452110 (image_captcha.module)
http://drupal.org/cvs?commit=452130 (image_captcha.install)

Due to lack of time I couldn't get further. I hope to be able to continue tomorrow.
I also skipped some parts from the files I did review and commit though, but I will also comment on this later.

podarok’s picture

subscribing

soxofaan’s picture

Status: Active » Fixed

Hi all,

good news,
I finalized reviewing and committing the patch of R2-D8 from #5:
http://drupal.org/cvs?commit=453482
http://drupal.org/cvs?commit=453490

Some things I didn't commit directly or changed:

  • there was a bit too much in the ported .info files: parts that are automatically added by the packaging script and some "files[]" lines with non code files.
  • the attaching of css and js on captcha admin form were wiped out in the original patch
  • I removed support for fonts in the "files directory" (public://), which makes things easier and more secure, see #737832: Make scanning of files folder for fonts optional for D6 version (already dropped in D7 version)
  • Fixed/simplified the "columnification" of the font previews"
  • as far as I know, strings in hook_requirements still need to be translated, unlike noted in original patch
  • fixed the javascript in image_captcha.js
  • there was something strange in the patch in the function "_image_captcha_get_enabled_fonts" I didn't understand

Thanks again R2-D8 for the hard work.

This marks the end of the main part of the Drupal 7 port of the CAPTCHA module, yay.
But there are probably still some issues/bugs left, so to all:
please try it out and report remaining problems/issues (e.g. by reopening this thread)

podarok’s picture

http://drupal.org/node/723600

this one works for me, thx

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.