this would allow users to more easily update the module with drush without having to keep redownloading the recaptcha php library

suggested location for it would sites/all/libraries/recaptcha and the ideal solution would be to be able to select the directory the recaptcha library is contained in

Comments

robloach’s picture

Status: Active » Fixed

Actually, it's packed as part of the module in 6.x-1.x-dev ;-) . Libraries API is definitely a great solution around this though.

Status: Fixed » Closed (fixed)

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

hswong3i’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Closed (fixed) » Active

I double check with latest CVS of recaptcha.module but still not able to find the Library API integration (http://drupalcode.org/viewvc/drupal/contributions/modules/recaptcha/reca...).

Is there any schedule for this update? Or may I contribute for this issue?

hswong3i’s picture

Assigned: Unassigned » hswong3i
Status: Active » Needs review
StatusFileSize
new19.7 KB

Patch for above issues, including changes for:

  • Rename target library folder name as recaptcha-php, as unzip from original package.
  • Dynamic figure out recaptcha-php from: 1. preconfigured path from admin page, 2. recaptcha module path, and 3. from libraries_get_path() result if function exists.
  • Additional admin UI options for above preconfigure library path, plus checking during save configuration.
  • Code cleanup with code-clean.
  • Coding style cleanup with coder.
  • Remove the embed recaptcha/recaptchalib.php. As the original library is licensed under MIT, should it be a good idea to let end-user download and install it manually?

Completely tested with recaptcha-6.x-1.x-dev CVS. Please kindly review and feel free to comment with :D

manarth’s picture

Couple of minor comments on the patch:

-/* $Id: recaptcha.install,v 1.2.4.2.2.3.2.2 2009/07/28 15:39:20 robloach Exp $ */
+// $Id: recaptcha.install,v 1.2.4.2.2.3.2.2 2009/07/28 15:39:20 robloach Exp $

Should be

-/* $Id: recaptcha.install,v 1.2.4.2.2.3.2.2 2009/07/28 15:39:20 robloach Exp $ */
+// $Id$

 

And when giving error feedback:

+  else {
+    drupal_set_message(t('The recaptcha-php files <em>recaptchalib.php</em> could not be found in any possible directories.'));
+  }

drupal_set_message should be called with an error parameter: drupal_set_message('message', 'error');

hswong3i’s picture

StatusFileSize
new19.49 KB

@manarth: Totally agree, and patch update as attached. Thank you very much ;-)

liam morland’s picture

Title: allow recaptcha library to exist outside of the modules directory » Allow recaptcha library to exist outside of the modules directory
Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Needs work

The patch no longer applies. Please re-roll this patch for 7.x-1.x-dev. Once we have it working there, it can be backported to D6.

liam morland’s picture

Status: Needs work » Closed (won't fix)

recaptchalib is supplied with the module so I don't see any need for this. If you feel this is an important feature, please provide a patch and justification.