owner_guid); $entity_guid = $vars['annotation']->entity_guid; $mc_entity = get_entity($entity_guid); // get array of unreviewed comments $review_array = explode(',', $mc_entity->unmoderated_comments); // find out if our logged in user is the owner of the entity $entity_owner_id = $mc_entity->owner_guid; if(elgg_get_logged_in_user_guid() == $entity_owner_id){ // user IS the owner - they can see and approve comments //set a flag $can_see_unapproved = TRUE; } else{ $can_see_unapproved = FALSE; } /* #### iku 2016-01-13 #1 #### # # function not AU_anonymous_comments_is_moderated found in module directory, commenting out # // show the comment only if it's already been reviewed, or if we're the moderator, or if moderation is turned off if(!in_array($vars['annotation']->id, $review_array) || $can_see_unapproved || !AU_anonymous_comments_is_moderated($entity_guid)){ $mc_class = "generic_comment"; $reviewed = true; if(AU_anonymous_comments_is_moderated($entity_guid)){ if(in_array($vars['annotation']->id, $review_array)){ // we're moderating and this is unreviewed $mc_class = "generic_comment unreviewed"; $reviewed = false; } } # simplified condition : */ if(!in_array($vars['annotation']->id, $review_array) || $can_see_unapproved ){ $mc_class = "generic_comment"; $reviewed = true; ?>
$vars['annotation']->value)); ?>

name; ?> time_created); ?>

canEdit() && $reviewed) { ?>

elgg_get_site_url() . "action/comments/delete?annotation_id=" . $vars['annotation']->id, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'), )); ?>

"; echo "
"; echo "id . "\" onclick=\"javascript:mc_toggle_approve('" . $vars['annotation']->id . "');\">"; echo ""; echo elgg_echo('AU_anonymous_comments:comment_text'); echo "

"; echo "Approve"; echo "  |  "; echo "Delete"; echo "
"; echo "
"; } ?>