Пример #1
0
 * https://github.com/iionly
 *
 * Original developer of the iZAP Videos plugin:
 * @package Elgg videotizer, by iZAP Web Solutions
 * @license GNU Public License version 2
 * @Contact iZAP Team "<*****@*****.**>"
 * @Founder Tarun Jangra "<*****@*****.**>"
 * @link http://www.izap.in/
 *
 */
elgg_require_js('izap_videos/queue_status');
// get action for queue
$action = get_input('action');
switch ($action) {
    case 'reset':
        izapResetQueue_izap_videos();
        forward(elgg_get_site_url() . '/admin/administer_utilities/izap_videos?tab=queue_status');
        break;
    case 'delete':
        izapEmptyQueue_izap_videos();
        forward(elgg_get_site_url() . '/admin/administer_utilities/izap_videos?tab=queue_status');
        break;
    default:
        break;
}
?>

<div id="videoQueue" align="center">
	<img src="<?php 
echo elgg_get_simplecache_url('izap_videos/queue.gif');
?>
Пример #2
0
/**
 * Clears queue and resets it
 *
 * @return boolean
 */
function izapEmptyQueue_izap_videos()
{
    $pending_videos = izapGetNotConvertedVideos_izap_videos();
    if ($pending_videos) {
        foreach ($pending_videos as $video) {
            $video->delete();
        }
    }
    return izapResetQueue_izap_videos();
}