From 4003b9cc5de25bd68007d64e179649b36ce244a7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 17:18:58 +0200 Subject: [PATCH 1/2] Let the notification look more like the follow dialog --- mod/notifications.php | 18 +++++++++++++++++- view/templates/intros.tpl | 3 +-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/mod/notifications.php b/mod/notifications.php index 831beee765..513f685b47 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -1,5 +1,6 @@ user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : '')); @@ -206,7 +209,20 @@ function notifications_content(&$a) { )); } + $header = $rr["name"]; + + $ret = probe_url($rr["url"]); + + if ($rr['gnetwork'] == "") + $rr['gnetwork'] = $ret["network"]; + + if ($ret["addr"] != "") + $header .= " <".$ret["addr"].">"; + + $header .= " (".network_to_name($rr['gnetwork']).")"; + $notif_content .= replace_macros($tpl, array( + '$header' => htmlentities($header), '$str_notifytype' => t('Notification type: '), '$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')), '$dfrn_text' => $dfrn_text, diff --git a/view/templates/intros.tpl b/view/templates/intros.tpl index d50b14cd41..8e5a24a6b8 100644 --- a/view/templates/intros.tpl +++ b/view/templates/intros.tpl @@ -1,9 +1,8 @@ - +

{{$header}}

{{$str_notifytype}} {{$notify_type}}

-
{{$fullname}}
{{$fullname|escape:'html'}}
{{$url_label}}
{{$url}}
{{if $location}}
{{$location_label}}
{{$location}}
{{/if}} From 8c514307cf11c0b000ce437fcb2bef2a8952ef0c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 17:20:47 +0200 Subject: [PATCH 2/2] For safety reasons include the include --- mod/notifications.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/notifications.php b/mod/notifications.php index 513f685b47..bcda5ba343 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -1,6 +1,7 @@