Closed (outdated)
Project:
CAPTCHA
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2010 at 11:09 UTC
Updated:
17 Jan 2018 at 01:26 UTC
Jump to comment: Most recent
Comments
Comment #1
soxofaan commentedhi,
what you want is not possible out of the box,
but here is some inspiration that should help to do it with some custom coding:
#481408: CAPTCHA before downloading files
#743056: Document how to add a CAPTCHA programmatically
Comment #2
iantresman commentedThanks for the pointers. I figured that there would be some PHP required, after all, the previous post I mentioned, seemed to work for an earlier version of CAPTCHA.
Comment #3
iantresman commentedThis code snippet will display the contents of a node (page), only if the captcha is successfully validated.
The code snippet seems to be working for me with CAPTCHA Version: 6.x-2.2 and Captcha Riddler 6.x-1.1. I am not a programmer, so do not know whether this code is kosher, conforms to Drupal security policies, or whether it will work in future Captcha upgrades.
Installation:
admin/user/captcha, in the Persistence section, select "Omit challenges for a form once the user has successfully responded to a challenge for that form" (otherwise it will just be displayed again).Note that:
Code begins:
real content of the node!!
} /* end of captcha test */Code ends..
Credit due to ingomueller.net for a previous version of this snippet that worked with an earlier version of captcha.
Comment #4
ingomueller.net commentedHi iantresman!
Thanks a lot for your improvements! Finally migrating to drupal 6, I just stumbled about your post. I found that the following was necessary though, as authenticated users did not have access otherwise:
Cheers, Ingo
Update
What I wrote is actually not true. What is important though is that the persistence type is set to "Omit challenges on a form type once the user successfully responds to a challenge on a form of that type.".
Update2
I do think in the end that my proposed change is necessary. When I was in doubt earlier, I must have had entered a Captcha before, and the form got validated by that...
Comment #5
wundo commented