aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
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/Widget
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/Widget')
-rw-r--r--Zotlabs/Widget/Channel_activities.php4
-rw-r--r--Zotlabs/Widget/Messages.php4
2 files changed, 5 insertions, 3 deletions
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;