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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user