diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2012-03-22 06:27:13 +0100 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2012-03-22 06:27:13 +0100 |
commit | 5189a56ef832e1c5c6976f87d77d218bf4a6c221 (patch) | |
tree | 4c1aa63a36eeaadab00c61eb05f3f9f5ae0da095 /include/text.php | |
parent | 751e4181e5e875b9f9850700a3687774e4c53ab3 (diff) | |
parent | d81256d7b051d9a76b087feeb64ac79fb4aeff4d (diff) | |
download | volse-hubzilla-5189a56ef832e1c5c6976f87d77d218bf4a6c221.tar.gz volse-hubzilla-5189a56ef832e1c5c6976f87d77d218bf4a6c221.tar.bz2 volse-hubzilla-5189a56ef832e1c5c6976f87d77d218bf4a6c221.zip |
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/include/text.php b/include/text.php index 89acbf9fa..92a74eb49 100644 --- a/include/text.php +++ b/include/text.php @@ -694,8 +694,13 @@ function linkify($s) { if(! function_exists('smilies')) { function smilies($s, $sample = false) { + $a = get_app(); + if(intval(get_config('system','no_smilies')) + || (local_user() && intval(get_pconfig(local_user(),'system','no_smilies')))) + return $s; + $s = preg_replace_callback('/<pre>(.*?)<\/pre>/ism','smile_encode',$s); $s = preg_replace_callback('/<code>(.*?)<\/code>/ism','smile_encode',$s); @@ -704,27 +709,21 @@ function smilies($s, $sample = false) { '</3', '<\\3', ':-)', -// ':)', ';-)', -// ';)', ':-(', -// ':(', ':-P', -// ':P', + ':-p', ':-"', ':-"', ':-x', ':-X', ':-D', -// ':D', '8-|', '8-O', ':-O', '\\o/', 'o.O', 'O.o', - '\\.../', - '\\ooo/', ":'(", ":-!", ":-/", @@ -734,12 +733,8 @@ function smilies($s, $sample = false) { ':homebrew', ':coffee', ':facepalm', - ':headdesk', '~friendika', - '~friendica', -// 'Diaspora*' - ':beard', - ':whitebeard' + '~friendica' ); @@ -748,27 +743,21 @@ function smilies($s, $sample = false) { '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />', '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />', '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />', -// '<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-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-tongue-out.gif" alt=":P" />', + '<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=":-\"" />', '<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-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" />', '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />', '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />', '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />', '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\.../" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\ooo/" />', '<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />', '<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />', '<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />', @@ -778,12 +767,8 @@ function smilies($s, $sample = false) { '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />', '<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />', '<img src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-bangheaddesk.gif" alt=":headdesk" />', '<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>', - '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>', -// '<a href="http://diasporafoundation.org">Diaspora<img src="' . $a->get_baseurl() . '/images/diaspora.png" alt="Diaspora*" /></a>', - '<img src="' . $a->get_baseurl() . '/images/smiley-beard.png" alt=":beard" />', - '<img src="' . $a->get_baseurl() . '/images/smiley-whitebeard.png" alt=":whitebeard" />' + '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>' ); $params = array('texts' => $texts, 'icons' => $icons, 'string' => $s); @@ -1350,3 +1335,6 @@ function file_tag_unsave_file($uid,$item,$file) { return true; } +function normalise_openid($s) { + return trim(str_replace(array('http://','https://'),array('',''),$s),'/'); +} |