Enh: Added mp4/ogg blueimp support in post gallery

This commit is contained in:
buddh4 2017-03-16 17:29:40 +01:00
parent 3ad27444f3
commit 2512807c45
2 changed files with 12 additions and 4 deletions

View File

@ -4,7 +4,8 @@ HumHub Change Log
1.2.0-beta.3 under developement
--------------------------------
- Enh: Added global (default) notification space settings.
- Enh: Added mp4/ogg blueimp support in post gallery
- Enh: Added global (default) notification space settings
- Enh: #2359 Use Jplayer playlist feature for post mp3
- Enh: added js module 'ui.view' for view state and utils - Changed 'ui.state.getState' to 'ui.view.getState'
- Enh: added view helper as getHeight/Width and isSmall/Medium/Normal (width) to 'ui.view' js module

View File

@ -13,17 +13,24 @@ $object = $this->context->object;
<div class="post-files" id="post-files-<?php echo $object->getUniqueId(); ?>">
<?php foreach ($files as $file): ?>
<?php if ($previewImage->applyFile($file)): ?>
<a data-ui-gallery="<?= "gallery-" . $object->getUniqueId(); ?>" href="<?= $file->getUrl(); ?>#.jpeg">
<a data-ui-gallery="<?= "gallery-" . $object->getUniqueId(); ?>" href="<?= $file->getUrl(); ?>#.jpeg" title="<?= $file->file_name ?>">
<?= $previewImage->render(); ?>
</a>
<?php elseif(FileHelper::getExtension($file->file_name) == 'mp4'): ?>
<a data-ui-gallery="<?= "gallery-" . $object->getUniqueId(); ?>" type="video/mp4" href="<?= $file->getUrl(); ?>#.mp4" title="<?= $file->file_name ?>">
<video src="<?= $file->getUrl() ?>" height="130" />
</a>
<?php elseif(FileHelper::getExtension($file->file_name) == 'ogv'): ?>
<a data-ui-gallery="<?= "gallery-" . $object->getUniqueId(); ?>" type="video/ogg" href="<?= $file->getUrl(); ?>#.ogv" title="<?= $file->file_name ?>">
<video src="<?= $file->getUrl() ?>" height="130" />
</a>
<?php endif; ?>
<?php endforeach; ?>
<?php $playlist = [] ?>
<?php foreach ($files as $file): ?>
<?php $fileExtension = FileHelper::getExtension($file->file_name); ?>
<?php if ($fileExtension == "mp3") : ?>
<?php if (FileHelper::getExtension($file->file_name) == "mp3") : ?>
<?php $playlist[] = $file ?>
<?php endif; ?>
<?php endforeach; ?>