1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Fix for customfields Youtube video preview not displaying after selection.

This commit is contained in:
Cameron
2021-09-29 10:43:52 -07:00
parent 8167f5eb6e
commit 567b5022f2

View File

@@ -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,