first commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$items || !is_array($items) || !count($items))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$readonly && !$disabled && $lightbox)
|
||||
{
|
||||
JHtml::script('plg_system_nrframework/widgets/gallery/gallery.js', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
if ($load_stylesheet)
|
||||
{
|
||||
JHtml::stylesheet('plg_system_nrframework/widgets/gallery.css', ['relative' => true, 'version' => 'auto']);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="nrf-widget tf-gallery-wrapper<?php echo $css_class; ?>" data-id="<?php echo $id; ?>">
|
||||
<div class="gallery-items<?php echo $gallery_items_css; ?>">
|
||||
<?php
|
||||
foreach ($items as $index => $item)
|
||||
{
|
||||
// If its an invalid image path, show a warning and continue
|
||||
if (isset($item['invalid']) && $show_warnings)
|
||||
{
|
||||
echo '<div><strong>Warning:</strong> ' . sprintf(\JText::_('NR_INVALID_IMAGE_PATH'), $item['path']) . '</div>';
|
||||
continue;
|
||||
}
|
||||
|
||||
$item['index'] = $index;
|
||||
$displayData['item'] = $item;
|
||||
echo $this->sublayout('item', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if ($lightbox)
|
||||
{
|
||||
echo $this->sublayout('glightbox', $displayData);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
if (!$readonly && !$disabled)
|
||||
{
|
||||
JHtml::stylesheet('https://cdn.jsdelivr.net/npm/glightbox@3.1.0/dist/css/glightbox.min.css');
|
||||
JHtml::script('https://cdn.jsdelivr.net/gh/mcstudios/glightbox@3.1.0/dist/js/glightbox.min.js');
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Convert Forms
|
||||
* @version 3.2.12 Free
|
||||
*
|
||||
* @author Tassos Marinos <info@tassos.gr>
|
||||
* @link http://www.tassos.gr
|
||||
* @copyright Copyright © 2021 Tassos Marinos All Rights Reserved
|
||||
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
extract($displayData);
|
||||
|
||||
use NRFramework\Helpers\Widgets\Gallery as GalleryHelper;
|
||||
?>
|
||||
<figure class="item">
|
||||
<?php if ($lightbox) { ?>
|
||||
<a href="<?php echo $item['url']; ?>" class="tf-gallery-lightbox-item <?php echo $id; ?>" data-type="image" data-description=".glightbox-desc.<?php echo $id; ?>.desc-<?php echo $item['index']; ?>">
|
||||
<?php } ?>
|
||||
<img loading="lazy" class="<?php echo $thumb_class ?>" src="<?php echo $item['thumbnail_url']; ?>"<?php echo $item['img_atts']; ?> alt="<?php echo strip_tags($item['alt']); ?>" />
|
||||
<?php if ($lightbox) { ?>
|
||||
</a>
|
||||
<div class="glightbox-desc <?php echo $id . ' desc-' . $item['index']; ?>">
|
||||
<div class="caption"><?php echo nl2br($item['caption']); ?></div>
|
||||
<div class="module"><?php echo !empty($module) ? GalleryHelper::loadModule($module) : ''; ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</figure>
|
||||
Reference in New Issue
Block a user