diff --git a/contrib/emoticons/main.php b/contrib/emoticons/main.php index 9144c2eb..9cc1d34f 100644 --- a/contrib/emoticons/main.php +++ b/contrib/emoticons/main.php @@ -6,22 +6,14 @@ * Description: Turn :smile: into a link to smile.gif */ -class Emoticons implements Extension { - public function receive_event(Event $event) { - if($event instanceof TextFormattingEvent) { - $event->formatted = $this->bbcode_to_html($event->formatted); - $event->stripped = $this->bbcode_to_text($event->stripped); - } - } - - private function bbcode_to_html($text) { +class Emoticons extends FormatterExtension { + public function format($text) { $data_href = get_base_href(); $text = preg_replace("/:([a-z]*?):/s", "", $text); return $text; } - private function bbcode_to_text($text) { - // $text = preg_replace("/:([a-z]*?):/s", "\\1", $text); + public function strip($text) { return $text; } }