|
Revision 2, 1.4 kB
(checked in by nperriault, 8 months ago)
|
First commit of the extracted code from production, I hope no passwd has been forgotten :-)
|
| Line | |
|---|
| 1 |
= Cryptographp Symfony Plugin = |
|---|
| 2 |
|
|---|
| 3 |
Use the Cryptographp library to create Captchas in Symfony applications. |
|---|
| 4 |
|
|---|
| 5 |
== Installation == |
|---|
| 6 |
|
|---|
| 7 |
* Install the plugin |
|---|
| 8 |
|
|---|
| 9 |
{{{ |
|---|
| 10 |
$ symfony plugin-install http://plugins.symfony-project.com/sfCryptographpPlugin |
|---|
| 11 |
}}} |
|---|
| 12 |
|
|---|
| 13 |
* Clear your cache |
|---|
| 14 |
|
|---|
| 15 |
{{{ |
|---|
| 16 |
$symfony cc |
|---|
| 17 |
}}} |
|---|
| 18 |
|
|---|
| 19 |
== Configure plugin == |
|---|
| 20 |
|
|---|
| 21 |
This plugin can be easily configured with the app.yml file. See lib/crypt/config.inc.php |
|---|
| 22 |
and http://www.cryptographp.com/index.php?page=33 for details about available options. |
|---|
| 23 |
|
|---|
| 24 |
== Use the plugin == |
|---|
| 25 |
|
|---|
| 26 |
Two helper functions can be used in your template |
|---|
| 27 |
{{{ |
|---|
| 28 |
use_helper('Cryptographp'); |
|---|
| 29 |
cryptographp_picture(); |
|---|
| 30 |
cryptographp_reload(); |
|---|
| 31 |
}}} |
|---|
| 32 |
The first one display the cryptogram as described in the configuration file, the second one |
|---|
| 33 |
is the reload button, if the user can't read the picture and want to use another one. |
|---|
| 34 |
|
|---|
| 35 |
You must also create a validator for your form with sfCryptographpValidator, like this : |
|---|
| 36 |
{{{ |
|---|
| 37 |
crypto: |
|---|
| 38 |
required: |
|---|
| 39 |
msg: security code required |
|---|
| 40 |
sfCryptographpValidator: |
|---|
| 41 |
code_error: security code incorrect |
|---|
| 42 |
}}} |
|---|
| 43 |
|
|---|
| 44 |
== Versions == |
|---|
| 45 |
1.0.0 => First version, uses Cryptographp 1.3 |
|---|
| 46 |
1.1.0 => Updated to Cryptographp 1.4, thanks to Florian |
|---|
| 47 |
|
|---|
| 48 |
== Copyright == |
|---|
| 49 |
|
|---|
| 50 |
sfCryptographpPlugin (c) Leo CACHEUX, Florian REY |
|---|
| 51 |
Cryptographp (c) Sylvain BRISON |
|---|
| 52 |
|
|---|
| 53 |
http://www.mog-soft.com/symfony |
|---|
| 54 |
http://www.symfony-project.com |
|---|
| 55 |
http://www.cryptographp.com |
|---|