Browse Source

smiley filter

pull/1/head
Friendika 11 years ago
parent
commit
eb13833d2a
  1. 21
      boot.php
  2. BIN
      images/smiley-cool.gif
  3. BIN
      images/smiley-cry.gif
  4. BIN
      images/smiley-embarassed.gif
  5. BIN
      images/smiley-foot-in-mouth.gif
  6. BIN
      images/smiley-frown.gif
  7. BIN
      images/smiley-innocent.gif
  8. BIN
      images/smiley-kiss.gif
  9. BIN
      images/smiley-laughing.gif
  10. BIN
      images/smiley-money-mouth.gif
  11. BIN
      images/smiley-sealed.gif
  12. BIN
      images/smiley-smile.gif
  13. BIN
      images/smiley-surprised.gif
  14. BIN
      images/smiley-tongue-out.gif
  15. BIN
      images/smiley-undecided.gif
  16. BIN
      images/smiley-wink.gif
  17. BIN
      images/smiley-yell.gif
  18. 2
      mod/display.php
  19. 2
      mod/network.php
  20. 2
      mod/profile.php

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);
}}

BIN
images/smiley-cool.gif

After

Width: 18  |  Height: 18  |  Size: 354 B

BIN
images/smiley-cry.gif

After

Width: 18  |  Height: 18  |  Size: 329 B

BIN
images/smiley-embarassed.gif

After

Width: 18  |  Height: 18  |  Size: 331 B

BIN
images/smiley-foot-in-mouth.gif

After

Width: 18  |  Height: 18  |  Size: 344 B

BIN
images/smiley-frown.gif

After

Width: 18  |  Height: 18  |  Size: 340 B

BIN
images/smiley-innocent.gif

After

Width: 18  |  Height: 18  |  Size: 336 B

BIN
images/smiley-kiss.gif

After

Width: 18  |  Height: 18  |  Size: 338 B

BIN
images/smiley-laughing.gif

After

Width: 18  |  Height: 18  |  Size: 344 B

BIN
images/smiley-money-mouth.gif

After

Width: 18  |  Height: 18  |  Size: 321 B

BIN
images/smiley-sealed.gif

After

Width: 18  |  Height: 18  |  Size: 325 B

BIN
images/smiley-smile.gif

After

Width: 18  |  Height: 18  |  Size: 345 B

BIN
images/smiley-surprised.gif

After

Width: 18  |  Height: 18  |  Size: 342 B

BIN
images/smiley-tongue-out.gif

After

Width: 18  |  Height: 18  |  Size: 328 B

BIN
images/smiley-undecided.gif

After

Width: 18  |  Height: 18  |  Size: 337 B

BIN
images/smiley-wink.gif

After

Width: 18  |  Height: 18  |  Size: 351 B

BIN
images/smiley-yell.gif

After

Width: 18  |  Height: 18  |  Size: 336 B

2
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,

2
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,

2
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,

Loading…
Cancel
Save