aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-11 22:47:16 -0700
committerFriendika <info@friendika.com>2011-04-11 22:47:16 -0700
commit6da84027afa18633ac5d5dacce99bb244be2aa7b (patch)
treefcaa525731a8b9cf0a21206faa4d52405663547e /boot.php
parent98712bce7622d618eecaf0a785f3664dd8648ce2 (diff)
downloadvolse-hubzilla-6da84027afa18633ac5d5dacce99bb244be2aa7b.tar.gz
volse-hubzilla-6da84027afa18633ac5d5dacce99bb244be2aa7b.tar.bz2
volse-hubzilla-6da84027afa18633ac5d5dacce99bb244be2aa7b.zip
visual display of group members
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php38
1 files changed, 26 insertions, 12 deletions
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 .= '<h4 class="contact-h4">' . sprintf( tt('%d Contact','%d Contacts', $total),$total) . '</h4><div id="contact-block">';
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 .= '<div class="contact-block-div"><a class="contact-block-link' . $sparkle . '" href="' . $url . '" ><img class="contact-block-img' . $sparkle . '" src="' . $rr['micro'] . '" title="' . $rr['name'] . ' [' . $rr['url'] . ']" alt="' . $rr['name'] . '" /></a></div>' . "\r\n";
+ $o .= micropro($rr,true,'mpfriend');
}
$o .= '</div><div id="contact-block-end"></div>';
$o .= '<div id="viewcontacts"><a id="viewcontacts-link" href="viewcontacts/' . $a->profile['nickname'] . '">' . t('View Contacts') . '</a></div>';
@@ -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 '<div class="contact-block-div' . $class . '"><a class="contact-block-link' . $class . $sparkle
+ . '" href="' . $url . '" ><img class="contact-block-img' . $class . $sparkle . '" src="' . $contact['micro']
+ . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name'] . '" /></a></div>' . "\r\n";
+}}
+
+
+
if(! function_exists('search')) {
function search($s) {
$a = get_app();