Merge branch 'sabre32' of https://github.com/redmatrix/hubzilla into sabre32
@ -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,
|
||||
|
@ -1547,8 +1547,8 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
|
||||
// Toggle theme status
|
||||
|
||||
toggle_theme($themes, $theme, $result);
|
||||
$s = rebuild_theme_table($themes);
|
||||
$this->toggle_theme($themes, $theme, $result);
|
||||
$s = $this->rebuild_theme_table($themes);
|
||||
if($result)
|
||||
info( sprintf('Theme %s enabled.', $theme));
|
||||
else
|
||||
@ -1561,7 +1561,7 @@ class Admin extends \Zotlabs\Web\Controller {
|
||||
// display theme details
|
||||
require_once('library/markdown.php');
|
||||
|
||||
if (theme_status($themes,$theme)) {
|
||||
if ($this->theme_status($themes,$theme)) {
|
||||
$status="on"; $action= t("Disable");
|
||||
} else {
|
||||
$status="off"; $action= t("Enable");
|
||||
|
@ -93,9 +93,9 @@ class Manage extends \Zotlabs\Web\Controller {
|
||||
$channels[$x]['mail'] = intval($mails[0]['total']);
|
||||
|
||||
|
||||
$events = q("SELECT type, start, adjust FROM `event`
|
||||
WHERE `event`.`uid` = %d AND start < '%s' AND start > '%s' and `ignore` = 0
|
||||
ORDER BY `start` ASC ",
|
||||
$events = q("SELECT etype, dtstart, adjust FROM `event`
|
||||
WHERE `event`.`uid` = %d AND dtstart < '%s' AND dtstart > '%s' and `dismissed` = 0
|
||||
ORDER BY `dtstart` ASC ",
|
||||
intval($channels[$x]['channel_id']),
|
||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now + 7 days')),
|
||||
dbesc(datetime_convert('UTC', date_default_timezone_get(), 'now - 1 days'))
|
||||
@ -108,14 +108,14 @@ class Manage extends \Zotlabs\Web\Controller {
|
||||
$str_now = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y-m-d');
|
||||
foreach($events as $e) {
|
||||
$bd = false;
|
||||
if($e['type'] === 'birthday') {
|
||||
if($e['etype'] === 'birthday') {
|
||||
$channels[$x]['birthdays'] ++;
|
||||
$bd = true;
|
||||
}
|
||||
else {
|
||||
$channels[$x]['events'] ++;
|
||||
}
|
||||
if(datetime_convert('UTC', ((intval($e['adjust'])) ? date_default_timezone_get() : 'UTC'), $e['start'], 'Y-m-d') === $str_now) {
|
||||
if(datetime_convert('UTC', ((intval($e['adjust'])) ? date_default_timezone_get() : 'UTC'), $e['dtstart'], 'Y-m-d') === $str_now) {
|
||||
$channels[$x]['all_events_today'] ++;
|
||||
if($bd)
|
||||
$channels[$x]['birthdays_today'] ++;
|
||||
|
@ -30,11 +30,12 @@ class React extends \Zotlabs\Web\Controller {
|
||||
$n = array();
|
||||
$n['aid'] = $channel['channel_account_id'];
|
||||
$n['uid'] = $channel['channel_id'];
|
||||
$n['item_origin'] = true;
|
||||
$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['body'] = "\n\n[zmg=32x32]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n";
|
||||
$n['author_xchan'] = $channel['channel_hash'];
|
||||
|
||||
$x = item_store($n);
|
||||
|
3
boot.php
@ -783,6 +783,7 @@ class App {
|
||||
public static $content;
|
||||
public static $data = array();
|
||||
public static $error = false;
|
||||
public static $emojitab = false;
|
||||
public static $cmd;
|
||||
public static $argv;
|
||||
public static $argc;
|
||||
@ -866,7 +867,7 @@ class App {
|
||||
/**
|
||||
* App constructor.
|
||||
*/
|
||||
function init() {
|
||||
public static function init() {
|
||||
// we'll reset this after we read our config file
|
||||
date_default_timezone_set('UTC');
|
||||
|
||||
|
BIN
images/emoji/0023-20e3.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/0023.png
Normal file
After Width: | Height: | Size: 634 B |
BIN
images/emoji/002a-20e3.png
Normal file
After Width: | Height: | Size: 627 B |
BIN
images/emoji/002a.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
images/emoji/0030-20e3.png
Normal file
After Width: | Height: | Size: 560 B |
BIN
images/emoji/0030.png
Normal file
After Width: | Height: | Size: 573 B |
BIN
images/emoji/0031-20e3.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
images/emoji/0031.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
images/emoji/0032-20e3.png
Normal file
After Width: | Height: | Size: 567 B |
BIN
images/emoji/0032.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/0033-20e3.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
images/emoji/0033.png
Normal file
After Width: | Height: | Size: 644 B |
BIN
images/emoji/0034-20e3.png
Normal file
After Width: | Height: | Size: 497 B |
BIN
images/emoji/0034.png
Normal file
After Width: | Height: | Size: 542 B |
BIN
images/emoji/0035-20e3.png
Normal file
After Width: | Height: | Size: 577 B |
BIN
images/emoji/0035.png
Normal file
After Width: | Height: | Size: 615 B |
BIN
images/emoji/0036-20e3.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
images/emoji/0036.png
Normal file
After Width: | Height: | Size: 649 B |
BIN
images/emoji/0037-20e3.png
Normal file
After Width: | Height: | Size: 522 B |
BIN
images/emoji/0037.png
Normal file
After Width: | Height: | Size: 559 B |
BIN
images/emoji/0038-20e3.png
Normal file
After Width: | Height: | Size: 608 B |
BIN
images/emoji/0038.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
images/emoji/0039-20e3.png
Normal file
After Width: | Height: | Size: 607 B |
BIN
images/emoji/0039.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
images/emoji/00a9.png
Normal file
After Width: | Height: | Size: 530 B |
BIN
images/emoji/00ae.png
Normal file
After Width: | Height: | Size: 547 B |
BIN
images/emoji/1f004.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
images/emoji/1f0cf.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f170.png
Normal file
After Width: | Height: | Size: 469 B |
BIN
images/emoji/1f171.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
images/emoji/1f17e.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
images/emoji/1f17f.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
images/emoji/1f18e.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
images/emoji/1f191.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
images/emoji/1f192.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
images/emoji/1f193.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
images/emoji/1f194.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
images/emoji/1f195.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
images/emoji/1f196.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
images/emoji/1f197.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
images/emoji/1f198.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/1f199.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
images/emoji/1f19a.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
images/emoji/1f1e6-1f1e8.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
images/emoji/1f1e6-1f1e9.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/emoji/1f1e6-1f1ea.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
images/emoji/1f1e6-1f1eb.png
Normal file
After Width: | Height: | Size: 942 B |
BIN
images/emoji/1f1e6-1f1ec.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
images/emoji/1f1e6-1f1ee.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
images/emoji/1f1e6-1f1f1.png
Normal file
After Width: | Height: | Size: 905 B |
BIN
images/emoji/1f1e6-1f1f2.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
images/emoji/1f1e6-1f1f4.png
Normal file
After Width: | Height: | Size: 997 B |
BIN
images/emoji/1f1e6-1f1f6.png
Normal file
After Width: | Height: | Size: 657 B |
BIN
images/emoji/1f1e6-1f1f7.png
Normal file
After Width: | Height: | Size: 975 B |
BIN
images/emoji/1f1e6-1f1f8.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/emoji/1f1e6-1f1f9.png
Normal file
After Width: | Height: | Size: 430 B |
BIN
images/emoji/1f1e6-1f1fa.png
Normal file
After Width: | Height: | Size: 962 B |
BIN
images/emoji/1f1e6-1f1fc.png
Normal file
After Width: | Height: | Size: 709 B |
BIN
images/emoji/1f1e6-1f1fd.png
Normal file
After Width: | Height: | Size: 496 B |
BIN
images/emoji/1f1e6-1f1ff.png
Normal file
After Width: | Height: | Size: 709 B |
BIN
images/emoji/1f1e7-1f1e6.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
images/emoji/1f1e7-1f1e7.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
images/emoji/1f1e7-1f1e9.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
images/emoji/1f1e7-1f1ea.png
Normal file
After Width: | Height: | Size: 444 B |
BIN
images/emoji/1f1e7-1f1eb.png
Normal file
After Width: | Height: | Size: 717 B |
BIN
images/emoji/1f1e7-1f1ec.png
Normal file
After Width: | Height: | Size: 513 B |
BIN
images/emoji/1f1e7-1f1ed.png
Normal file
After Width: | Height: | Size: 593 B |
BIN
images/emoji/1f1e7-1f1ee.png
Normal file
After Width: | Height: | Size: 795 B |
BIN
images/emoji/1f1e7-1f1ef.png
Normal file
After Width: | Height: | Size: 554 B |
BIN
images/emoji/1f1e7-1f1f1.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/emoji/1f1e7-1f1f2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/emoji/1f1e7-1f1f3.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/emoji/1f1e7-1f1f4.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f1e7-1f1f6.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f1e7-1f1f7.png
Normal file
After Width: | Height: | Size: 819 B |
BIN
images/emoji/1f1e7-1f1f8.png
Normal file
After Width: | Height: | Size: 448 B |
BIN
images/emoji/1f1e7-1f1f9.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/emoji/1f1e7-1f1fb.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
images/emoji/1f1e7-1f1fc.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
images/emoji/1f1e7-1f1fe.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f1e7-1f1ff.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
images/emoji/1f1e7.png
Normal file
After Width: | Height: | Size: 572 B |
BIN
images/emoji/1f1e8-1f1e6.png
Normal file
After Width: | Height: | Size: 755 B |
BIN
images/emoji/1f1e8-1f1e8.png
Normal file
After Width: | Height: | Size: 851 B |
BIN
images/emoji/1f1e8-1f1e9.png
Normal file
After Width: | Height: | Size: 707 B |
BIN
images/emoji/1f1e8-1f1eb.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
images/emoji/1f1e8-1f1ec.png
Normal file
After Width: | Height: | Size: 586 B |
BIN
images/emoji/1f1e8-1f1ed.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
images/emoji/1f1e8-1f1ee.png
Normal file
After Width: | Height: | Size: 440 B |
BIN
images/emoji/1f1e8-1f1f0.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/emoji/1f1e8-1f1f1.png
Normal file
After Width: | Height: | Size: 748 B |
BIN
images/emoji/1f1e8-1f1f2.png
Normal file
After Width: | Height: | Size: 627 B |
BIN
images/emoji/1f1e8-1f1f3.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
images/emoji/1f1e8-1f1f4.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
images/emoji/1f1e8-1f1f5.png
Normal file
After Width: | Height: | Size: 443 B |