X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=95ebff96f3669564055688c05840bb2901d3d9b5;hb=d80888842926eba272ae0e86d7666daeef201dc3;hp=1fc31c3eb97d81de3fa30c4a74dced2b0397f1e5;hpb=d0ae5ce3263ec96250ecc1da0031f420891a370f;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 1fc31c3eb9..95ebff96f3 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -1,5 +1,7 @@ user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : '')); @@ -162,7 +166,7 @@ function notifications_content(&$a) { '$intro_id' => $rr['intro_id'], '$madeby' => sprintf( t('suggested by %s'),$rr['name']), '$contact_id' => $rr['contact-id'], - '$photo' => ((x($rr,'fphoto')) ? $rr['fphoto'] : "images/person-175.jpg"), + '$photo' => ((x($rr,'fphoto')) ? proxy_url($rr['fphoto']) : "images/person-175.jpg"), '$fullname' => $rr['fname'], '$url' => zrl($rr['furl']), '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), @@ -206,7 +210,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'], $rr['url']).")"; + $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, @@ -216,9 +233,9 @@ function notifications_content(&$a) { '$contact_id' => $rr['contact-id'], '$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo']) : "images/person-175.jpg"), '$fullname' => $rr['name'], - '$location' => $rr['glocation'], + '$location' => bbcode($rr['glocation'], false, false), '$location_label' => t('Location:'), - '$about' => proxy_parse_html(bbcode($rr['gabout'], false, false)), + '$about' => bbcode($rr['gabout'], false, false), '$about_label' => t('About:'), '$keywords' => $rr['gkeywords'], '$keywords_label' => t('Tags:'), @@ -227,6 +244,7 @@ function notifications_content(&$a) { '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), '$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')), '$url' => zrl($rr['url']), + '$url_label' => t('Profile URL'), '$knowyou' => $knowyou, '$approve' => t('Approve'), '$note' => $rr['note'], @@ -350,7 +368,7 @@ function notifications_content(&$a) { foreach ($r as $it) { $notif_content .= replace_macros($not_tpl,array( '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'], - '$item_image' => $it['photo'], + '$item_image' => proxy_url($it['photo']), '$item_text' => strip_tags(bbcode($it['msg'])), '$item_when' => relative_date($it['date']) ));