diff options
author | Friendika <info@friendika.com> | 2010-12-08 17:05:51 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-08 17:05:51 -0800 |
commit | eb13833d2a81dbe3bc11039061f718846e7f5be9 (patch) | |
tree | b9c5165bb39868385a5a3becb12c072a372d0688 /boot.php | |
parent | 4d0f0f9a9413ae7826c8eb1573eb4e5873c0ed3a (diff) | |
download | volse-hubzilla-eb13833d2a81dbe3bc11039061f718846e7f5be9.tar.gz volse-hubzilla-eb13833d2a81dbe3bc11039061f718846e7f5be9.tar.bz2 volse-hubzilla-eb13833d2a81dbe3bc11039061f718846e7f5be9.zip |
smiley filter
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1589,4 +1589,25 @@ if(! function_exists('linkify')) { function linkify($s) { $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s); return($s); +}} + +if(! function_exists('smilies')) { +function smilies($s) { + $a = get_app(); + + return str_replace( + array( ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'), + array( + '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />', + '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />' + ), $s); }}
\ No newline at end of file |