- foreach ($r as $rr) {
-
- $itemurl= '';
-
- $itemurl = (($rr['addr'] != "") ? $rr['addr'] : $rr['profile_url']);
-
- $profile_link = 'profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
-
- $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
-
- $details = '';
- if(strlen($rr['locality']))
- $details .= $rr['locality'];
- if(strlen($rr['region'])) {
- if(strlen($rr['locality']))
- $details .= ', ';
- $details .= $rr['region'];
- }
- if(strlen($rr['country-name'])) {
- if(strlen($details))
- $details .= ', ';
- $details .= $rr['country-name'];
- }
-// if(strlen($rr['dob'])) {
-// if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
-// $details .= '<br />' . t('Age: ') . $years ;
-// }
-// if(strlen($rr['gender']))
-// $details .= '<br />' . t('Gender: ') . $rr['gender'];
-
- $profile = $rr;
-
- if((x($profile,'address') == 1)
- || (x($profile,'locality') == 1)
- || (x($profile,'region') == 1)
- || (x($profile,'postal-code') == 1)
- || (x($profile,'country-name') == 1))
- $location = t('Location:');
-
- $gender = ((x($profile,'gender') == 1) ? t('Gender:') : False);
-
- $marital = ((x($profile,'marital') == 1) ? t('Status:') : False);
-
- $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False);
-
- $about = ((x($profile,'about') == 1) ? t('About:') : False);
-
- $location_e = $location;
-
- $photo_menu = [
- 'profile' => [t("View Profile"), Profile::zrl($profile_link)]
- ];
-
- $entry = [
- 'id' => $rr['id'],
- 'url' => $profile_link,
- 'itemurl' => $itemurl,
- 'thumb' => proxy_url($rr[$photo], false, PROXY_SIZE_THUMB),
- 'img_hover' => $rr['name'],
- 'name' => $rr['name'],
- 'details' => $details,
- 'account_type' => Contact::getAccountType($rr),
- 'profile' => $profile,
- 'location' => $location_e,
- 'tags' => $rr['pub_keywords'],
- 'gender' => $gender,
- 'pdesc' => $pdesc,
- 'marital' => $marital,
- 'homepage' => $homepage,
- 'about' => $about,
- 'photo_menu' => $photo_menu,
-
- ];