smiley filter
21
boot.php
|
@ -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);
|
||||
}}
|
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 344 B |
After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 344 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 325 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 342 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 336 B |
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|