X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdirectory.php;h=7fab53b6807cadd363da70227b1f3c3a6679e5aa;hb=5cb3a0fcedf80937b051425be3ddb5f8d44f8c08;hp=833a4f81cc0da7deb5c68b27c6997de2907b506d;hpb=9bf8efc45f51455257410c98c827002551bd330d;p=friendica.git diff --git a/mod/directory.php b/mod/directory.php index 833a4f81cc..7fab53b680 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -27,6 +27,8 @@ function directory_post(&$a) { function directory_content(&$a) { + require_once("mod/proxy.php"); + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; @@ -90,7 +92,7 @@ function directory_content(&$a) { $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); - + $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '
' : ''); $details = ''; @@ -140,19 +142,26 @@ function directory_content(&$a) { $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False); $about = ((x($profile,'about') == 1) ? t('About:') : False); - + $tpl = get_markup_template('directory_item.tpl'); + if($a->theme['template_engine'] === 'internal') { + $location_e = template_escape($location); + } + else { + $location_e = $location; + } + $entry = replace_macros($tpl,array( '$id' => $rr['id'], - '$profile-link' => $profile_link, - '$photo' => $a->get_cached_avatar_image($rr[$photo]), - '$alt-text' => $rr['name'], + '$profile_link' => $profile_link, + '$photo' => proxy_url($a->get_cached_avatar_image($rr[$photo])), + '$alt_text' => $rr['name'], '$name' => $rr['name'], '$details' => $pdesc . $details, - '$page-type' => $page_type, + '$page_type' => $page_type, '$profile' => $profile, - '$location' => template_escape($location), + '$location' => $location_e, '$gender' => $gender, '$pdesc' => $pdesc, '$marital' => $marital, @@ -164,7 +173,7 @@ function directory_content(&$a) { $arr = array('contact' => $rr, 'entry' => $entry); call_hooks('directory_item', $arr); - + unset($profile); unset($location);