Ejemplo n.º 1
0
<?php

use_helper('opCommunityEvent');
$data = op_api_community_event_comment($comment);
$data['deletable'] = $comment->isDeletable($memberId);
return array('status' => 'success', 'data' => $data);
Ejemplo n.º 2
0
<?php

use_helper('opCommunityEvent');
$data = array();
if (isset($events[0]['id'])) {
    foreach ($events as $event) {
        $_event = op_api_community_event_mini($event);
        $comments = $event->getCommunityEventComment();
        $_event['latest_comment'] = '';
        $_event['latest_comment_id'] = '';
        if (count($comments)) {
            $latest_comment = op_api_community_event_comment($comments->getLast());
            $_event['latest_comment'] = $latest_comment['body'];
            $_event['latest_comment_id'] = $latest_comment['id'];
        }
        $_event['is_event_member'] = $event->isEventMember($memberId);
        $data[] = $_event;
    }
}
return array('status' => 'success', 'data' => $data, 'data_count' => $count);
Ejemplo n.º 3
0
<?php

use_helper('opCommunityEvent');
$data = array();
if (isset($comments[0]['id'])) {
    foreach ($comments as $comment) {
        $_comment = op_api_community_event_comment($comment);
        $_comment['deletable'] = $comment->isDeletable($memberId);
        $images = $comment->getImages();
        if (count($images) > 0) {
            foreach ($images as $image) {
                $_comment['images'][] = op_api_event_image($image);
            }
        }
        $data[] = $_comment;
    }
    $data = array_reverse($data);
}
return array('status' => 'success', 'data' => $data, 'data_count' => $count);