function modcomments_moderation_callback(&$pModeration) { global $gBitUser, $gBitSystem; if ($pModeration['type'] == 'comment_post') { $comment = new LibertyComment(NULL, $pModeration['content_id']); $comment->load(); if ($pModeration['status'] == MODERATION_APPROVED) { // change its status $comment->storeStatus(50); // delete the ticket $pModeration['status'] = MODERATION_DELETE; } else { if ($pModeration['status'] == MODERATION_REJECTED) { // change its status to soft delete $comment->storeStatus(-999); // delete the ticket $pModeration['status'] = MODERATION_DELETE; } } } return TRUE; }