@ms, sure, you could even repurpose my original script into something like:
% /* Put this in theme.php, inside the `theme_custom` function. */ foreach ($template->query('.nnf_reply-author, #nnf_post-author') as $node) { $value = '<img src="/avatar/' . md5(trim($node->nodeValue)) . '.png" alt="" /> ' . $node->nodeValue; $node->nodeValue = ''; $frag = $node->ownerDocument->createDocumentFragment(); if (!@$frag->appendXML($value) || !@$node->appendChild($frag)) { throw new Exception("Invalid HTML"); } } %
This should (untested) put an IMG infront of each name showing a PNG file in the avatars directory with an md5 hash of the user name as its filename. Someone with the name ‘ms’ would get `ee33e909372d935d190f4fcb2a92d542.png` infront of their name.
Note that you might want to put in a check `if` such a `file_exists` or you are going to get a lot of 404 hits against your server.
Haven’t had the time yet to get around to a DOMTemplate function for YouTube embedding. Soon, I hope.