Sep 07, 2008, 02:00 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: new captcha snippet  (Read 985 times)
0 Members and 1 Guest are viewing this topic.
dalekhin
Member
**
Posts: 54


« on: Jun 04, 2007, 02:49 PM »

Hello everyone!

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

Dmitry
Logged

rthrash
Foundation
*
Posts: 9,105



WWW
« Reply #1 on: Jun 04, 2007, 06:51 PM »

Absolutely ... would love to see that. Thanks for the offer. Smiley
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
davaeron
Testers
*
Posts: 25


Russian MODx Community


« Reply #2 on: Jun 05, 2007, 02:37 AM »

Is it interesting for community ?
Конечно интересно!
Выкладывай!
Logged
dalekhin
Member
**
Posts: 54


« Reply #3 on: Jun 05, 2007, 07:37 AM »

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 51 times.)
Logged

rthrash
Foundation
*
Posts: 9,105



WWW
« Reply #4 on: Jun 05, 2007, 08:18 AM »

Thanks for sharing... Smiley
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!