Ejemplo n.º 1
0
            $text = he_wall_format_text($text);
            $video_player = '<a href="javascript://" onclick="he_wall_show_player(this);" class="photo_cont video_thumb">' . '<span class="video_length">' . $upload_result['video_length'] . '</span>' . '<img class="recentaction_media" src="' . $upload_result['media_src'] . '"/></a>' . '<div class="video_cont display_none">' . $upload_result['player'] . '</div>';
            $video_info = '<div class="video_info"><a href="' . $upload_result['video_url'] . '" class="video_title">' . $upload_result['title'] . '</a><div class="video_desc">' . he_wall_format_text($upload_result['description']) . '</div></div>';
            $replace_arr = array($user->user_info['user_username'], $user->user_displayname, $text, $video_player, $video_info, he_wall::get_wall_link($wall_object, $wall_object_id));
            $actions->actions_add($user, 'wallpostvideo', $replace_arr, array(), 0, false, $action_object_owner, $wall_object_id, $action_privacy_level);
            he_wall::new_post_notify($wall_object, $wall_object_id, $new_action_id);
            $result = he_wall_actions_display($wall_object, $wall_object_id, $first_action_id);
            $result['result'] = 1;
        } else {
            $result = $upload_result;
        }
    }
} elseif ($task == 'paging') {
    $action_id = $_GET['action_id'];
    $count = $_GET['count'];
    $total_comments = he_wall::total_comments($action_id);
    $per_click = $setting['setting_he_wall_comments_per_page'];
    $per_click = $total_comments - $count - $per_click < 0 ? $total_comments - $count : $setting['setting_he_wall_comments_per_page'];
    $result_2 = he_wall::get_paging_comments($action_id, $total_comments - $count - $per_click, $per_click);
    $count = $result_2['count'];
    $action_comments = $result_2['action_comments'];
    ksort($action_comments);
    $smarty->assign('action_comments', $action_comments);
    $smarty->assign('action_id', $action_id);
    $result = array('action_id' => $action_id, 'count' => $count, 'html' => he_wall_include_footer_logic('he_wall_comments.tpl'));
}
// CONSTRUCT AND OUTPUT JSON
if (!$headers_sent) {
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");