-
- $photo_menu = array(array(t("View Profile"), zrl($profile_link)));
-
- $entry = array(
- 'id' => $rr['id'],
- 'url' => $profile_link,
- 'itemurl' => $itemurl,
- 'thumb' => proxy_url($a->get_cached_avatar_image($rr[$photo]), false, PROXY_SIZE_THUMB),
- 'img_hover' => $rr['name'],
- 'name' => $rr['name'],
- 'details' => $details,
- 'account_type' => ($community ? t('Forum') : ''),
- 'profile' => $profile,
- 'location' => $location_e,
- 'tags' => $rr['pub_keywords'],
- 'gender' => $gender,
- 'pdesc' => $pdesc,
- 'marital' => $marital,
- 'homepage' => $homepage,
- 'about' => $about,
- 'photo_menu' => $photo_menu,
-
- );
-
- $arr = array('contact' => $rr, 'entry' => $entry);
-
- call_hooks('directory_item', $arr);
+
+ $gender = ((x($profile, 'gender') == 1) ? L10n::t('Gender:') : false);
+ $marital = ((x($profile, 'marital') == 1) ? L10n::t('Status:') : false);
+ $homepage = ((x($profile, 'homepage') == 1) ? L10n::t('Homepage:') : false);
+ $about = ((x($profile, 'about') == 1) ? L10n::t('About:') : false);
+
+ $location_e = $location;
+
+ $photo_menu = [
+ 'profile' => [L10n::t("View Profile"), Contact::magicLink($profile_link)]
+ ];
+
+ $entry = [
+ 'id' => $rr['id'],
+ 'url' => $profile_link,
+ 'itemurl' => $itemurl,
+ 'thumb' => ProxyUtils::proxifyUrl($rr[$photo], false, ProxyUtils::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,
+
+ ];
+
+ $arr = ['contact' => $rr, 'entry' => $entry];
+
+ Addon::callHooks('directory_item', $arr);