else
$profile_link = zrl($profile_link);
- $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
- if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
- $profile_avatar = $a->contacts[$normalised]['thumb'];
+ // Don't rely on the author-avatar. It is better to use the data from the contact table
+ $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+ if ($author_contact["thumb"])
+ $profile_avatar = $author_contact["thumb"];
else
- $profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']));
+ $profile_avatar = $item['author-avatar'];
$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate);
else
$profile_link = zrl($profile_link);
- $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
- if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
- $profile_avatar = $a->contacts[$normalised]['thumb'];
+ // Don't rely on the author-avatar. It is better to use the data from the contact table
+ $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner);
+ if ($author_contact["thumb"])
+ $profile_avatar = $author_contact["thumb"];
else
- $profile_avatar = $a->remove_baseurl(((strlen($item['author-avatar']) && $diff_author) ? $item['author-avatar'] : $thumb));
+ $profile_avatar = $item['author-avatar'];
$like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
$dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
$shiny = "";
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
- $shiny = 'shiny';
+ $shiny = 'shiny';
- //
+ //
localize_item($item);