diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-31 17:31:44 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-08-31 17:31:44 +0200 |
commit | 8b615133d528eb074a23746afef6201f474a4e3f (patch) | |
tree | 1e42e60dcc683ac6a08333e1001759aa0d0e0fcc /include/text.php | |
parent | 54f0685a038d87706ec4ecc15edc55ee171b6079 (diff) | |
download | volse-hubzilla-8b615133d528eb074a23746afef6201f474a4e3f.tar.gz volse-hubzilla-8b615133d528eb074a23746afef6201f474a4e3f.tar.bz2 volse-hubzilla-8b615133d528eb074a23746afef6201f474a4e3f.zip |
remove html from profile vcard code
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/include/text.php b/include/text.php index 66447069e..075caee00 100644 --- a/include/text.php +++ b/include/text.php @@ -539,22 +539,30 @@ function contact_block() { $total = intval($r[0]['total']); } if(! $total) { - $o .= '<h4 class="contact-h4">' . t('No contacts') . '</h4>'; - return $o; - } - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d", - intval($a->profile['uid']), - intval($shown) - ); - 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) { - $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>'; + $contacts = t('No contacts'); + $micropro = Null; + } else { + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 and `pending` = 0 ORDER BY RAND() LIMIT %d", + intval($a->profile['uid']), + intval($shown) + ); + if(count($r)) { + $contacts = sprintf( tt('%d Contact','%d Contacts', $total),$total); + $micropro = Array(); + foreach($r as $rr) { + $micropro[] = micropro($rr,true,'mpfriend'); + } + } } + + $tpl = get_markup_template('contact_block.tpl'); + $o = replace_macros($tpl, array( + '$contacts' => $contacts, + '$nickname' => $a->profile['nickname'], + '$viewcontacts' => t('View Contacts'), + '$micropro' => $micropro, + )); $arr = array('contacts' => $r, 'output' => $o); |