X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnotifications.php;h=6c0391e4e9a9fd57049e7ec433d0012ee158e6fc;hb=901b95e93564e1adea3131e744af99e1f31fbe98;hp=44f6dd5675ffeda3610674adfd1ce86b47173837;hpb=4b6afbf6814acde5151edc74f0b6cf1fd7685432;p=friendica.git diff --git a/mod/notifications.php b/mod/notifications.php index 44f6dd5675..6c0391e4e9 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,27 @@ 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']).")"; + + // Don't show these data until you are connected. Diaspora is doing the same. + if($rr['gnetwork'] === NETWORK_DIASPORA) { + $rr['glocation'] = ""; + $rr['gabout'] = ""; + $rr['ggender'] = ""; + } + $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,8 +240,7 @@ 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_label' => t('Location:'), - '$location' => $rr['glocation'], + '$location' => bbcode($rr['glocation'], false, false), '$location_label' => t('Location:'), '$about' => proxy_parse_html(bbcode($rr['gabout'], false, false)), '$about_label' => t('About:'), @@ -228,6 +251,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'], @@ -351,7 +375,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']) ));