<?php
if (!defined('IN_OELOVE')) {
    exit('OElove[OEPHP] Access Denied');
}
function smarty_modifier_hideemail($str, $star=2){
	if (!empty($str)) {
        if (strpos($str, "@")) {
            $str_arr = explode("@", $str);
            $first = @$str_arr[0];
            $last = @$str_arr[1];

            if (strlen($first) > 2) {
                $first = substr_replace($first, '***', $star);
            }
            $str = $first."@".$last;
        }
	}
	return $str;
}
?>