| 1 | Author
|
|---|
| 2 | Mike Hallbauer
|
|---|
| 3 |
|
|---|
| 4 | Last update
|
|---|
| 5 | 20.01.2009
|
|---|
| 6 |
|
|---|
| 7 | HOWTO use com.zms.captcha:
|
|---|
| 8 |
|
|---|
| 9 | - extract *.py from this package to ZOPE_INSTANCE/lib/python/
|
|---|
| 10 | (inclusive packed folders)
|
|---|
| 11 | - import com.zms.captcha in ZMS
|
|---|
| 12 | - add a Captcha Meta-Attribute attribute to your target object
|
|---|
| 13 | - use com.zms.captcha->CaptchaLib->captcha_getContent to get
|
|---|
| 14 | HTML-code-snippet with captcha-content in your implementation
|
|---|
| 15 | - add com.zms-captcha->CatpchaLib->captcha_isValid to verify a
|
|---|
| 16 | posted captcha-code in your implementation
|
|---|
| 17 | - select a captcha-service in your target-object-instance
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | HOWTO develop new captcha-services:
|
|---|
| 21 |
|
|---|
| 22 | external python-service:
|
|---|
| 23 | - inherit from C_Captcha_Basic
|
|---|
| 24 | - overwrite function GetContent which returns a HTML-code-snippet
|
|---|
| 25 | with captcha-content (i.e. captcha-pic, input-field)
|
|---|
| 26 | - overwrite function IsCodeValid which returns a tupel with
|
|---|
| 27 | a boolean (is valid or not) and a string (i.e. error message)
|
|---|
| 28 | - register new service in C_Handler_Captcha's constructor
|
|---|
| 29 | - add new service-name in com.zms.captcha->CaptchaConfig->captchaService
|
|---|
| 30 |
|
|---|
| 31 | internal service:
|
|---|
| 32 | - create a methode to deliver a HTML-code-snippet with
|
|---|
| 33 | captcha-content (i.e. captcha-pic, input-field)
|
|---|
| 34 | - create a methode to check a posted captcha-code and deliver a
|
|---|
| 35 | tupel with a boolean (is valid or not) and a string (i.e. error message)
|
|---|
| 36 | - register new service in com.zms.captcha->CaptchaLib->captcha_getContent
|
|---|
| 37 | and call corresponding function to get HTML-code-snippet
|
|---|
| 38 | - register new service in com.zms.captcha->CaptchaLib-captcha_isValid,
|
|---|
| 39 | call correspondig function to verify posted captcha-code and get the
|
|---|
| 40 | result-tupel
|
|---|
| 41 | - add new service-name in com.zms.captcha->CaptchaConfig->captchaService
|
|---|
| 42 |
|
|---|
| 43 | in both cases:
|
|---|
| 44 | - add javascript code to show/hide your optionally service-special
|
|---|
| 45 | in com.zms.captcha->CaptchaConfig->Interface |
|---|