[pmwiki-users] fox / encryption / templates

Jon Haupt jhaupt at gmail.com
Sat Sep 15 18:37:09 CDT 2007


Good evening,

I am playing around with Gravatars [1] and comment boxes.
Constructing a Gravatar url is actually quite easy, and the only
really part that requires markup intervention is that it requires that
the e-mail address be encrypted using md5.  I'm aware that the effect
has been achieved using commentbox3.php, but I am quite fond of Fox,
and would like to make it work over there.

It's very easy to achieve the correct *end result* (a gravatar
appearing on the page) by creating a markup expression, like this

SDVA($MarkupExpr, array( 'md5' => 'md5($args[0])'));

and then place the following code in your Fox template for an image:

http://gravatar.com/avatar.php?gravatar_id={(md5
{$$email})}&rating=pg&size=64&foo.png

However, the problem here is that the source of the page still
contains the e-mail address in plain text.  I would like to encrypt
the text for good even in the edit window, as in the (:encrypt:)
markup.  However, if I create a similar (:md5:) markup, it
unfortunately breaks the template (changing the (:md5 {$$email}:) to
crypted text before I've managed to make a comment).  Any suggestions
how I might avoid this problem?

Jon Haupt

[1] http://site.gravatar.com



More information about the pmwiki-users mailing list