/* YouTube/vimeo/metacafe video Object file /* @copyright Prateek.Choudhary /*****************************************************************************************/ $video_file = $vars['entity']; if(!empty($video_file)) { $url = $video_file->url; $title = $video_file->title; $video_guid = $video_file->guid; $video_id = $video_file->video_id; $videotype = $video_file->videotype; $videothumbnail = $video_file->thumbnail; $owner = $vars['entity']->getOwnerEntity(); $friendlytime = friendly_time($vars['entity']->time_created); $mime = "image/html"; $thumbnail = $videothumbnail; $watch_URL = $vars['url']."videolist/watch/".$video_guid; $object_acl = get_readable_access_level($video_file->access_id); // metadata block, - access level, edit, delete, + options view extender $info = "
" . $object_acl . ""; // view for plugins to extend $info .= elgg_view('videolist/options', array('entity' => $video_file)); // include edit and delete options if ($owner->canEdit()) { $info .= "" . elgg_echo('edit') . ""; $info .= "" . elgg_view('output/confirmlink',array('href' => $vars['url'] . "action/videolist/delete?video=" . $video_guid, 'text' => elgg_echo("delete"),'confirm' => elgg_echo("videolist:delete:confirm"),)). ""; } $info .= "
"; if(get_input('show_viewtype') == "all") { $info .= '

'.$title.'

'; $info .= "

username}\">{$owner->name} {$friendlytime}"; $info .= "

"; $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; echo "
".elgg_view_listing($icon, $info)."
"; } else { $info .= '

'.$title.'

'; $info .= "

username}\">{$owner->name} {$friendlytime}"; $info .= "

"; $icon = "" . elgg_view("videolist/icon", array("mimetype" => $mime, 'thumbnail' => $thumbnail, 'video_guid' => $video_guid, 'size' => 'small')) . ""; echo "
".elgg_view_listing($icon, $info)."
"; } } else { echo "

".elgg_echo('videolist:none:found')."

"; }