From 6da84027afa18633ac5d5dacce99bb244be2aa7b Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 11 Apr 2011 22:47:16 -0700 Subject: visual display of group members --- boot.php | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 29e56c78c..5fac9df5a 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(); -- cgit v1.2.3