From ef2e7b3f9d264ec146d4dae257b1e295ab3b462a Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 21 Apr 2015 12:45:58 +0200 Subject: updates - plugins as a separate git folder --- plugins/emoticons/emoticons.php | 78 ----------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 plugins/emoticons/emoticons.php (limited to 'plugins/emoticons/emoticons.php') diff --git a/plugins/emoticons/emoticons.php b/plugins/emoticons/emoticons.php deleted file mode 100644 index 187e83827..000000000 --- a/plugins/emoticons/emoticons.php +++ /dev/null @@ -1,78 +0,0 @@ -add_hook('message_part_after', array($this, 'replace')); - } - - function replace($args) - { - // This is a lookbehind assertion which will exclude html entities - // E.g. situation when ";)" in "")" shouldn't be replaced by the icon - // It's so long because of assertion format restrictions - $entity = '(? $this->img_tag('smiley-smile.gif', ':)' ), - '/:-\)/' => $this->img_tag('smiley-smile.gif', ':-)' ), - '/(? $this->img_tag('smiley-laughing.gif', ':D' ), - '/:-D/' => $this->img_tag('smiley-laughing.gif', ':-D' ), - '/:\(/' => $this->img_tag('smiley-frown.gif', ':(' ), - '/:-\(/' => $this->img_tag('smiley-frown.gif', ':-(' ), - '/'.$entity.';\)/' => $this->img_tag('smiley-wink.gif', ';)' ), - '/'.$entity.';-\)/' => $this->img_tag('smiley-wink.gif', ';-)' ), - '/8\)/' => $this->img_tag('smiley-cool.gif', '8)' ), - '/8-\)/' => $this->img_tag('smiley-cool.gif', '8-)' ), - '/(? $this->img_tag('smiley-surprised.gif', ':O' ), - '/(? $this->img_tag('smiley-surprised.gif', ':-O' ), - '/(? $this->img_tag('smiley-tongue-out.gif', ':P' ), - '/(? $this->img_tag('smiley-tongue-out.gif', ':-P' ), - '/(? $this->img_tag('smiley-yell.gif', ':@' ), - '/(? $this->img_tag('smiley-yell.gif', ':-@' ), - '/O:\)/i' => $this->img_tag('smiley-innocent.gif', 'O:)' ), - '/O:-\)/i' => $this->img_tag('smiley-innocent.gif', 'O:-)' ), - '/(? $this->img_tag('smiley-embarassed.gif', ':$' ), - '/(? $this->img_tag('smiley-embarassed.gif', ':-$' ), - '/(? $this->img_tag('smiley-kiss.gif', ':*' ), - '/(? $this->img_tag('smiley-kiss.gif', ':-*' ), - '/(? $this->img_tag('smiley-undecided.gif', ':S' ), - '/(? $this->img_tag('smiley-undecided.gif', ':-S' ), - ); - - if ($args['type'] == 'plain') { - $args['body'] = preg_replace( - array_keys($map), array_values($map), $args['body']); - } - - return $args; - } - - private function img_tag($ico, $title) - { - $path = './program/js/tinymce/plugins/emoticons/img/'; - return html::img(array('src' => $path.$ico, 'title' => $title)); - } -} -- cgit v1.2.3