aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-04 17:06:12 -0700
committerredmatrix <git@macgirvin.com>2016-06-04 17:06:12 -0700
commita6012af00d13bdab1806b7ae172d271d4ad9ebe5 (patch)
tree0d27c71f3d71073d43673a15c0fecc749cbc452c /include/text.php
parenta0d339f208ce991ccc429e7d4ac1bbacce393b38 (diff)
downloadvolse-hubzilla-a6012af00d13bdab1806b7ae172d271d4ad9ebe5.tar.gz
volse-hubzilla-a6012af00d13bdab1806b7ae172d271d4ad9ebe5.tar.bz2
volse-hubzilla-a6012af00d13bdab1806b7ae172d271d4ad9ebe5.zip
For emojis in posts, extend smilies and save a lot of duplication of effort
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 72db9c5ea..5d0010bd5 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1155,6 +1155,18 @@ function list_smilies() {
);
+ $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) {
+ $texts[] = $e['shortname'];
+ $icons[] = '<img height="16" width="16" src="images/emoji/' . $e['unicode'] . '.png' . '" alt="' . $e['name'] . '" />';
+ }
+ }
+
$params = array('texts' => $texts, 'icons' => $icons);
call_hooks('smilie', $params);