+
+
+ $profile_url = $item['url'];
+
+ // This is my profile but I'm not the author of this post/comment. If it's somebody that's a fan or mutual friend,
+ // I can go directly to their profile as an authenticated guest.
+
+ if(local_user() && ($item['contact-uid'] == $_SESSION['uid']) && (strlen($item['dfrn-id'])) && (! $item['self'] ))
+ $profile_url = $redirect_url;
+
+ // FIXME tryng to solve the mishmash of profile photos.
+
+ // $photo = (($item['self']) ? $a->profile['photo'] : $item['photo']);
+ // $thumb = (($item['self']) ? $a->profile['thumb'] : $item['thumb']);
+
+
+ // We received this post via a remote feed. It's either a wall-to-wall or a remote comment. The author is
+ // known to us and is reflected in the contact-id for this item. We can use the contact url or redirect rather than
+ // use the link in the feed. This is different than on the network page where we may not know the author.
+
+ $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
+ $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
+ $profile_link = $profile_url;
+
+ $o .= replace_macros($template,array(
+ '$id' => $item['item_id'],
+ '$profile_url' => $profile_link,
+ '$name' => $profile_name,
+ '$thumb' => $profile_avatar,
+ '$body' => bbcode($item['body']),
+ '$ago' => relative_date($item['created']),
+ '$indent' => (($item['parent'] != $item['item_id']) ? 'comment-' : ''),
+ '$comment' => $comment
+ ));