+ $lblsuggest = (($r[0]['network'] === NETWORK_DFRN)
+ ? '<div id="contact-suggest-wrapper"><a href="fsuggest/' . $r[0]['id'] . '" id="contact-suggest">' . t('Suggest friends') . '</a></div>' : '');
+
+ $poll_enabled = (($r[0]['network'] !== NETWORK_DIASPORA) ? true : false);
+
+ $nettype = '<div id="contact-edit-nettype">' . sprintf( t('Network type: %s'),network_to_name($r[0]['network'])) . '</div>';
+
+ $o .= replace_macros($tpl,array(
+ '$header' => t('Contact Editor'),
+ '$submit' => t('Submit'),
+ '$lbl_vis1' => t('Profile Visibility'),
+ '$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $r[0]['name']),
+ '$lbl_info1' => t('Contact Information / Notes'),
+ '$lbl_rep1' => t('Online Reputation'),
+ '$lbl_rep2' => t('Occasionally your friends may wish to inquire about this person\'s online legitimacy.'),
+ '$lbl_rep3' => t('You may help them choose whether or not to interact with this person by providing a <em>reputation</em> to guide them.'),
+ '$lbl_rep4' => t('Please take a moment to elaborate on this selection if you feel it could be helpful to others.'),
+ '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']),
+ '$blockunblock' => t('Block/Unblock contact'),
+ '$ignorecont' => t('Ignore contact'),
+ '$altcrepair' => t('Repair contact URL settings'),
+ '$lblcrepair' => t("Repair contact URL settings \x28WARNING: Advanced\x29"),
+ '$lblrecent' => t('View conversations'),
+ '$lblsuggest' => $lblsuggest,
+ '$delete' => t('Delete contact'),
+ '$nettype' => $nettype,
+ '$poll_interval' => contact_poll_interval($r[0]['priority'],(! $poll_enabled)),
+ '$poll_enabled' => $poll_enabled,
+ '$lastupdtext' => t('Last updated: '),
+ '$updpub' => t('Update public posts: '),
+ '$last_update' => $last_update,
+ '$udnow' => t('Update now'),
+ '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)),
+ '$contact_id' => $r[0]['id'],
+ '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
+ '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
+ '$insecure' => (($r[0]['network'] !== NETWORK_DFRN && $r[0]['network'] !== NETWORK_MAIL && $r[0]['network'] !== NETWORK_FACEBOOK && $r[0]['network'] !== NETWORK_DIASPORA) ? $insecure : ''),
+ '$info' => $r[0]['info'],
+ '$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
+ '$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
+ '$photo' => $r[0]['photo'],
+ '$name' => $r[0]['name'],
+ '$dir_icon' => $dir_icon,
+ '$alt_text' => $alt_text,
+ '$sparkle' => $sparkle,
+ '$url' => $url
+
+ ));
+
+ $arr = array('contact' => $r[0],'output' => $o);
+
+ call_hooks('contact_edit', $arr);
+
+ return $arr['output'];