Closed (outdated)
Project:
CAPTCHA
Version:
8.x-1.x-dev
Component:
Image Captcha (image_captcha)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Dec 2009 at 08:07 UTC
Updated:
20 Oct 2022 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Riki_tiki_tavi commentedHere how it looks like
Comment #2
soxofaan commentedThat's funny, I worked yesterday on the same thing.
My patch (very basic, work in progress) is in attachment. The main difference is that it just reloads the image, but keeps the code. Currently reloading is triggered by clicking the image (so no text clues yet).
Some remarks on you patch:
-uand-poptions (see http://drupal.org/patch/create, under patch readability). Also see my patch.variable_get('image_captcha_image_reload_button', 0)andvariable_get('image_captcha_image_reload_button', FALSE)'#title' => t('Add a "reload captcha" link'),write CAPTCHA with all capitals (it's an abreviation)id="image-captcha"on the image, but there could be several CAPTCHA images on the same page, so the ID should be unique. I appended the CAPTCHA session ID to make it unique (see my patch)drupal_add_js('misc/jquery.js');this is done automatically if you use drupal_add_js. See my patch.I'm not in favor of writing to the captcha_session table in a place where we should only read. This feels like a hack and we should come up with a better solution here (that's why I limited my solution to reloading the image, but keeping the code). There is also code duplication for generating a new code.
In short, apart from some code style issues: I would first try to implement a simple reload feature, which keeps the code.
I think it's better/easier/cleaner to implement the generating-a-new-challenge in the CAPTCHA core module, so it can be applied to all sorts of challenges (like math, CSS CAPTCHA, text CAPTCHA, ...)
Anyway, thanks for your work
Comment #3
soxofaan commentedAlso, this is more or less a duplicate of #180328: AHAH/AJAX request for new challenge, but if we limit this thread to just reloading the image while keeping the code, we can keep this issue separate and do the generating-a-new-challenge feature in the other thread.
Comment #4
Riki_tiki_tavi commentedOoops. Sorry, i'm not quite familiar with patches :)
And yes, you're right it's a fast hack ;)
And I hope there would be a smooth solution for reloading in next versions of the CAPTCHA. Thanks.
Comment #5
suresh.gju commentedHi
I have also made fixes in image captcha module to give refresh functionality.
You can read this post http://drupal.org/node/274173#comment-1042232
Preview : http://sureshyadav.com/files/captcha.jpeg
You can verify at http://sureshyadav.com/user/register
(register please)
You can download the source code for captcha module from here:
http://sureshyadav.com/content/drupal-image-captcha-with-refresh-link
www.sureshyadav.com
-----------------------------------
When problem is clear, solution is near.
Comment #6
shenzhuxi commentedThe patch work great!
Confirmed.
; $Id: image_captcha.info,v 1.5 2008/02/17 12:49:24 soxofaan Exp $
name = "Image CAPTCHA"
description = "Provides an image based CAPTCHA. +patch http://drupal.org/node/654118"
package = "Spam control"
dependencies[] = captcha
core = 6.x
; Information added by drupal.org packaging script on 2010-03-18
version = "6.x-2.x-dev"
core = "6.x"
project = "captcha"
datestamp = "1268870551"
Comment #7
andyceo commentedWell, this looks good for me. Want to see that in the next CAPTCHA release.
Comment #8
shenzhuxi commentedWhy not merge to the trunk?
Comment #9
szadok commentedWhich patch worked great?
Comment #10
soxofaan commentedreroll
Comment #11
mustafa1453 commented#10: 654118_image-reload.patch queued for re-testing.
Comment #12
kscheirerSomething like this would be nice to get in...
I needed a patch similar to whats described in #1 - reload the image with a new code via ajax so the whole form doesn't need a refresh.
The attached patch is largely based on the code in #1, but as a standard unified drupal patch, and fixes some of the recommendations in #2 (still doesn't use js to write the reload link), updated to apply to version 6.x-2.2.
I'm leaving the status as RTBC for #10, but I'm posting this code in the hope that we can get a full image reload in.
Comment #14
kscheirersorry, should stay at RTBC for #10.
Comment #15
soxofaan commentedreroll of patch from #10
Comment #16
Stan.Ezersky commentedsoxofaan, thanks!
#15 works
Comment #17
jerry2.0 commentedComment #18
soxofaan commentedresetting title
Comment #19
awasson commentedSubscribing.
Thanks soxofaan. Your patch at #15 works perfectly.
Comment #20
nagini commentedimage_captcha.admin_.inc_.patch queued for re-testing.
Comment #21
Dubber Dan commentedHave manually made the changes as per #15 (as I've never got round to figuring out how to run a patch) but it doesn't make any difference and there's still no option to reload the image
http://www.elementsforlife.co.uk/shop/raw-chocolate-making-kits/raw-choc...
Anyone got suggestions?
Comment #22
awasson commentedIf you've done it correctly, you can click on the image and it will reload itself with the same set of characters but with varied sized letters and numbers which should make it easier to read. To make that useful, I find it best to edit the captcha message to say something like:
"This question is to prevent automated spam submissions.
If you find the image difficult to read, click it to reload."
Comment #23
Dubber Dan commentedIn that case something ain't right as it doesn't reload on clicking
Comment #24
wundo commentedDubber, I just went to your website and tested the CAPTCHA image reloading and it's working. Changing this as RTBC
Comment #25
soxofaan commentedOk, committed patch from #15 then
to be ported to Drupal 7 version
Comment #26
mjRocks commentedComment #27
soxofaan commented6.x-1.x is not supported anymore
Comment #28
donahoche commentedimage_captcha.admin_.inc_.patch queued for re-testing.
Comment #29
anybodyHi,
I could not find a reload functionality in the 6.2.x Version yet. Can anyone please tell, what's the case here and when this will be finally fixed (for D6)?
The 6.2.x seemed to be working already?!
Comment #30
soxofaan commented@Anybody in #29:
the feature is in version 6.x-2.x-dev for the moment (not in 6.x-2.4, it will be in 6.x-2.5)
note that it is a minor feature: there are no UI-strings indicating the feature, you just have to click the image
Comment #31
Leagnus commentedFor 7.9 works:
Comment #32
rogical commentedCan you provide a git patch so that users can get tested easily?
http://drupal.org/project/captcha/git-instructions -- Creating a patch
Comment #33
bartoll commentedHere there are patches that work for me.
First patch alloww reload captcha after clicking an image, second adds additional link to reload captcha.
Comment #35
ramsegal commentedbartoll - i tried using it, the captcha string doesnt change....the picture is re-rendered, but with the same characters.
Comment #36
rogical commentedhttp://drupal.org/project/draggable_captcha supports ajax refresh now.
Comment #37
ddrozdik commentedHi, try to use this module http://drupal.org/project/image_captcha_refresh for drupal 7.
If need for drupal 6 I will try to port it.
Comment #38
naveenvalechaMoving this to 8.x
Comment #39
couturier commentedThe 8.x version is needing some extra help. Is anyone able to assist? We still don't have a stable 8.x release.
Comment #40
anybodyThis has been fixed in #2608540: Add Image CAPTCHA Refresh to the module patch for Drupal 8.