4
md5hash() - although this is the hashing function and not a checksum check:
/*
* Smarty plugin
* -------------------------------------------------------------
* Type: function
* Name: md5hash
* Purpose: return the md5() hash of a string
* -------------------------------------------------------------
*/
function smarty_function_md5hash($params, &$smarty)
{
if (!in_array('value', array_keys($params))) {
$smarty->trigger_error("md5hash: missing 'value' parameter");
return;
}
$hash = md5($params['value']);
return $hash;
}
?>
Put in a file called function.md5hash.php and place it in /class/smarty/plugins and you will be able to use <{md5hash value="string_to_hash"}> in your templates.
if you write out the PHP function of the regex completely, I'll do that, too.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."
Cusix Software