4 function contact_profile_assign($current,$foreign_net) {
8 $disabled = (($foreign_net) ? ' disabled="true" ' : '');
10 $o .= "<select id=\"contact-profile-selector\" $disabled name=\"profile-assign\" />\r\n";
12 $r = q("SELECT `id`, `profile-name` FROM `profile` WHERE `uid` = %d",
13 intval($_SESSION['uid']));
17 $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : "");
18 $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
21 $o .= "</select>\r\n";
26 function contact_reputation($current) {
29 $o .= "<select id=\"contact-reputation-selector\" name=\"reputation\" />\r\n";
32 0 => t('Unknown | Not categorised'),
33 1 => t('Block immediately'),
34 2 => t('Shady, spammer, self-marketer'),
35 3 => t('Known to me, but no opinion'),
36 4 => t('OK, probably harmless'),
37 5 => t('Reputable, has my trust')
40 foreach($rep as $k => $v) {
41 $selected = (($k == $current) ? " selected=\"selected\" " : "");
42 $o .= "<option value=\"$k\" $selected >$v</option>\r\n";
44 $o .= "</select>\r\n";
49 function contact_poll_interval($current, $disabled = false) {
51 $dis = (($disabled) ? ' disabled="disabled" ' : '');
53 $o .= "<select id=\"contact-poll-interval\" name=\"poll\" $dis />" . "\r\n";
58 2 => t('Twice daily'),
64 foreach($rep as $k => $v) {
65 $selected = (($k == $current) ? " selected=\"selected\" " : "");
66 $o .= "<option value=\"$k\" $selected >$v</option>\r\n";
68 $o .= "</select>\r\n";
73 function network_to_name($s) {
75 call_hooks('network_to_name', $s);
77 return str_replace(array(NETWORK_DFRN,NETWORK_OSTATUS,NETWORK_FEED,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_FACEBOOK,NETWORK_ZOT),
78 array(t('Friendika'),t('OStatus'),t('RSS/Atom'),t('Email'),t('Diaspora'),t('Facebook'),t('Zot!')),$s);