smiley filter
21
boot.php
|
@ -1590,3 +1590,24 @@ function linkify($s) {
|
||||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s);
|
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s);
|
||||||
return($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);
|
||||||
|
}}
|
BIN
images/smiley-cool.gif
Normal file
After Width: | Height: | Size: 354 B |
BIN
images/smiley-cry.gif
Normal file
After Width: | Height: | Size: 329 B |
BIN
images/smiley-embarassed.gif
Normal file
After Width: | Height: | Size: 331 B |
BIN
images/smiley-foot-in-mouth.gif
Normal file
After Width: | Height: | Size: 344 B |
BIN
images/smiley-frown.gif
Normal file
After Width: | Height: | Size: 340 B |
BIN
images/smiley-innocent.gif
Normal file
After Width: | Height: | Size: 336 B |
BIN
images/smiley-kiss.gif
Normal file
After Width: | Height: | Size: 338 B |
BIN
images/smiley-laughing.gif
Normal file
After Width: | Height: | Size: 344 B |
BIN
images/smiley-money-mouth.gif
Normal file
After Width: | Height: | Size: 321 B |
BIN
images/smiley-sealed.gif
Normal file
After Width: | Height: | Size: 325 B |
BIN
images/smiley-smile.gif
Normal file
After Width: | Height: | Size: 345 B |
BIN
images/smiley-surprised.gif
Normal file
After Width: | Height: | Size: 342 B |
BIN
images/smiley-tongue-out.gif
Normal file
After Width: | Height: | Size: 328 B |
BIN
images/smiley-undecided.gif
Normal file
After Width: | Height: | Size: 337 B |
BIN
images/smiley-wink.gif
Normal file
After Width: | Height: | Size: 351 B |
BIN
images/smiley-yell.gif
Normal file
After Width: | Height: | Size: 336 B |
|
@ -249,7 +249,7 @@ function display_content(&$a) {
|
||||||
'$osparkle' => $osparkle,
|
'$osparkle' => $osparkle,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
'$title' => $item['title'],
|
'$title' => $item['title'],
|
||||||
'$body' => bbcode($item['body']),
|
'$body' => smilies(bbcode($item['body'])),
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
'$location' => $location,
|
'$location' => $location,
|
||||||
|
|
|
@ -292,7 +292,7 @@ function network_content(&$a, $update = 0) {
|
||||||
'$osparkle' => $osparkle,
|
'$osparkle' => $osparkle,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$title' => $item['title'],
|
'$title' => $item['title'],
|
||||||
'$body' => bbcode($item['body']),
|
'$body' => smilies(bbcode($item['body'])),
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
'$location' => $location,
|
'$location' => $location,
|
||||||
|
|
|
@ -388,7 +388,7 @@ function profile_content(&$a, $update = 0) {
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
'$sparkle' => $sparkle,
|
'$sparkle' => $sparkle,
|
||||||
'$title' => $item['title'],
|
'$title' => $item['title'],
|
||||||
'$body' => bbcode($item['body']),
|
'$body' => smilies(bbcode($item['body'])),
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$lock' => $lock,
|
'$lock' => $lock,
|
||||||
'$location' => $location,
|
'$location' => $location,
|
||||||
|
|