You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michel Erard <mi...@gmail.com> on 2009/03/06 13:53:22 UTC
Custom validation-message.gif
Hello,
Is it possible to replace the validation-message.gif of cocoon forms in an
easy way?
Thanks, Mike
AW: Custom validation-message.gif
Posted by Christofer Dutz <ma...@c-ware.de>.
Hi Mike,
It was pretty easy to modify this.
By using the following pipeline, I used an alternate svg-xsl transformation.
You just have to make sure that you pass the correct value attribute to do
the output.
In my case all I had to do to block any attacker, was to add a leading
letter to the generated image and Writing a note next to the Field and to
the error message, to leave away the first letter ;-)
Hope this helps,
Chris
<map:pipeline type="noncaching">
<!--
| Generate the CAPTCHA image. Any type of generator can be used
here,
| as long as it reads the string to display from the session
| attribute named "captcha-{1}".
| Using an SVG file as input requires that the Batik block be
| included in the build.
-->
<map:match pattern="captcha-*.jpg">
<map:generate src="../../resources/utils/dummy.xml"/>
<map:transform
src="../../resources/stylesheets/captcha-image.xsl">
<map:parameter name="value"
value="{session-attr:captcha-{1}}"/>
</map:transform>
<map:serialize type="svg2jpeg"/>
</map:match>
</map:pipeline>
-----Ursprüngliche Nachricht-----
Von: Michel Erard [mailto:michel.erard@gmail.com]
Gesendet: Freitag, 6. März 2009 13:53
An: users@cocoon.apache.org
Betreff: Custom validation-message.gif
Hello,
Is it possible to replace the validation-message.gif of cocoon forms in an
easy way?
Thanks, Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org