diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2012-02-23 02:52:04 -0800 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2012-02-23 02:52:04 -0800 |
commit | d5adb67ef480bd24bcca4d384eba72e51ae27446 (patch) | |
tree | 6e7daff5fffd3adf40b30db3b66221543c3d1ec4 /mod/viewcontacts.php | |
parent | 85d09f48d0bdddd43c8dd13c618cc714a679d141 (diff) | |
parent | cbc60d525e9140169c3b2d03998c53907b2fa3a7 (diff) | |
download | volse-hubzilla-d5adb67ef480bd24bcca4d384eba72e51ae27446.tar.gz volse-hubzilla-d5adb67ef480bd24bcca4d384eba72e51ae27446.tar.bz2 volse-hubzilla-d5adb67ef480bd24bcca4d384eba72e51ae27446.zip |
Merge pull request #46 from fabrixxm/master
more work on quattro theme and less html in php
Diffstat (limited to 'mod/viewcontacts.php')
-rwxr-xr-x | mod/viewcontacts.php | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index cd8d100ed..10c980d93 100755 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -1,4 +1,5 @@ <?php +require_once('include/contact_selectors.php'); function viewcontacts_init(&$a) { @@ -22,8 +23,6 @@ function viewcontacts_content(&$a) { return; } - $o .= '<h3>' . t('View Contacts') . '</h3>'; - $r = q("SELECT COUNT(*) as `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 ", intval($a->profile['uid']) @@ -41,7 +40,7 @@ function viewcontacts_content(&$a) { return $o; } - $tpl = get_markup_template("viewcontact_template.tpl"); + $contacts = array(); foreach($r as $rr) { if($rr['self']) @@ -56,19 +55,26 @@ function viewcontacts_content(&$a) { if($is_owner && ($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) $url = 'redir/' . $rr['id']; - $o .= replace_macros($tpl, array( - '$id' => $rr['id'], - '$alt_text' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']), - '$thumb' => $rr['thumb'], - '$name' => substr($rr['name'],0,20), - '$username' => $rr['name'], - '$url' => $url - )); + $contacts[] = array( + 'id' => $rr['id'], + 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']), + 'thumb' => $rr['thumb'], + 'name' => substr($rr['name'],0,20), + 'username' => $rr['name'], + 'url' => $url, + 'sparkle' => '', + 'item' => $rr, + ); } - $o .= '<div id="view-contact-end"></div>'; - $o .= paginate($a); + $tpl = get_markup_template("viewcontact_template.tpl"); + $o .= replace_macros($tpl, array( + '$title' => t('View Contacts'), + '$contacts' => $contacts, + '$paginate' => paginate($a), + )); + return $o; } |