diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-06 14:14:40 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-06 14:14:40 +0200 |
commit | 655290b022f0443a121790ef7f0c1d4ddeecb289 (patch) | |
tree | 603e88df90c10ba5cc87d5bea90cb530459b70d0 /include/text.php | |
parent | 25aded6b9b137a32d9f9ea68baf3e2102fb293e7 (diff) | |
parent | cfbd2fc85c6e428f87c5e8d529c98e3e89202f2a (diff) | |
download | volse-hubzilla-655290b022f0443a121790ef7f0c1d4ddeecb289.tar.gz volse-hubzilla-655290b022f0443a121790ef7f0c1d4ddeecb289.tar.bz2 volse-hubzilla-655290b022f0443a121790ef7f0c1d4ddeecb289.zip |
Merge branch 'sabre32' of https://github.com/redmatrix/hubzilla into sabre32
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php index 834eec920..1bc19da34 100644 --- a/include/text.php +++ b/include/text.php @@ -1115,8 +1115,8 @@ function list_smilies() { ':coffee', ':facepalm', ':like', - ':dislike' - + ':dislike', + ':hubzilla' ); $icons = array( @@ -1152,9 +1152,24 @@ function list_smilies() { '<img class="smiley" src="' . z_root() . '/images/smiley-facepalm.gif" alt=":facepalm" />', '<img class="smiley" src="' . z_root() . '/images/like.gif" alt=":like" />', '<img class="smiley" src="' . z_root() . '/images/dislike.gif" alt=":dislike" />', + '<img class="smiley" src="' . z_root() . '/images/hz-16.png" alt=":hubzilla" />', ); + $x = get_config('feature','emoji'); + if($x === false) + $x = 1; + if($x) { + if(! App::$emojitab) + App::$emojitab = json_decode(file_get_contents('library/emoji.json'),true); + foreach(App::$emojitab as $e) { + if(strpos($e['shortname'],':tone') === 0) + continue; + $texts[] = $e['shortname']; + $icons[] = '<img class="smiley emoji" height="16" width="16" src="images/emoji/' . $e['unicode'] . '.png' . '" alt="' . $e['name'] . '" />'; + } + } + $params = array('texts' => $texts, 'icons' => $icons); call_hooks('smilie', $params); @@ -1473,7 +1488,7 @@ function prepare_body(&$item,$attach = false) { if($is_photo) { - $object = json_decode($item['object'],true); + $object = json_decode($item['obj'],true); // if original photo width is <= 640px prepend it to item body if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) { |