diff --git a/e107_admin/image.php b/e107_admin/image.php index cb9e9b907..fcfa01c42 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -2386,14 +2386,20 @@ class media_admin_ui extends e_admin_ui if(!empty($data)) { $tp = e107::getParser(); + + foreach($data['items'] as $value) { $id = $value['id']['videoId']; $thumbnail = $value['snippet']['thumbnails']['medium']['url']; + + $items[] = array( - 'previewHtml' => $bbcode ? null : $tp->toVideo($id. '.' .$extension, array('w' =>210, 'h' =>140)), + // 'previewHtml' => $bbcode !== 'video' ? null : $tp->toVideo($id. '.' .$extension, array('w' =>210, 'h' =>140)), + 'previewHtml' => $tp->toVideo($id. '.' .$extension, array('w' =>210, 'h' =>140)), + 'previewUrl' => $thumbnail, 'saveValue' => $id. '.' .$extension, // youtube", 'thumbUrl' => $thumbnail,