diff --git a/boot.php b/boot.php index 29e56c78c5..5fac9df5ae 100644 --- a/boot.php +++ b/boot.php @@ -2045,18 +2045,7 @@ function contact_block() { if(count($r)) { $o .= '

' . sprintf( tt('%d Contact','%d Contacts', $total),$total) . '

'; foreach($r as $rr) { - $redirect_url = $a->get_baseurl() . '/redir/' . $rr['id']; - if(local_user() && ($rr['uid'] == local_user()) - && ($rr['network'] === 'dfrn')) { - $url = $redirect_url; - $sparkle = ' sparkle'; - } - else { - $url = $rr['url']; - $sparkle = ''; - } - - $o .= '
' . $rr['name'] . '
' . "\r\n"; + $o .= micropro($rr,true,'mpfriend'); } $o .= '
'; $o .= '
' . t('View Contacts') . '
'; @@ -2070,6 +2059,31 @@ function contact_block() { }} +if(! function_exists('micropro')) { +function micropro($contact, $redirect = false, $class = '') { + + if($class) + $class = ' ' . $class; + + $url = $contact['url']; + $sparkle = ''; + + if($redirect) { + $a = get_app(); + $redirect_url = $a->get_baseurl() . '/redir/' . $contact['id']; + if(local_user() && ($contact['uid'] == local_user()) && ($contact['network'] === 'dfrn')) { + $url = $redirect_url; + $sparkle = ' sparkle'; + } + } + + return '
' . $contact['name'] . '
' . "\r\n"; +}} + + + if(! function_exists('search')) { function search($s) { $a = get_app(); diff --git a/mod/group.php b/mod/group.php index 3ee14dd85f..591c936271 100644 --- a/mod/group.php +++ b/mod/group.php @@ -128,11 +128,11 @@ function group_content(&$a) { goaway($a->get_baseurl() . '/contacts'); } $group = $r[0]; - $ret = group_get_members($group['id']); + $members = group_get_members($group['id']); $preselected = array(); - if(count($ret)) { - foreach($ret as $p) - $preselected[] = $p['id']; + if(count($members)) { + foreach($members as $member) + $preselected[] = $member['id']; } $drop_tpl = load_view_file('view/group_drop.tpl'); @@ -156,6 +156,13 @@ function group_content(&$a) { )); } + + $o .= '
'; + foreach($members as $member) { + $o .= micropro($member,true,'mpgroup'); + } + $o .= '
'; + return $o; } \ No newline at end of file diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 32d88493cb..cc55f7887b 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2225,4 +2225,13 @@ a.mail-list-link { position: absolute; top: 0; left: 0; -) +} + +#group-members { + margin-top: 20px; +} + +#group-members-end { + clear: both; +} + diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 0872691dcd..17b4e7fb28 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -2248,4 +2248,14 @@ a.mail-list-link { position: absolute; top: 0; left: 0; -) +} + + +#group-members { + margin-top: 20px; +} + +#group-members-end { + clear: both; +} +