- }
-
- $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,
- '$dfrn_id' => $rr['issued-id'],
- '$uid' => $_SESSION['uid'],
- '$intro_id' => $rr['intro_id'],
- '$contact_id' => $rr['contact-id'],
- '$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo'], false, PROXY_SIZE_SMALL) : "images/person-175.jpg"),
- '$fullname' => $rr['name'],
- '$location' => bbcode($rr['glocation'], false, false),
- '$location_label' => t('Location:'),
- '$about' => bbcode($rr['gabout'], false, false),
- '$about_label' => t('About:'),
- '$keywords' => $rr['gkeywords'],
- '$keywords_label' => t('Tags:'),
- '$gender' => $rr['ggender'],
- '$gender_label' => t('Gender:'),
- '$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' => $rr['url'],
- '$zrl' => zrl($rr['url']),
- '$url_label' => t('Profile URL'),
- '$addr' => $rr['addr'],
- '$lbl_knowyou' => $lbl_knowyou,
- '$lbl_network' => t('Network:'),
- '$network' => network_to_name($rr['gnetwork'], $rr['url']),
- '$knowyou' => $knowyou,
- '$approve' => t('Approve'),
- '$note' => $rr['note'],
- '$ignore' => t('Ignore'),
- '$discard' => t('Discard'),
-
- ));
- }
- }
- else
- info( t('No introductions.') . EOL);
-
- } else if (($a->argc > 1) && ($a->argv[1] == 'network')) {
-
- $notif_header = t('Network Notifications');
- $notif_tpl = get_markup_template('notifications.tpl');
-
- $notifs = $nm->networkNotifs($show, $startrec, $perpage);
-
- $notif_show_lnk = array(
- 'href' => ($show ? 'notifications/network' : 'notifications/network?show=all' ),
- 'text' => ($show ? t('Show unread') : t('Show all')),
- );
-
- if(!dbm::is_result($notifs)) {
- if($show)
- $notif_show_lnk = array();
-
- $notif_nocontent = t('No more network notifications.');
- }
-
- } else if (($a->argc > 1) && ($a->argv[1] == 'system')) {
-
- $notif_header = t('System Notifications');
- $notif_tpl = get_markup_template('notifications.tpl');
-
- $notifs = $nm->systemNotifs($show, $startrec, $perpage);
-
- $notif_show_lnk = array(
- 'href' => ($show ? 'notifications/system' : 'notifications/system?show=all' ),
- 'text' => ($show ? t('Show unread') : t('Show all')),
- );
-
- if(!dbm::is_result($notifs)) {
- if($show)
- $notif_show_lnk = array();
-
- $notif_nocontent = t('No more system notifications.');
- }
-
- } else if (($a->argc > 1) && ($a->argv[1] == 'personal')) {
-
- $notif_header = t('Personal Notifications');
- $notif_tpl = get_markup_template('notifications.tpl');
-
- $notifs = $nm->personalNotifs($show, $startrec, $perpage);
-
- $notif_show_lnk = array(
- 'href' => ($show ? 'notifications/personal' : 'notifications/personal?show=all' ),
- 'text' => ($show ? t('Show unread') : t('Show all')),
- );
-
- if(!dbm::is_result($notifs)) {
- if($show)
- $notif_show_lnk = array();