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

Issue #4049 - Media-Manager Url fix. Fixed Media Preview.

Admin-ui: type='media' example added to blank plugin.
This commit is contained in:
Cameron
2020-02-21 14:20:33 -08:00
parent 3d47a39f7f
commit 79c5b3e694
6 changed files with 79 additions and 52 deletions

View File

@@ -5316,6 +5316,13 @@ var_dump($select_options);*/
case 'media':
if(!empty($value) && $attributes['data'] === 'json')
{
$tmp = e107::unserialize($value);
$value = !empty($tmp[0]['path']) ? $tmp[0]['path'] : null; // display first item.
}
return e107::getMedia()->previewTag($value, $parms);
break;
@@ -6006,6 +6013,11 @@ var_dump($select_options);*/
$max = varset($parms['max'],1);
if(!empty($value) && $attributes['data'] === 'json')
{
$value = e107::unserialize($value);
}
$ret = "<div class='mediaselector-multi field-element-media'>";
for ($i=0; $i < $max; $i++)
{