Topic: new captcha snippet  (Read 1895 times)

Pages: [1]   Go Down

#1: 4-Jun-2007, 02:49 PM

dalekhin
Posts: 54

Hello everyone!

I have adopted russian captcha algoritms ( http://www.captcha.ru/en/ ) to MODx as snippet. Is it interesting for community ?

Dmitry

#2: 4-Jun-2007, 06:51 PM

Foundation

rthrash
Posts: 11,353

WWW
Absolutely ... would love to see that. Thanks for the offer. Smiley
MODx is a content managmeent framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Please help us help you when asking for assistance and read the wiki. Searching the forums from the top level helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.

#3: 5-Jun-2007, 02:37 AM

Testers

davaeron
Posts: 25

Russian MODx Community

Is it interesting for community ?
Конечно интересно!
Выкладывай!

#4: 5-Jun-2007, 07:37 AM

dalekhin
Posts: 54

Great, thanks.

So , please find attached zip archive with captcha snippet.

How to use it:
1) Unpack zip file
2) Place 'fonts' dir with images into the assets directory
3) Make new snippet for example with name 'kcaptcha' in manager, paste content of kcaptcha_snippet.php into it.
So every time you'll call kcaptcha snippet it will generate image with random captcha string and will set 'captcha_keystring' session variable with
keystring from captcha image.

How  use it in CMS:

1) Make new content type in MODx configuration  for images - in my case it is  'image/gif'
2) Make new template for example with name 'kcaptcha'  with only one call of snippet - [[kcaptcha]] ( you can add additional config parameters to this call -
size, background, etc. please refer header of snippet for additional info )
3) Make new empty document in document manager with template 'kcaptcha' , set alias to 'image.gif' ( or whatever or want with .gif)  and  type 'image/gif'

So far, you are ready.

Every call http://www.yousite.com/image.gif will generate captcha image and set session variable to keystring.

I am novice in MODx cms, so may be here is the more clear way to use snippets ?  For example may be better set some variable not session var ?
I don't know how to make it, so any ideas will be helpful.
Thanks,
Dmitry








* kcaptha.zip (153.9 KB - downloaded 134 times.)

#5: 5-Jun-2007, 08:18 AM

Foundation

rthrash
Posts: 11,353

WWW
Thanks for sharing... Smiley
MODx is a content managmeent framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Please help us help you when asking for assistance and read the wiki. Searching the forums from the top level helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.