public static function createAssets($list, $list_name) { foreach ($list as $entry) { $is_ready = $entry->getStatus() == entryStatus::READY; $data = $entry->getDataPath(); // this should not happen ! $duration = $entry->getLengthInMsecs(); if ($duration == NULL || $duration <= 0) { $duration = 10.0; } else { $duration = $duration / 1000; } $source_link = ''; $credit = $entry->getCredit(); if ($credit == null) { $credit = ''; } else { $source_link = $entry->getSourceLink(); if ($source_link == null) { $source_link = ''; } } echo "\t" . baseObjectUtils::objToXml($entry, array('id', 'name', 'media_type', 'kshow_id'), 'asset', true, array('url' => $data, 'ready' => $is_ready, 'thumbnail_path' => $entry->getThumbnailPath(), 'credit' => $credit, 'source_link' => $source_link, 'duration' => $duration, 'list_type' => $list_name, 'contributor_screen_name' => $entry->getKuser()->getScreenName())); } }
<?php // create xml for each entry is entry_list if ($debug) { echo "Result<br><textarea cols=100 rows=50>"; } ?> <assets> <?php foreach ($entry_list as $entry) { $is_ready = $entry->getStatus() == entryStatus::READY; $data = $entry->getDataPath(); echo "\t" . baseObjectUtils::objToXml($entry, array('id', 'name', 'type' => 'media_type'), 'asset', true, array('url' => $data, 'ready' => $is_ready, 'thumbnail_path' => $entry->getThumbnailPath())); } ?> </assets> <?php if ($debug) { echo "</textarea>"; }
<?php if (!$kuser) { die; } $user_name = $kuser->getScreenName(); $show_klogo = 1; if ($entry) { $user_name = $entry->getSubpId() == 10003 ? "Facelift" : $kuser->getScreenName(); $show_klogo = $widget_type == 3 && $entry->getPartnerId() == 18 ? 0 : 1; // dont show the kaltura logo while playing on wikieducator } ?> <xml> <?php echo baseObjectUtils::objToXml($entry, array('id', 'name', 'kshow_id', 'tags', 'media_type', 'length_in_msecs', 'status'), 'entry', true, array("thumbnail_path" => $thumbnail, "user_name" => $user_name, "message" => $message, "server_time" => time(), "kshow_category" => $kshow_category, "kshow_name" => $kshow_name, "kshow_description" => $kshow_description, "kshow_tags" => $kshow_tags, "generic_embed_code" => $generic_embed_code, "myspace_embed_code" => $myspace_embed_code, "share_url" => $share_url, "show_klogo" => $show_klogo)); ?> </xml>
<?php // create xml for each entry is entry_list if ($debug) { echo "Result<br><textarea cols=100 rows=50>"; } ?> <xml> <?php echo baseObjectUtils::objToXml($kshow, array('id', 'name', "show_entry_id"), 'kshow', true, array("entry_name" => $entry->getName(), "thumbnail_path" => $thumbnail, "can_publish" => $can_publish)); ?> <?php echo baseObjectUtils::objToXml($producer, array('id', 'screen_name'), 'producer', true); ?> <?php echo baseObjectUtils::objToXml($editor, array('id', 'screen_name'), 'editor', true); ?> <?php echo "<versions>"; foreach ($show_versions as $version_info) { echo "<version_info version=\"" . $version_info[3] . "\" date=\"" . strftime("%d/%m/%y %H:%M:%S", $version_info[2]) . "\"/>\n"; } echo "</versions>"; ?> </xml> <?php if ($debug) { echo "</textarea>"; }