this is the whole code on functions:
public static function smileys($str, $adm = FALSE)
{
static $smileys_cache = array();
if (empty($smileys_cache)) {
$file = ROOTPATH . 'files/cache/smileys.dat';
if (file_exists($file) && ($smileys = file_get_contents($file)) !== FALSE) {
$smileys_cache = unserialize($smileys);
return strtr($str, ($adm ? array_merge($smileys_cache['usr'], $smileys_cache['adm']) : $smileys_cache['usr']));
} else {
return $str;
}
} else {
return strtr($str, ($adm ? array_merge($smileys_cache['usr'], $smileys_cache['adm']) : $smileys_cache['usr']));
}
}