object_guid); $object_url = $object->getURL(); $likes_count = elgg_count_likes($object); //user //if displaying on the profile get the object owner, else the subject_guid if (get_context() == 'profile' && $object->getSubtype() == 'thewire') { $user = get_entity($object->owner_guid); } else { $user = get_entity($vars['item']->subject_guid); } // get last three comments display // want the 3 most recent comments (order by time_created desc = 3 2 1 limit 3) // but will display them with the newest at the bottom (1 2 3) if ($comments = get_annotations($vars['item']->object_guid, "", "", 'generic_comment', "", "", 3, 0, "desc")) { $comments = array_reverse($comments); } // for displaying "+N more" // -3 from the count because the 3 displayed don't count in the "more" $comment_count = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, 'generic_comment'); if ($comment_count < 3) { $more_comments_count = 0; } else { $more_comments_count = $comment_count - 3; } ?>