5 users online. Create an account or sign in to join them.Users
Hash the e-mail field in my DS
This is an open discussion with 3 replies, filed under Troubleshooting.
Search
Does this extension help?
Almost, but if I understand correctly that extension hashes the value written in that field in the section, without saving the "unhashed" text.
Currently there is no way to manipulate the data once it is in the main page SimpleXML object, however this is set to change with Rev 6 using DOMDocument instead.
For now, you have 2 options. The line where all the magic happens, I.E. where the XML representing your comment is appended to the page XML, is the appendFormattedElement() function of /symphony/lib/toolkit/fields/field.input.php. You can either change that to also add the MD5 hash, or duplicate the input field file, renaming the class and file, to create a new field that does specifically what you are after: adding the hash of value to the XML.
Hack
$wrapper->appendChild(new XMLElement($this->get('element_name'), ($encode ? General::sanitize($value) : $value), array('handle' => $data['handle'], 'hash' => md5($value))));
Hope that helps.
Create an account or sign in to comment.
I would like to add gravatar-support in my comments-DS on my website, but to do this I need a md5-hashed version of the e-mail-field. To do this I have to manually edit my 'data.comments.php', but I don't know how.
I tried to "debug" $result in the grab() function but it was way to complicated for me to edit myself, but at least I think it's somewhere there I should edit.
Can anyone help me?
The DS: http://www.purrito.net/tmp/data.comments.phps