We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6366
    • 54 Posts
    Hello everyone!

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

    Dmitry
      • 25663 MODX Staff
      • 12,272 Posts
      Absolutely ... would love to see that. Thanks for the offer. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6645
        • 25 Posts
        Quote from: dalekhin at Jun 04, 2007, 02:49 PM

        Is it interesting for community ?
        Конечно интересно!
        Выкладывай!
          • 6366
          • 54 Posts
          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







            • 25663 MODX Staff
            • 12,272 Posts
            Thanks for sharing... smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me