From 4003b9cc5de25bd68007d64e179649b36ce244a7 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 17:18:58 +0200 Subject: [PATCH] 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 831beee76..513f685b4 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 d50b14cd4..8e5a24a6b 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}}