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 /Zotlabs/Lib | |
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 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 0ba0c0a13..e55931f40 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -14,6 +14,8 @@ class ThreadItem { private $template = 'conv_item.tpl'; private $comment_box_template = 'comment_item.tpl'; private $commentable = false; + // list of supported reaction emojis - a site can over-ride this via config system.reactions + private $reactions = ['1f60a','1f44f','1f37e','1f48b','1f61e','2665','1f622','1f62e','1f634','1f61c','1f607','1f608']; private $toplevel = false; private $children = array(); private $parent = null; @@ -50,6 +52,14 @@ class ThreadItem { $this->add_child($child); } } + + // allow a site to configure the order and content of the reaction emoji list + if($this->toplevel) { + $x = get_config('system','reactions'); + if($x && is_array($x) && count($x)) { + $this->reactions = $x; + } + } } /** @@ -345,8 +355,9 @@ class ThreadItem { 'photo' => $body['photo'], 'event' => $body['event'], 'has_tags' => $has_tags, - + 'reactions' => $this->reactions, // Item toolbar buttons + 'emojis' => (($this->is_toplevel() && $this->is_commentable() && feature_enabled($conv->get_profile_owner(),'emojis')) ? '1' : ''), 'like' => $like, 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''), 'share' => $share, |