- foreach($r as $item) {
- $comment = '';
- $template = $tpl;
-
- $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
-
-
-
- if(can_write_wall($a,$a->profile['uid'])) {
- if($item['last-child']) {
- $comment = replace_macros($cmnt_tpl,array(
- '$return_path' => $_SESSION['return_url'],
- '$type' => 'wall-comment',
- '$id' => $item['item_id'],
- '$parent' => $item['parent'],
- '$profile_uid' => $a->profile['uid'],
- '$mylink' => $contact['url'],
- '$mytitle' => t('Me'),
- '$myphoto' => $contact['thumb'],
- '$ww' => ''
- ));
- }
- }
-
-
- $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.