aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-02-12 10:43:31 +0000
committerMario <mario@mariovavti.com>2023-02-12 10:43:31 +0000
commita1eb39872ba5017be218d48f319addf3d40ff05d (patch)
treef80684b9c5a0d66f2a3da425295cc28401320fc1 /Zotlabs
parent724b8cc6a54c2e778a2d67b2177ecf373f615c64 (diff)
downloadvolse-hubzilla-a1eb39872ba5017be218d48f319addf3d40ff05d.tar.gz
volse-hubzilla-a1eb39872ba5017be218d48f319addf3d40ff05d.tar.bz2
volse-hubzilla-a1eb39872ba5017be218d48f319addf3d40ff05d.zip
implement hq widget author image and notifications updates
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Enotify.php2
-rw-r--r--Zotlabs/Widget/Channel_activities.php4
-rw-r--r--Zotlabs/Widget/Messages.php4
3 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php
index 2015b260d..823e1df29 100644
--- a/Zotlabs/Lib/Enotify.php
+++ b/Zotlabs/Lib/Enotify.php
@@ -869,7 +869,7 @@ class Enotify {
$x = array(
'notify_link' => $item['llink'],
'name' => $item[$who]['xchan_name'],
- 'addr' => $item[$who]['xchan_addr'] ?? $item[$who]['xchan_url'],
+ 'addr' => $item[$who]['xchan_addr'] ? $item[$who]['xchan_addr'] : $item[$who]['xchan_url'],
'url' => $item[$who]['xchan_url'],
'photo' => $item[$who]['xchan_photo_s'],
'when' => (($edit) ? datetime_convert('UTC', date_default_timezone_get(), $item['edited']) : datetime_convert('UTC', date_default_timezone_get(), $item['created'])),
diff --git a/Zotlabs/Widget/Channel_activities.php b/Zotlabs/Widget/Channel_activities.php
index 06080f8c8..a799ea81e 100644
--- a/Zotlabs/Widget/Channel_activities.php
+++ b/Zotlabs/Widget/Channel_activities.php
@@ -179,7 +179,7 @@ class Channel_activities {
$account = App::get_account();
- $r = q("SELECT channel_id, channel_name, xchan_photo_s FROM channel
+ $r = q("SELECT channel_id, channel_name, xchan_addr, xchan_photo_s FROM channel
LEFT JOIN xchan ON channel_hash = xchan_hash
WHERE channel_account_id = %d
AND channel_id != %d AND channel_removed = 0",
@@ -223,7 +223,7 @@ class Channel_activities {
$i[] = [
'url' => z_root() . '/manage/' . $rr['channel_id'],
'title' => '',
- 'summary' => '<img src="' . $rr['xchan_photo_s'] . '" class="menu-img-2">' . $rr['channel_name'],
+ 'summary' => '<div class="text-truncate lh-sm"><img src="' . $rr['xchan_photo_s'] . '" class="menu-img-2">' . '<strong>' . $rr['channel_name'] . '</strong><br><small class="opacity-75">' . $rr['xchan_addr'] . '</small></div>',
'footer' => $footer
];
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index 418e49169..a37a178f9 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -162,7 +162,7 @@ class Messages {
$summary = '...';
}
else {
- $summary = substr_words($summary, 68);
+ $summary = substr_words($summary, 140);
}
switch(intval($item['item_private'])) {
@@ -178,6 +178,7 @@ class Messages {
$entries[$i]['author_name'] = $item['author']['xchan_name'];
$entries[$i]['author_addr'] = (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']);
+ $entries[$i]['author_img'] = $item['author']['xchan_photo_s'];
$entries[$i]['info'] = $info;
$entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $item['created']);
$entries[$i]['summary'] = $summary;
@@ -282,6 +283,7 @@ class Messages {
$entries[$i]['author_name'] = $notice['xname'];
$entries[$i]['author_addr'] = $notice['url'];
+ $entries[$i]['author_img'] = $notice['photo'];// $item['author']['xchan_photo_s'];
$entries[$i]['info'] = '';
$entries[$i]['created'] = datetime_convert('UTC', date_default_timezone_get(), $notice['created']);
$entries[$i]['summary'] = $summary;