On Aug 25, 2005, at 12:38 PM, Michael Peters wrote:
I'm not saying evey runmode should call create_captcha(), I'm saying create_captcha() should be a run mode in and of itself.
Thanks! :) That was painfully obvious when you explained it to me. I can't believe that I missed that before ;)
So, essentially we change the type of header produced by C::A, then return the image data from the runmode? Am I following correctly?Correct. The header should include the cookie information and the content type (like 'image/gif', etc).If so, what of cgiapp_postrun? For those of us that sometimes alter headers there, this would be an issue to be contended with.That's a good question. It's possible that a postrun could alter headersincorrectly or mangle the image. There's a couple of options that come to mind quickly. How good they are is definitely a wildcard :) + Check your get_current_rm() in postrun and don't do anything if it's'create_captcha'. This could be a headache if you do postrun processingin your base class (but not too bad). The biggest issue would be other plugins trying to do something there.
I think I like this the best of the three. I don't think that it's any more strange than my multiple inheritance requirement for CAP::HTDot. I would hope that, in most cases, it would be a small tradeoff to get the CAPTCHA functionality.
+ Have a separate class that just does the CAPTCH generation. This wouldof course need it's one instance script (if you use them). It would be separate from the code using the CAPTCHA, but it shouldn't matter. But it does seem sorta hackish
Hackish, but it works ;-)
+ Maybe C::A needs a way for a plugin to not only register a callback, but also unregister a hook/callback. So the create_captcha() run mode would just make sure there are no postruns running. This could cause problems though if you have postruns that need to run that wouldn't affect the headers or the image.
Interesting, but I see a lot of potential breakage as a result of that.
Thanks for the ideas, explanation, and help :)
Jason
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.