smilies[':)'] = '001_smile.gif'; $this->smilies[':('] = 'sad.gif'; $this->smilies[':D'] = 'biggrin.gif'; $this->smilies[':P'] = '001_tongue.gif'; $this->init = true; } function parseSmilies($text) { if (!$this->init) { $this->init(); } foreach ($this->smilies as $name => $value) { $text = str_replace($name, '' . $name . '', $text); } return $text; } } function parseSmilies($text) { global $smilies; if (!isset($smilies)) { $smilies = new Smilies(); } return $smilies->parseSmilies($text); } ?>