object_guid); //get object url $object_url = $object->getURL(); //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 the right annotation type //*todo - use the same for comments, everywhere e.g. comment switch($vars['item']->subtype){ case 'thewire': $annotation_comment = 'wire_reply'; break; default: $annotation_comment = 'generic_comment'; break; } //count comment annotations $comment_count = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, $annotation_comment); //count like annotations $likes = count_annotations($vars['item']->object_guid, $vars['item']->type, $vars['item']->subtype, "likes"); //get last two comments display $get_comments = get_annotations($vars['item']->object_guid, "", "", $annotation_comment, "", "", 3, 0, "desc"); if($get_comments){ //reverse the array so we can display comments in the right order $get_comments = array_reverse($get_comments); } //minus two off the comment total as we display two by default if($comment_count < 3) $num_comments = 0; else $num_comments = $comment_count - 3; ?>