diff options
-rw-r--r-- | boot.php | 21 | ||||
-rw-r--r-- | images/smiley-cool.gif | bin | 0 -> 354 bytes | |||
-rw-r--r-- | images/smiley-cry.gif | bin | 0 -> 329 bytes | |||
-rw-r--r-- | images/smiley-embarassed.gif | bin | 0 -> 331 bytes | |||
-rw-r--r-- | images/smiley-foot-in-mouth.gif | bin | 0 -> 344 bytes | |||
-rw-r--r-- | images/smiley-frown.gif | bin | 0 -> 340 bytes | |||
-rw-r--r-- | images/smiley-innocent.gif | bin | 0 -> 336 bytes | |||
-rw-r--r-- | images/smiley-kiss.gif | bin | 0 -> 338 bytes | |||
-rw-r--r-- | images/smiley-laughing.gif | bin | 0 -> 344 bytes | |||
-rw-r--r-- | images/smiley-money-mouth.gif | bin | 0 -> 321 bytes | |||
-rw-r--r-- | images/smiley-sealed.gif | bin | 0 -> 325 bytes | |||
-rw-r--r-- | images/smiley-smile.gif | bin | 0 -> 345 bytes | |||
-rw-r--r-- | images/smiley-surprised.gif | bin | 0 -> 342 bytes | |||
-rw-r--r-- | images/smiley-tongue-out.gif | bin | 0 -> 328 bytes | |||
-rw-r--r-- | images/smiley-undecided.gif | bin | 0 -> 337 bytes | |||
-rw-r--r-- | images/smiley-wink.gif | bin | 0 -> 351 bytes | |||
-rw-r--r-- | images/smiley-yell.gif | bin | 0 -> 336 bytes | |||
-rw-r--r-- | mod/display.php | 2 | ||||
-rw-r--r-- | mod/network.php | 2 | ||||
-rw-r--r-- | mod/profile.php | 2 |
20 files changed, 24 insertions, 3 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 diff --git a/images/smiley-cool.gif b/images/smiley-cool.gif Binary files differnew file mode 100644 index 000000000..ba90cc36f --- /dev/null +++ b/images/smiley-cool.gif diff --git a/images/smiley-cry.gif b/images/smiley-cry.gif Binary files differnew file mode 100644 index 000000000..74d897a4f --- /dev/null +++ b/images/smiley-cry.gif diff --git a/images/smiley-embarassed.gif b/images/smiley-embarassed.gif Binary files differnew file mode 100644 index 000000000..963a96b8a --- /dev/null +++ b/images/smiley-embarassed.gif diff --git a/images/smiley-foot-in-mouth.gif b/images/smiley-foot-in-mouth.gif Binary files differnew file mode 100644 index 000000000..16f68cc1e --- /dev/null +++ b/images/smiley-foot-in-mouth.gif diff --git a/images/smiley-frown.gif b/images/smiley-frown.gif Binary files differnew file mode 100644 index 000000000..716f55e16 --- /dev/null +++ b/images/smiley-frown.gif diff --git a/images/smiley-innocent.gif b/images/smiley-innocent.gif Binary files differnew file mode 100644 index 000000000..334d49e0e --- /dev/null +++ b/images/smiley-innocent.gif diff --git a/images/smiley-kiss.gif b/images/smiley-kiss.gif Binary files differnew file mode 100644 index 000000000..4efd549ed --- /dev/null +++ b/images/smiley-kiss.gif diff --git a/images/smiley-laughing.gif b/images/smiley-laughing.gif Binary files differnew file mode 100644 index 000000000..1606c119e --- /dev/null +++ b/images/smiley-laughing.gif diff --git a/images/smiley-money-mouth.gif b/images/smiley-money-mouth.gif Binary files differnew file mode 100644 index 000000000..ca2451e10 --- /dev/null +++ b/images/smiley-money-mouth.gif diff --git a/images/smiley-sealed.gif b/images/smiley-sealed.gif Binary files differnew file mode 100644 index 000000000..b33d3cca1 --- /dev/null +++ b/images/smiley-sealed.gif diff --git a/images/smiley-smile.gif b/images/smiley-smile.gif Binary files differnew file mode 100644 index 000000000..e6a9e60d5 --- /dev/null +++ b/images/smiley-smile.gif diff --git a/images/smiley-surprised.gif b/images/smiley-surprised.gif Binary files differnew file mode 100644 index 000000000..cb99cdd91 --- /dev/null +++ b/images/smiley-surprised.gif diff --git a/images/smiley-tongue-out.gif b/images/smiley-tongue-out.gif Binary files differnew file mode 100644 index 000000000..2075dc160 --- /dev/null +++ b/images/smiley-tongue-out.gif diff --git a/images/smiley-undecided.gif b/images/smiley-undecided.gif Binary files differnew file mode 100644 index 000000000..bef7e2573 --- /dev/null +++ b/images/smiley-undecided.gif diff --git a/images/smiley-wink.gif b/images/smiley-wink.gif Binary files differnew file mode 100644 index 000000000..9faf1aff8 --- /dev/null +++ b/images/smiley-wink.gif diff --git a/images/smiley-yell.gif b/images/smiley-yell.gif Binary files differnew file mode 100644 index 000000000..648e6e879 --- /dev/null +++ b/images/smiley-yell.gif diff --git a/mod/display.php b/mod/display.php index ec036de62..369161619 100644 --- a/mod/display.php +++ b/mod/display.php @@ -249,7 +249,7 @@ function display_content(&$a) { '$osparkle' => $osparkle, '$thumb' => $profile_avatar, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, diff --git a/mod/network.php b/mod/network.php index c52bb74fc..43c55b8e3 100644 --- a/mod/network.php +++ b/mod/network.php @@ -292,7 +292,7 @@ function network_content(&$a, $update = 0) { '$osparkle' => $osparkle, '$sparkle' => $sparkle, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, diff --git a/mod/profile.php b/mod/profile.php index d09e0187b..a431f4bdd 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -388,7 +388,7 @@ function profile_content(&$a, $update = 0) { '$thumb' => $profile_avatar, '$sparkle' => $sparkle, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, |