From e6a446755730dc2da2cc5615ae57dab9f678cec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz=20=28admin=29?= Date: Sun, 1 Oct 2023 12:34:56 +0200 Subject: [PATCH] add "Show Forum" Button to Profile --- src/Content/Widget/VCard.php | 8 ++++++++ view/theme/frio/templates/widget/vcard.tpl | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/Content/Widget/VCard.php b/src/Content/Widget/VCard.php index 62a8e90853..8a949e9360 100644 --- a/src/Content/Widget/VCard.php +++ b/src/Content/Widget/VCard.php @@ -68,6 +68,7 @@ class VCard $follow_link = ''; $unfollow_link = ''; $wallmessage_link = ''; + $showforum_link = ''; $photo = Contact::getPhoto($contact); @@ -99,6 +100,10 @@ class VCard if (in_array($rel, [Contact::FOLLOWER, Contact::FRIEND]) && Contact::canReceivePrivateMessages($contact)) { $wallmessage_link = 'message/new/' . $id; } + + if (in_array($rel, [Contact::SHARING])) { + $showforum_link = 'network/group/' . $id; + } } return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [ @@ -119,6 +124,9 @@ class VCard '$unfollow_link' => $unfollow_link, '$wallmessage' => DI::l10n()->t('Message'), '$wallmessage_link' => $wallmessage_link, + '$showforum' => DI::l10n()->t('Show Forum'), + '$showforum_link' => $showforum_link, + '$mentioning' => DI::l10n()->t('Mention'), ]); } } diff --git a/view/theme/frio/templates/widget/vcard.tpl b/view/theme/frio/templates/widget/vcard.tpl index 9fef57a9d7..8ae0a1d1cd 100644 --- a/view/theme/frio/templates/widget/vcard.tpl +++ b/view/theme/frio/templates/widget/vcard.tpl @@ -56,6 +56,22 @@ {{/if}} + {{if $contact.addr}} + + {{/if}} + {{if $contact.forum==1 || $contact.prv==1}} + + {{/if}}