e_emote)) { require_once(e_HANDLER.'emote_filter.php'); $tp->e_emote = new e_emoteFilter; } $str = ''; foreach($tp->e_emote->emotes as $key => $value) // filename => text code { $key = str_replace("!", ".", $key); // Usually '.' was replaced by '!' when saving $key = preg_replace("#_(\w{3})$#", ".\\1", $key); // '_' followed by exactly 3 chars is file extension $key = e_IMAGE."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path $value2 = substr($value, 0, strpos($value, " ")); $value = ($value2 ? $value2 : $value); $value = ($value == '&|') ? ':((' : $value; $value = " ".$value." "; //TODO CSS class $str .= "\n "; } return "