aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Apps.php60
-rw-r--r--Zotlabs/Module/React.php50
-rwxr-xr-xboot.php1
-rw-r--r--images/emoji/1f37a.pngbin0 -> 1340 bytes
-rw-r--r--images/emoji/1f37b.pngbin0 -> 2100 bytes
-rw-r--r--images/emoji/1f37e.pngbin0 -> 1205 bytes
-rw-r--r--images/emoji/1f3a4.pngbin0 -> 1165 bytes
-rw-r--r--images/emoji/1f3b5.pngbin0 -> 419 bytes
-rw-r--r--images/emoji/1f3c6.pngbin0 -> 863 bytes
-rw-r--r--images/emoji/1f44b.pngbin0 -> 1311 bytes
-rw-r--r--images/emoji/1f44c.pngbin0 -> 979 bytes
-rw-r--r--images/emoji/1f44d.pngbin0 -> 814 bytes
-rw-r--r--images/emoji/1f44e.pngbin0 -> 815 bytes
-rw-r--r--images/emoji/1f44f.pngbin0 -> 1456 bytes
-rw-r--r--images/emoji/1f47d.pngbin0 -> 839 bytes
-rw-r--r--images/emoji/1f48b.pngbin0 -> 842 bytes
-rw-r--r--images/emoji/1f493.pngbin0 -> 699 bytes
-rw-r--r--images/emoji/1f497.pngbin0 -> 675 bytes
-rw-r--r--images/emoji/1f4a3.pngbin0 -> 702 bytes
-rw-r--r--images/emoji/1f4a4.pngbin0 -> 540 bytes
-rw-r--r--images/emoji/1f595.pngbin0 -> 893 bytes
-rw-r--r--images/emoji/1f5a4.pngbin0 -> 435 bytes
-rw-r--r--images/emoji/1f5e8.pngbin0 -> 390 bytes
-rw-r--r--images/emoji/1f607.pngbin0 -> 935 bytes
-rw-r--r--images/emoji/1f608.pngbin0 -> 1078 bytes
-rw-r--r--images/emoji/1f60a.pngbin0 -> 812 bytes
-rw-r--r--images/emoji/1f60b.pngbin0 -> 896 bytes
-rw-r--r--images/emoji/1f60c.pngbin0 -> 785 bytes
-rw-r--r--images/emoji/1f60d.pngbin0 -> 1069 bytes
-rw-r--r--images/emoji/1f60e.pngbin0 -> 824 bytes
-rw-r--r--images/emoji/1f60f.pngbin0 -> 775 bytes
-rw-r--r--images/emoji/1f619.pngbin0 -> 648 bytes
-rw-r--r--images/emoji/1f61a.pngbin0 -> 888 bytes
-rw-r--r--images/emoji/1f61b.pngbin0 -> 752 bytes
-rw-r--r--images/emoji/1f61c.pngbin0 -> 1061 bytes
-rw-r--r--images/emoji/1f61d.pngbin0 -> 867 bytes
-rw-r--r--images/emoji/1f61e.pngbin0 -> 757 bytes
-rw-r--r--images/emoji/1f61f.pngbin0 -> 715 bytes
-rw-r--r--images/emoji/1f622.pngbin0 -> 1123 bytes
-rw-r--r--images/emoji/1f628.pngbin0 -> 1002 bytes
-rw-r--r--images/emoji/1f62a.pngbin0 -> 1185 bytes
-rw-r--r--images/emoji/1f62b.pngbin0 -> 1132 bytes
-rw-r--r--images/emoji/1f62c.pngbin0 -> 694 bytes
-rw-r--r--images/emoji/1f62d.pngbin0 -> 1241 bytes
-rw-r--r--images/emoji/1f62e.pngbin0 -> 575 bytes
-rw-r--r--images/emoji/1f62f.pngbin0 -> 634 bytes
-rw-r--r--images/emoji/1f631.pngbin0 -> 1588 bytes
-rw-r--r--images/emoji/1f634.pngbin0 -> 1075 bytes
-rw-r--r--images/emoji/1f64b.pngbin0 -> 1669 bytes
-rw-r--r--images/emoji/1f64f.pngbin0 -> 1122 bytes
-rw-r--r--images/emoji/1f6ab.pngbin0 -> 555 bytes
-rw-r--r--images/emoji/1f918.pngbin0 -> 894 bytes
-rw-r--r--images/emoji/1f919.pngbin0 -> 894 bytes
-rw-r--r--images/emoji/1f91d.pngbin0 -> 1369 bytes
-rw-r--r--images/emoji/262e.pngbin0 -> 933 bytes
-rw-r--r--images/emoji/263a.pngbin0 -> 636 bytes
-rw-r--r--images/emoji/2665.pngbin0 -> 449 bytes
-rw-r--r--images/emoji/26a1.pngbin0 -> 413 bytes
-rw-r--r--images/emoji/270c.pngbin0 -> 1009 bytes
-rw-r--r--images/emoji/2714.pngbin0 -> 438 bytes
-rw-r--r--images/emoji/2716.pngbin0 -> 298 bytes
-rw-r--r--images/emoji/2754.pngbin0 -> 449 bytes
-rw-r--r--images/emoji/README2
-rw-r--r--include/text.php6
-rwxr-xr-xview/tpl/conv_item.tpl27
-rwxr-xr-xview/tpl/jot-header.tpl8
66 files changed, 146 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 6d2ef4e45..9dd4bf2d7 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -13,6 +13,8 @@ require_once('include/channel.php');
class Apps {
+ static public $installed_system_apps = null;
+
static public function get_system_apps($translate = true) {
$ret = array();
@@ -49,22 +51,62 @@ class Apps {
static public function import_system_apps() {
if(! local_channel())
return;
+ $apps = self::get_system_apps(false);
- // Eventually we want to look at modification dates and update system apps.
- $installed = get_pconfig(local_channel(),'system','apps_installed');
- if($installed)
- return;
- $apps = self::get_system_apps(false);
+ self::$installed_system_apps = q("select * from app where app_system = 1 and app_channel = %d",
+ intval(local_channel())
+ );
+
if($apps) {
foreach($apps as $app) {
+ $id = self::check_install_system_app($app);
+ // $id will be boolean true or false to install an app, or an integer id to update an existing app
+ if($id === false)
+ continue;
+ if($id !== true) {
+ // if we already installed this app, but it changed, preserve any categories we created
+ $s = '';
+ $r = q("select * from term where otype = %d and oid = d",
+ intval(TERM_OBJ_APP),
+ intval($id)
+ );
+ if($r) {
+ foreach($r as $t) {
+ if($s)
+ $s .= ',';
+ $s .= $t['term'];
+ }
+ $app['categories'] = $s;
+ }
+ }
$app['uid'] = local_channel();
$app['guid'] = hash('whirlpool',$app['name']);
$app['system'] = 1;
- self::app_install(local_channel(),$app);
+ self::app_install(local_channel(),$app);
}
}
- set_pconfig(local_channel(),'system','apps_installed',1);
+ }
+
+ /**
+ * Install the system app if no system apps have been installed, or if a new system app
+ * is discovered, or if the version of a system app changes.
+ */
+
+ static public function check_install_system_app($app) {
+ if((! is_array(self::$installed_system_apps)) || (! count(self::$installed_system_apps))) {
+ return true;
+ }
+ $notfound = true;
+ foreach(self::$installed_system_apps as $iapp) {
+ if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
+ $notfound = false;
+ if($iapp['app_version'] != $app['version']) {
+ return intval($iapp['app_id']);
+ }
+ }
+ }
+ return $notfound;
}
@@ -111,6 +153,10 @@ class Apps {
if(array_key_exists('target',$ret))
$ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']);
+ if(array_key_exists('version',$ret))
+ $ret['version'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['version']);
+
+
if(array_key_exists('requires',$ret)) {
$requires = explode(',',$ret['requires']);
foreach($requires as $require) {
diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php
new file mode 100644
index 000000000..85a1e2350
--- /dev/null
+++ b/Zotlabs/Module/React.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace Zotlabs\Module;
+
+
+class React extends \Zotlabs\Web\Controller {
+
+ function get() {
+ if(! local_channel())
+ return;
+
+ $postid = $_REQUEST['postid'];
+
+ if(! $postid)
+ return;
+
+ $emoji = $_REQUEST['emoji'];
+ if($_REQUEST['emoji']) {
+
+ $i = q("select * from item where id = %d and uid = %d",
+ intval($postid),
+ intval(local_channel())
+ );
+
+ if(! $i)
+ return;
+
+ $channel = \App::get_channel();
+
+ $n = array();
+ $n['aid'] = $channel['channel_account_id'];
+ $n['uid'] = $channel['channel_id'];
+ $n['parent'] = $postid;
+ $n['parent_mid'] = $i[0]['mid'];
+ $n['mid'] = item_message_id();
+ $n['verb'] = ACTIVITY_REACT . '#' . $emoji;
+ $n['body'] = "\n\n[zmg]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n";
+ $n['author_xchan'] = $channel['channel_hash'];
+
+ $x = item_store($n);
+ if($x['success']) {
+ $nid = $x['item_id'];
+ \Zotlabs\Daemon\Master::Summon(array('Notifier','like',$nid));
+ }
+
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/boot.php b/boot.php
index 5b3a614f1..16c5fed11 100755
--- a/boot.php
+++ b/boot.php
@@ -473,6 +473,7 @@ define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' );
* activity stream defines
*/
+define ( 'ACTIVITY_REACT', NAMESPACE_ZOT . '/activity/react' );
define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' );
define ( 'ACTIVITY_DISLIKE', NAMESPACE_ZOT . '/activity/dislike' );
define ( 'ACTIVITY_AGREE', NAMESPACE_ZOT . '/activity/agree' );
diff --git a/images/emoji/1f37a.png b/images/emoji/1f37a.png
new file mode 100644
index 000000000..894da40a7
--- /dev/null
+++ b/images/emoji/1f37a.png
Binary files differ
diff --git a/images/emoji/1f37b.png b/images/emoji/1f37b.png
new file mode 100644
index 000000000..b55deb66b
--- /dev/null
+++ b/images/emoji/1f37b.png
Binary files differ
diff --git a/images/emoji/1f37e.png b/images/emoji/1f37e.png
new file mode 100644
index 000000000..285a79a93
--- /dev/null
+++ b/images/emoji/1f37e.png
Binary files differ
diff --git a/images/emoji/1f3a4.png b/images/emoji/1f3a4.png
new file mode 100644
index 000000000..d4e6b0def
--- /dev/null
+++ b/images/emoji/1f3a4.png
Binary files differ
diff --git a/images/emoji/1f3b5.png b/images/emoji/1f3b5.png
new file mode 100644
index 000000000..06691ef61
--- /dev/null
+++ b/images/emoji/1f3b5.png
Binary files differ
diff --git a/images/emoji/1f3c6.png b/images/emoji/1f3c6.png
new file mode 100644
index 000000000..ac2895c18
--- /dev/null
+++ b/images/emoji/1f3c6.png
Binary files differ
diff --git a/images/emoji/1f44b.png b/images/emoji/1f44b.png
new file mode 100644
index 000000000..02ae68b85
--- /dev/null
+++ b/images/emoji/1f44b.png
Binary files differ
diff --git a/images/emoji/1f44c.png b/images/emoji/1f44c.png
new file mode 100644
index 000000000..028d69b0d
--- /dev/null
+++ b/images/emoji/1f44c.png
Binary files differ
diff --git a/images/emoji/1f44d.png b/images/emoji/1f44d.png
new file mode 100644
index 000000000..f9e6f13a3
--- /dev/null
+++ b/images/emoji/1f44d.png
Binary files differ
diff --git a/images/emoji/1f44e.png b/images/emoji/1f44e.png
new file mode 100644
index 000000000..b63da2f20
--- /dev/null
+++ b/images/emoji/1f44e.png
Binary files differ
diff --git a/images/emoji/1f44f.png b/images/emoji/1f44f.png
new file mode 100644
index 000000000..b0ffe9289
--- /dev/null
+++ b/images/emoji/1f44f.png
Binary files differ
diff --git a/images/emoji/1f47d.png b/images/emoji/1f47d.png
new file mode 100644
index 000000000..3b90e9743
--- /dev/null
+++ b/images/emoji/1f47d.png
Binary files differ
diff --git a/images/emoji/1f48b.png b/images/emoji/1f48b.png
new file mode 100644
index 000000000..85e6dcfc4
--- /dev/null
+++ b/images/emoji/1f48b.png
Binary files differ
diff --git a/images/emoji/1f493.png b/images/emoji/1f493.png
new file mode 100644
index 000000000..0bcf2d1d5
--- /dev/null
+++ b/images/emoji/1f493.png
Binary files differ
diff --git a/images/emoji/1f497.png b/images/emoji/1f497.png
new file mode 100644
index 000000000..d6e694e97
--- /dev/null
+++ b/images/emoji/1f497.png
Binary files differ
diff --git a/images/emoji/1f4a3.png b/images/emoji/1f4a3.png
new file mode 100644
index 000000000..c7f8f81c9
--- /dev/null
+++ b/images/emoji/1f4a3.png
Binary files differ
diff --git a/images/emoji/1f4a4.png b/images/emoji/1f4a4.png
new file mode 100644
index 000000000..9bc72b446
--- /dev/null
+++ b/images/emoji/1f4a4.png
Binary files differ
diff --git a/images/emoji/1f595.png b/images/emoji/1f595.png
new file mode 100644
index 000000000..697f7a25e
--- /dev/null
+++ b/images/emoji/1f595.png
Binary files differ
diff --git a/images/emoji/1f5a4.png b/images/emoji/1f5a4.png
new file mode 100644
index 000000000..b4068c3e6
--- /dev/null
+++ b/images/emoji/1f5a4.png
Binary files differ
diff --git a/images/emoji/1f5e8.png b/images/emoji/1f5e8.png
new file mode 100644
index 000000000..00c05959b
--- /dev/null
+++ b/images/emoji/1f5e8.png
Binary files differ
diff --git a/images/emoji/1f607.png b/images/emoji/1f607.png
new file mode 100644
index 000000000..57f515112
--- /dev/null
+++ b/images/emoji/1f607.png
Binary files differ
diff --git a/images/emoji/1f608.png b/images/emoji/1f608.png
new file mode 100644
index 000000000..cc2c5f1ec
--- /dev/null
+++ b/images/emoji/1f608.png
Binary files differ
diff --git a/images/emoji/1f60a.png b/images/emoji/1f60a.png
new file mode 100644
index 000000000..aac1a424a
--- /dev/null
+++ b/images/emoji/1f60a.png
Binary files differ
diff --git a/images/emoji/1f60b.png b/images/emoji/1f60b.png
new file mode 100644
index 000000000..2df15753c
--- /dev/null
+++ b/images/emoji/1f60b.png
Binary files differ
diff --git a/images/emoji/1f60c.png b/images/emoji/1f60c.png
new file mode 100644
index 000000000..715ad0bf5
--- /dev/null
+++ b/images/emoji/1f60c.png
Binary files differ
diff --git a/images/emoji/1f60d.png b/images/emoji/1f60d.png
new file mode 100644
index 000000000..73fbee29d
--- /dev/null
+++ b/images/emoji/1f60d.png
Binary files differ
diff --git a/images/emoji/1f60e.png b/images/emoji/1f60e.png
new file mode 100644
index 000000000..200117351
--- /dev/null
+++ b/images/emoji/1f60e.png
Binary files differ
diff --git a/images/emoji/1f60f.png b/images/emoji/1f60f.png
new file mode 100644
index 000000000..878521099
--- /dev/null
+++ b/images/emoji/1f60f.png
Binary files differ
diff --git a/images/emoji/1f619.png b/images/emoji/1f619.png
new file mode 100644
index 000000000..e181f1709
--- /dev/null
+++ b/images/emoji/1f619.png
Binary files differ
diff --git a/images/emoji/1f61a.png b/images/emoji/1f61a.png
new file mode 100644
index 000000000..b684d7d4d
--- /dev/null
+++ b/images/emoji/1f61a.png
Binary files differ
diff --git a/images/emoji/1f61b.png b/images/emoji/1f61b.png
new file mode 100644
index 000000000..25757341f
--- /dev/null
+++ b/images/emoji/1f61b.png
Binary files differ
diff --git a/images/emoji/1f61c.png b/images/emoji/1f61c.png
new file mode 100644
index 000000000..4817eaa3d
--- /dev/null
+++ b/images/emoji/1f61c.png
Binary files differ
diff --git a/images/emoji/1f61d.png b/images/emoji/1f61d.png
new file mode 100644
index 000000000..5c0401e9b
--- /dev/null
+++ b/images/emoji/1f61d.png
Binary files differ
diff --git a/images/emoji/1f61e.png b/images/emoji/1f61e.png
new file mode 100644
index 000000000..efe4e67e2
--- /dev/null
+++ b/images/emoji/1f61e.png
Binary files differ
diff --git a/images/emoji/1f61f.png b/images/emoji/1f61f.png
new file mode 100644
index 000000000..7074afcf5
--- /dev/null
+++ b/images/emoji/1f61f.png
Binary files differ
diff --git a/images/emoji/1f622.png b/images/emoji/1f622.png
new file mode 100644
index 000000000..b7877f8a1
--- /dev/null
+++ b/images/emoji/1f622.png
Binary files differ
diff --git a/images/emoji/1f628.png b/images/emoji/1f628.png
new file mode 100644
index 000000000..eb8b347ce
--- /dev/null
+++ b/images/emoji/1f628.png
Binary files differ
diff --git a/images/emoji/1f62a.png b/images/emoji/1f62a.png
new file mode 100644
index 000000000..836b41077
--- /dev/null
+++ b/images/emoji/1f62a.png
Binary files differ
diff --git a/images/emoji/1f62b.png b/images/emoji/1f62b.png
new file mode 100644
index 000000000..19aba1bc1
--- /dev/null
+++ b/images/emoji/1f62b.png
Binary files differ
diff --git a/images/emoji/1f62c.png b/images/emoji/1f62c.png
new file mode 100644
index 000000000..871b2f071
--- /dev/null
+++ b/images/emoji/1f62c.png
Binary files differ
diff --git a/images/emoji/1f62d.png b/images/emoji/1f62d.png
new file mode 100644
index 000000000..e4f818360
--- /dev/null
+++ b/images/emoji/1f62d.png
Binary files differ
diff --git a/images/emoji/1f62e.png b/images/emoji/1f62e.png
new file mode 100644
index 000000000..a62cd27e1
--- /dev/null
+++ b/images/emoji/1f62e.png
Binary files differ
diff --git a/images/emoji/1f62f.png b/images/emoji/1f62f.png
new file mode 100644
index 000000000..cad0e2313
--- /dev/null
+++ b/images/emoji/1f62f.png
Binary files differ
diff --git a/images/emoji/1f631.png b/images/emoji/1f631.png
new file mode 100644
index 000000000..6ab43a0d3
--- /dev/null
+++ b/images/emoji/1f631.png
Binary files differ
diff --git a/images/emoji/1f634.png b/images/emoji/1f634.png
new file mode 100644
index 000000000..9ecf600d6
--- /dev/null
+++ b/images/emoji/1f634.png
Binary files differ
diff --git a/images/emoji/1f64b.png b/images/emoji/1f64b.png
new file mode 100644
index 000000000..7c803b315
--- /dev/null
+++ b/images/emoji/1f64b.png
Binary files differ
diff --git a/images/emoji/1f64f.png b/images/emoji/1f64f.png
new file mode 100644
index 000000000..8347f2435
--- /dev/null
+++ b/images/emoji/1f64f.png
Binary files differ
diff --git a/images/emoji/1f6ab.png b/images/emoji/1f6ab.png
new file mode 100644
index 000000000..d2efd65e7
--- /dev/null
+++ b/images/emoji/1f6ab.png
Binary files differ
diff --git a/images/emoji/1f918.png b/images/emoji/1f918.png
new file mode 100644
index 000000000..4aa6e7e0a
--- /dev/null
+++ b/images/emoji/1f918.png
Binary files differ
diff --git a/images/emoji/1f919.png b/images/emoji/1f919.png
new file mode 100644
index 000000000..a10c59ba7
--- /dev/null
+++ b/images/emoji/1f919.png
Binary files differ
diff --git a/images/emoji/1f91d.png b/images/emoji/1f91d.png
new file mode 100644
index 000000000..75e8d58e9
--- /dev/null
+++ b/images/emoji/1f91d.png
Binary files differ
diff --git a/images/emoji/262e.png b/images/emoji/262e.png
new file mode 100644
index 000000000..86033faf4
--- /dev/null
+++ b/images/emoji/262e.png
Binary files differ
diff --git a/images/emoji/263a.png b/images/emoji/263a.png
new file mode 100644
index 000000000..e9e53c03d
--- /dev/null
+++ b/images/emoji/263a.png
Binary files differ
diff --git a/images/emoji/2665.png b/images/emoji/2665.png
new file mode 100644
index 000000000..393c3ed52
--- /dev/null
+++ b/images/emoji/2665.png
Binary files differ
diff --git a/images/emoji/26a1.png b/images/emoji/26a1.png
new file mode 100644
index 000000000..47e68e48e
--- /dev/null
+++ b/images/emoji/26a1.png
Binary files differ
diff --git a/images/emoji/270c.png b/images/emoji/270c.png
new file mode 100644
index 000000000..70c5516ff
--- /dev/null
+++ b/images/emoji/270c.png
Binary files differ
diff --git a/images/emoji/2714.png b/images/emoji/2714.png
new file mode 100644
index 000000000..03bd69537
--- /dev/null
+++ b/images/emoji/2714.png
Binary files differ
diff --git a/images/emoji/2716.png b/images/emoji/2716.png
new file mode 100644
index 000000000..e47cc1b68
--- /dev/null
+++ b/images/emoji/2716.png
Binary files differ
diff --git a/images/emoji/2754.png b/images/emoji/2754.png
new file mode 100644
index 000000000..6e7824c75
--- /dev/null
+++ b/images/emoji/2754.png
Binary files differ
diff --git a/images/emoji/README b/images/emoji/README
new file mode 100644
index 000000000..ab478b753
--- /dev/null
+++ b/images/emoji/README
@@ -0,0 +1,2 @@
+These files supplied by emojione. License is CC BY 4.0. Attribution is required for commercial use.
+See http://emojione.com
diff --git a/include/text.php b/include/text.php
index 551cb72bc..834eec920 100644
--- a/include/text.php
+++ b/include/text.php
@@ -734,6 +734,10 @@ function get_tags($s) {
// '=' needs to be avoided because when the replacement is made (in handle_tag()) it has to be ignored there
// Feel free to allow '=' if the issue with '=' is solved in handle_tag()
// added / ? and [ to avoid issues with hashchars in url paths
+
+ // added ; to single word tags to allow emojis and other unicode character constructs in bbcode
+ // (this would actually be &#xnnnnn; but the ampersand will have been escaped to &amp; by the time we see it.)
+
if(preg_match_all('/(?<![a-zA-Z0-9=\/\?])(@[^ \x0D\x0A,:?\[]+ [^ \x0D\x0A@,:?\[]+)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(substr($mtch,-1,1) === '.')
@@ -746,7 +750,7 @@ function get_tags($s) {
// Otherwise pull out single word tags. These can be @nickname, @first_last
// and #hash tags.
- if(preg_match_all('/(?<![a-zA-Z0-9=\/\?])([@#][^ \x0D\x0A,;:?\[]+)/',$s,$match)) {
+ if(preg_match_all('/(?<![a-zA-Z0-9=\/\?\;])([@#][^ \x0D\x0A,;:?\[]+)/',$s,$match)) {
foreach($match[1] as $mtch) {
if(substr($mtch,-1,1) === '.')
$mtch = substr($mtch,0,-1);
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index d9c60fc3b..b498420e3 100755
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -113,6 +113,33 @@
</button>
{{/if}}
+ {{if $item.toplevel}}
+ {{if $item.like}}
+ <span class="dropdown">
+ <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-react-{{$item.id}}">
+ <img class="dropdown-menu-img-xs" style="margin-right: 0;" src="/images/emoji/1f60a.png" alt="1f60a" />
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-react-{{$item.id}}">
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f60a'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f60a.png" alt="1f60a" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f44f'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f44f.png" alt="1f44f" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f37e'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f37e.png" alt="1f37e" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f48b'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f48b.png" alt="1f48b" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f61e'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f61e.png" alt="1f61e" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'2665'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/2665.png" alt="2665" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f622'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f622.png" alt="1f622" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f62e'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f62e.png" alt="1f62e" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f634'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f634.png" alt="1f634" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f61c'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f61c.png" alt="1f61c" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f607'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f607.png" alt="1f607" /></a></li>
+ <li role="presentation"><a role="menuitem" href="#" onclick="jotReact({{$item.id}},'1f608'); return false;"><img class="dropdown-menu-img-sm" src="/images/emoji/1f608.png" alt="1f608" /></a></li>
+
+ </ul>
+ </span>
+ {{/if}}
+ {{/if}}
+
+
+
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
<i class="fa fa-caret-down"></i>
</button>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index aeb661008..43df2e175 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -349,6 +349,14 @@ function enableOnUser(){
}
}
+ function jotReact(id,icon) {
+ if(id && icon) {
+ $.get('{{$baseurl}}/react?f=&postid=' + id + '&emoji=' + icon);
+ if(timer) clearTimeout(timer);
+ timer = setTimeout(NavUpdate,1000);
+ }
+ }
+
function jotClearLocation() {
$('#jot-coord').val('');
$('#profile-nolocation-wrapper').attr('disabled', true);