diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-06-03 09:40:37 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-06-03 09:40:37 +0200 |
commit | 7582802f033aa6d994691880c1594b590b179c5d (patch) | |
tree | edd3f5ab48dfada99e2b76d718b425c1698f84e8 | |
parent | f23bdde464ef20ad2ffcb3984cc9481955374809 (diff) | |
parent | f8949ed5d1f277a3246fecf04d3ee4619ba10b51 (diff) | |
download | volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.tar.gz volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.tar.bz2 volse-hubzilla-7582802f033aa6d994691880c1594b590b179c5d.zip |
Merge branch 'dev' into sabre32
-rw-r--r-- | Zotlabs/Lib/Apps.php | 60 | ||||
-rw-r--r-- | Zotlabs/Module/React.php | 50 | ||||
-rwxr-xr-x | boot.php | 1 | ||||
-rw-r--r-- | images/emoji/1f37a.png | bin | 0 -> 1340 bytes | |||
-rw-r--r-- | images/emoji/1f37b.png | bin | 0 -> 2100 bytes | |||
-rw-r--r-- | images/emoji/1f37e.png | bin | 0 -> 1205 bytes | |||
-rw-r--r-- | images/emoji/1f3a4.png | bin | 0 -> 1165 bytes | |||
-rw-r--r-- | images/emoji/1f3b5.png | bin | 0 -> 419 bytes | |||
-rw-r--r-- | images/emoji/1f3c6.png | bin | 0 -> 863 bytes | |||
-rw-r--r-- | images/emoji/1f44b.png | bin | 0 -> 1311 bytes | |||
-rw-r--r-- | images/emoji/1f44c.png | bin | 0 -> 979 bytes | |||
-rw-r--r-- | images/emoji/1f44d.png | bin | 0 -> 814 bytes | |||
-rw-r--r-- | images/emoji/1f44e.png | bin | 0 -> 815 bytes | |||
-rw-r--r-- | images/emoji/1f44f.png | bin | 0 -> 1456 bytes | |||
-rw-r--r-- | images/emoji/1f47d.png | bin | 0 -> 839 bytes | |||
-rw-r--r-- | images/emoji/1f48b.png | bin | 0 -> 842 bytes | |||
-rw-r--r-- | images/emoji/1f493.png | bin | 0 -> 699 bytes | |||
-rw-r--r-- | images/emoji/1f497.png | bin | 0 -> 675 bytes | |||
-rw-r--r-- | images/emoji/1f4a3.png | bin | 0 -> 702 bytes | |||
-rw-r--r-- | images/emoji/1f4a4.png | bin | 0 -> 540 bytes | |||
-rw-r--r-- | images/emoji/1f595.png | bin | 0 -> 893 bytes | |||
-rw-r--r-- | images/emoji/1f5a4.png | bin | 0 -> 435 bytes | |||
-rw-r--r-- | images/emoji/1f5e8.png | bin | 0 -> 390 bytes | |||
-rw-r--r-- | images/emoji/1f607.png | bin | 0 -> 935 bytes | |||
-rw-r--r-- | images/emoji/1f608.png | bin | 0 -> 1078 bytes | |||
-rw-r--r-- | images/emoji/1f60a.png | bin | 0 -> 812 bytes | |||
-rw-r--r-- | images/emoji/1f60b.png | bin | 0 -> 896 bytes | |||
-rw-r--r-- | images/emoji/1f60c.png | bin | 0 -> 785 bytes | |||
-rw-r--r-- | images/emoji/1f60d.png | bin | 0 -> 1069 bytes | |||
-rw-r--r-- | images/emoji/1f60e.png | bin | 0 -> 824 bytes | |||
-rw-r--r-- | images/emoji/1f60f.png | bin | 0 -> 775 bytes | |||
-rw-r--r-- | images/emoji/1f619.png | bin | 0 -> 648 bytes | |||
-rw-r--r-- | images/emoji/1f61a.png | bin | 0 -> 888 bytes | |||
-rw-r--r-- | images/emoji/1f61b.png | bin | 0 -> 752 bytes | |||
-rw-r--r-- | images/emoji/1f61c.png | bin | 0 -> 1061 bytes | |||
-rw-r--r-- | images/emoji/1f61d.png | bin | 0 -> 867 bytes | |||
-rw-r--r-- | images/emoji/1f61e.png | bin | 0 -> 757 bytes | |||
-rw-r--r-- | images/emoji/1f61f.png | bin | 0 -> 715 bytes | |||
-rw-r--r-- | images/emoji/1f622.png | bin | 0 -> 1123 bytes | |||
-rw-r--r-- | images/emoji/1f628.png | bin | 0 -> 1002 bytes | |||
-rw-r--r-- | images/emoji/1f62a.png | bin | 0 -> 1185 bytes | |||
-rw-r--r-- | images/emoji/1f62b.png | bin | 0 -> 1132 bytes | |||
-rw-r--r-- | images/emoji/1f62c.png | bin | 0 -> 694 bytes | |||
-rw-r--r-- | images/emoji/1f62d.png | bin | 0 -> 1241 bytes | |||
-rw-r--r-- | images/emoji/1f62e.png | bin | 0 -> 575 bytes | |||
-rw-r--r-- | images/emoji/1f62f.png | bin | 0 -> 634 bytes | |||
-rw-r--r-- | images/emoji/1f631.png | bin | 0 -> 1588 bytes | |||
-rw-r--r-- | images/emoji/1f634.png | bin | 0 -> 1075 bytes | |||
-rw-r--r-- | images/emoji/1f64b.png | bin | 0 -> 1669 bytes | |||
-rw-r--r-- | images/emoji/1f64f.png | bin | 0 -> 1122 bytes | |||
-rw-r--r-- | images/emoji/1f6ab.png | bin | 0 -> 555 bytes | |||
-rw-r--r-- | images/emoji/1f918.png | bin | 0 -> 894 bytes | |||
-rw-r--r-- | images/emoji/1f919.png | bin | 0 -> 894 bytes | |||
-rw-r--r-- | images/emoji/1f91d.png | bin | 0 -> 1369 bytes | |||
-rw-r--r-- | images/emoji/262e.png | bin | 0 -> 933 bytes | |||
-rw-r--r-- | images/emoji/263a.png | bin | 0 -> 636 bytes | |||
-rw-r--r-- | images/emoji/2665.png | bin | 0 -> 449 bytes | |||
-rw-r--r-- | images/emoji/26a1.png | bin | 0 -> 413 bytes | |||
-rw-r--r-- | images/emoji/270c.png | bin | 0 -> 1009 bytes | |||
-rw-r--r-- | images/emoji/2714.png | bin | 0 -> 438 bytes | |||
-rw-r--r-- | images/emoji/2716.png | bin | 0 -> 298 bytes | |||
-rw-r--r-- | images/emoji/2754.png | bin | 0 -> 449 bytes | |||
-rw-r--r-- | images/emoji/README | 2 | ||||
-rw-r--r-- | include/text.php | 6 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 27 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 8 |
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 @@ -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 Binary files differnew file mode 100644 index 000000000..894da40a7 --- /dev/null +++ b/images/emoji/1f37a.png diff --git a/images/emoji/1f37b.png b/images/emoji/1f37b.png Binary files differnew file mode 100644 index 000000000..b55deb66b --- /dev/null +++ b/images/emoji/1f37b.png diff --git a/images/emoji/1f37e.png b/images/emoji/1f37e.png Binary files differnew file mode 100644 index 000000000..285a79a93 --- /dev/null +++ b/images/emoji/1f37e.png diff --git a/images/emoji/1f3a4.png b/images/emoji/1f3a4.png Binary files differnew file mode 100644 index 000000000..d4e6b0def --- /dev/null +++ b/images/emoji/1f3a4.png diff --git a/images/emoji/1f3b5.png b/images/emoji/1f3b5.png Binary files differnew file mode 100644 index 000000000..06691ef61 --- /dev/null +++ b/images/emoji/1f3b5.png diff --git a/images/emoji/1f3c6.png b/images/emoji/1f3c6.png Binary files differnew file mode 100644 index 000000000..ac2895c18 --- /dev/null +++ b/images/emoji/1f3c6.png diff --git a/images/emoji/1f44b.png b/images/emoji/1f44b.png Binary files differnew file mode 100644 index 000000000..02ae68b85 --- /dev/null +++ b/images/emoji/1f44b.png diff --git a/images/emoji/1f44c.png b/images/emoji/1f44c.png Binary files differnew file mode 100644 index 000000000..028d69b0d --- /dev/null +++ b/images/emoji/1f44c.png diff --git a/images/emoji/1f44d.png b/images/emoji/1f44d.png Binary files differnew file mode 100644 index 000000000..f9e6f13a3 --- /dev/null +++ b/images/emoji/1f44d.png diff --git a/images/emoji/1f44e.png b/images/emoji/1f44e.png Binary files differnew file mode 100644 index 000000000..b63da2f20 --- /dev/null +++ b/images/emoji/1f44e.png diff --git a/images/emoji/1f44f.png b/images/emoji/1f44f.png Binary files differnew file mode 100644 index 000000000..b0ffe9289 --- /dev/null +++ b/images/emoji/1f44f.png diff --git a/images/emoji/1f47d.png b/images/emoji/1f47d.png Binary files differnew file mode 100644 index 000000000..3b90e9743 --- /dev/null +++ b/images/emoji/1f47d.png diff --git a/images/emoji/1f48b.png b/images/emoji/1f48b.png Binary files differnew file mode 100644 index 000000000..85e6dcfc4 --- /dev/null +++ b/images/emoji/1f48b.png diff --git a/images/emoji/1f493.png b/images/emoji/1f493.png Binary files differnew file mode 100644 index 000000000..0bcf2d1d5 --- /dev/null +++ b/images/emoji/1f493.png diff --git a/images/emoji/1f497.png b/images/emoji/1f497.png Binary files differnew file mode 100644 index 000000000..d6e694e97 --- /dev/null +++ b/images/emoji/1f497.png diff --git a/images/emoji/1f4a3.png b/images/emoji/1f4a3.png Binary files differnew file mode 100644 index 000000000..c7f8f81c9 --- /dev/null +++ b/images/emoji/1f4a3.png diff --git a/images/emoji/1f4a4.png b/images/emoji/1f4a4.png Binary files differnew file mode 100644 index 000000000..9bc72b446 --- /dev/null +++ b/images/emoji/1f4a4.png diff --git a/images/emoji/1f595.png b/images/emoji/1f595.png Binary files differnew file mode 100644 index 000000000..697f7a25e --- /dev/null +++ b/images/emoji/1f595.png diff --git a/images/emoji/1f5a4.png b/images/emoji/1f5a4.png Binary files differnew file mode 100644 index 000000000..b4068c3e6 --- /dev/null +++ b/images/emoji/1f5a4.png diff --git a/images/emoji/1f5e8.png b/images/emoji/1f5e8.png Binary files differnew file mode 100644 index 000000000..00c05959b --- /dev/null +++ b/images/emoji/1f5e8.png diff --git a/images/emoji/1f607.png b/images/emoji/1f607.png Binary files differnew file mode 100644 index 000000000..57f515112 --- /dev/null +++ b/images/emoji/1f607.png diff --git a/images/emoji/1f608.png b/images/emoji/1f608.png Binary files differnew file mode 100644 index 000000000..cc2c5f1ec --- /dev/null +++ b/images/emoji/1f608.png diff --git a/images/emoji/1f60a.png b/images/emoji/1f60a.png Binary files differnew file mode 100644 index 000000000..aac1a424a --- /dev/null +++ b/images/emoji/1f60a.png diff --git a/images/emoji/1f60b.png b/images/emoji/1f60b.png Binary files differnew file mode 100644 index 000000000..2df15753c --- /dev/null +++ b/images/emoji/1f60b.png diff --git a/images/emoji/1f60c.png b/images/emoji/1f60c.png Binary files differnew file mode 100644 index 000000000..715ad0bf5 --- /dev/null +++ b/images/emoji/1f60c.png diff --git a/images/emoji/1f60d.png b/images/emoji/1f60d.png Binary files differnew file mode 100644 index 000000000..73fbee29d --- /dev/null +++ b/images/emoji/1f60d.png diff --git a/images/emoji/1f60e.png b/images/emoji/1f60e.png Binary files differnew file mode 100644 index 000000000..200117351 --- /dev/null +++ b/images/emoji/1f60e.png diff --git a/images/emoji/1f60f.png b/images/emoji/1f60f.png Binary files differnew file mode 100644 index 000000000..878521099 --- /dev/null +++ b/images/emoji/1f60f.png diff --git a/images/emoji/1f619.png b/images/emoji/1f619.png Binary files differnew file mode 100644 index 000000000..e181f1709 --- /dev/null +++ b/images/emoji/1f619.png diff --git a/images/emoji/1f61a.png b/images/emoji/1f61a.png Binary files differnew file mode 100644 index 000000000..b684d7d4d --- /dev/null +++ b/images/emoji/1f61a.png diff --git a/images/emoji/1f61b.png b/images/emoji/1f61b.png Binary files differnew file mode 100644 index 000000000..25757341f --- /dev/null +++ b/images/emoji/1f61b.png diff --git a/images/emoji/1f61c.png b/images/emoji/1f61c.png Binary files differnew file mode 100644 index 000000000..4817eaa3d --- /dev/null +++ b/images/emoji/1f61c.png diff --git a/images/emoji/1f61d.png b/images/emoji/1f61d.png Binary files differnew file mode 100644 index 000000000..5c0401e9b --- /dev/null +++ b/images/emoji/1f61d.png diff --git a/images/emoji/1f61e.png b/images/emoji/1f61e.png Binary files differnew file mode 100644 index 000000000..efe4e67e2 --- /dev/null +++ b/images/emoji/1f61e.png diff --git a/images/emoji/1f61f.png b/images/emoji/1f61f.png Binary files differnew file mode 100644 index 000000000..7074afcf5 --- /dev/null +++ b/images/emoji/1f61f.png diff --git a/images/emoji/1f622.png b/images/emoji/1f622.png Binary files differnew file mode 100644 index 000000000..b7877f8a1 --- /dev/null +++ b/images/emoji/1f622.png diff --git a/images/emoji/1f628.png b/images/emoji/1f628.png Binary files differnew file mode 100644 index 000000000..eb8b347ce --- /dev/null +++ b/images/emoji/1f628.png diff --git a/images/emoji/1f62a.png b/images/emoji/1f62a.png Binary files differnew file mode 100644 index 000000000..836b41077 --- /dev/null +++ b/images/emoji/1f62a.png diff --git a/images/emoji/1f62b.png b/images/emoji/1f62b.png Binary files differnew file mode 100644 index 000000000..19aba1bc1 --- /dev/null +++ b/images/emoji/1f62b.png diff --git a/images/emoji/1f62c.png b/images/emoji/1f62c.png Binary files differnew file mode 100644 index 000000000..871b2f071 --- /dev/null +++ b/images/emoji/1f62c.png diff --git a/images/emoji/1f62d.png b/images/emoji/1f62d.png Binary files differnew file mode 100644 index 000000000..e4f818360 --- /dev/null +++ b/images/emoji/1f62d.png diff --git a/images/emoji/1f62e.png b/images/emoji/1f62e.png Binary files differnew file mode 100644 index 000000000..a62cd27e1 --- /dev/null +++ b/images/emoji/1f62e.png diff --git a/images/emoji/1f62f.png b/images/emoji/1f62f.png Binary files differnew file mode 100644 index 000000000..cad0e2313 --- /dev/null +++ b/images/emoji/1f62f.png diff --git a/images/emoji/1f631.png b/images/emoji/1f631.png Binary files differnew file mode 100644 index 000000000..6ab43a0d3 --- /dev/null +++ b/images/emoji/1f631.png diff --git a/images/emoji/1f634.png b/images/emoji/1f634.png Binary files differnew file mode 100644 index 000000000..9ecf600d6 --- /dev/null +++ b/images/emoji/1f634.png diff --git a/images/emoji/1f64b.png b/images/emoji/1f64b.png Binary files differnew file mode 100644 index 000000000..7c803b315 --- /dev/null +++ b/images/emoji/1f64b.png diff --git a/images/emoji/1f64f.png b/images/emoji/1f64f.png Binary files differnew file mode 100644 index 000000000..8347f2435 --- /dev/null +++ b/images/emoji/1f64f.png diff --git a/images/emoji/1f6ab.png b/images/emoji/1f6ab.png Binary files differnew file mode 100644 index 000000000..d2efd65e7 --- /dev/null +++ b/images/emoji/1f6ab.png diff --git a/images/emoji/1f918.png b/images/emoji/1f918.png Binary files differnew file mode 100644 index 000000000..4aa6e7e0a --- /dev/null +++ b/images/emoji/1f918.png diff --git a/images/emoji/1f919.png b/images/emoji/1f919.png Binary files differnew file mode 100644 index 000000000..a10c59ba7 --- /dev/null +++ b/images/emoji/1f919.png diff --git a/images/emoji/1f91d.png b/images/emoji/1f91d.png Binary files differnew file mode 100644 index 000000000..75e8d58e9 --- /dev/null +++ b/images/emoji/1f91d.png diff --git a/images/emoji/262e.png b/images/emoji/262e.png Binary files differnew file mode 100644 index 000000000..86033faf4 --- /dev/null +++ b/images/emoji/262e.png diff --git a/images/emoji/263a.png b/images/emoji/263a.png Binary files differnew file mode 100644 index 000000000..e9e53c03d --- /dev/null +++ b/images/emoji/263a.png diff --git a/images/emoji/2665.png b/images/emoji/2665.png Binary files differnew file mode 100644 index 000000000..393c3ed52 --- /dev/null +++ b/images/emoji/2665.png diff --git a/images/emoji/26a1.png b/images/emoji/26a1.png Binary files differnew file mode 100644 index 000000000..47e68e48e --- /dev/null +++ b/images/emoji/26a1.png diff --git a/images/emoji/270c.png b/images/emoji/270c.png Binary files differnew file mode 100644 index 000000000..70c5516ff --- /dev/null +++ b/images/emoji/270c.png diff --git a/images/emoji/2714.png b/images/emoji/2714.png Binary files differnew file mode 100644 index 000000000..03bd69537 --- /dev/null +++ b/images/emoji/2714.png diff --git a/images/emoji/2716.png b/images/emoji/2716.png Binary files differnew file mode 100644 index 000000000..e47cc1b68 --- /dev/null +++ b/images/emoji/2716.png diff --git a/images/emoji/2754.png b/images/emoji/2754.png Binary files differnew file mode 100644 index 000000000..6e7824c75 --- /dev/null +++ b/images/emoji/2754.png 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 & 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); |