acf
This commit is contained in:
		| @ -0,0 +1,87 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            https://www.tassos.gr | ||||
|  * @copyright       Copyright © 2024 Tassos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die('Restricted access'); | ||||
|  | ||||
| use Joomla\CMS\HTML\HTMLHelper; | ||||
| use Joomla\CMS\Language\Text; | ||||
| use Joomla\CMS\Factory; | ||||
|  | ||||
| extract($displayData); | ||||
|  | ||||
| if (!$items || !is_array($items) || !count($items)) | ||||
| { | ||||
| 	return; | ||||
| } | ||||
|  | ||||
| if (!$readonly && !$disabled) | ||||
| { | ||||
|     HTMLHelper::script('plg_system_nrframework/widgets/gallery/gallery.js', ['relative' => true, 'version' => 'auto']); | ||||
| } | ||||
|  | ||||
| if ($load_stylesheet) | ||||
| { | ||||
| 	HTMLHelper::stylesheet('plg_system_nrframework/widgets/gallery.css', ['relative' => true, 'version' => 'auto']); | ||||
| } | ||||
|  | ||||
| if ($style === 'justified') | ||||
| { | ||||
|     HTMLHelper::script('plg_system_nrframework/vendor/justified.layout.min.js', ['relative' => true, 'version' => 'auto']); | ||||
|     HTMLHelper::script('plg_system_nrframework/widgets/gallery/justified.js', ['relative' => true, 'version' => 'auto']); | ||||
| } | ||||
|  | ||||
| if ($load_css_vars && !empty($custom_css)) | ||||
| { | ||||
| 	Factory::getDocument()->addStyleDeclaration($custom_css); | ||||
| } | ||||
|  | ||||
| // Add global CSS vars | ||||
| $global_css = '.nrf-widget.tf-gallery-wrapper.' . $id . ' { | ||||
|     --mobile-tags-default-style: ' . ($tags_mobile === 'show' ? 'flex' : 'none') . '; | ||||
|     --mobile-tags-dropdown-style: ' . ($tags_mobile === 'dropdown' ? 'flex' : 'none') . '; | ||||
| }'; | ||||
| Factory::getDocument()->addStyleDeclaration($global_css); | ||||
| ?> | ||||
| <div class="nrf-widget tf-gallery-wrapper<?php echo $css_class; ?>" <?php echo $atts; ?>> | ||||
|     <?php if ($tags_position === 'above'): ?> | ||||
|         <?php echo $this->sublayout('tags', $displayData); ?> | ||||
|     <?php endif; ?> | ||||
|      | ||||
|     <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(Text::_('NR_INVALID_IMAGE_PATH'), $item['path']) . '</div>'; | ||||
|                     continue; | ||||
|                 } | ||||
|  | ||||
|                 $item['index'] = $index; | ||||
|                 $displayData['item'] = $item; | ||||
|                 echo $this->sublayout('item', $displayData); | ||||
|             } | ||||
|         ?> | ||||
|     </div> | ||||
|  | ||||
|     <?php if ($tags_position === 'below'): ?> | ||||
|         <?php echo $this->sublayout('tags', $displayData); ?> | ||||
|     <?php endif; ?> | ||||
|  | ||||
|     <?php  | ||||
|         if ($lightbox) | ||||
|         { | ||||
|             echo $this->sublayout('glightbox', $displayData); | ||||
|         } | ||||
|     ?> | ||||
| </div> | ||||
| @ -0,0 +1,23 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            https://www.tassos.gr | ||||
|  * @copyright       Copyright © 2024 Tassos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die('Restricted access'); | ||||
|  | ||||
| use Joomla\CMS\HTML\HTMLHelper; | ||||
|  | ||||
| extract($displayData); | ||||
|  | ||||
| if (!$readonly && !$disabled) | ||||
| { | ||||
|     HTMLHelper::stylesheet('plg_system_nrframework/vendor/glightbox.min.css', ['relative' => true, 'version' => 'auto']); | ||||
|     HTMLHelper::script('plg_system_nrframework/vendor/glightbox.min.js', ['relative' => true, 'version' => 'auto']); | ||||
| } | ||||
| @ -0,0 +1,34 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            https://www.tassos.gr | ||||
|  * @copyright       Copyright © 2024 Tassos 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 echo $tags_position !== 'disabled' && isset($item['tags']) && is_array($item['tags']) && count($item['tags']) ? ' data-tags="' . htmlentities(json_encode($item['tags']), ENT_COMPAT, 'UTF-8') . '"' : ''; ?> | ||||
| > | ||||
|     <?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<?php echo $style === 'justified' ? '' : ' 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> | ||||
| @ -0,0 +1,51 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * @package         Advanced Custom Fields | ||||
|  * @version         2.8.8 Pro | ||||
|  *  | ||||
|  * @author          Tassos Marinos <info@tassos.gr> | ||||
|  * @link            https://www.tassos.gr | ||||
|  * @copyright       Copyright © 2024 Tassos All Rights Reserved | ||||
|  * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later | ||||
| */ | ||||
|  | ||||
| defined('_JEXEC') or die('Restricted access'); | ||||
|  | ||||
| use Joomla\CMS\Language\Text; | ||||
|  | ||||
| extract($displayData); | ||||
|  | ||||
| if (!$tags) | ||||
| { | ||||
|     return; | ||||
| } | ||||
| ?> | ||||
| <div class="tf-gallery-tags position-<?php echo $tags_position; ?>"> | ||||
|     <?php if ($all_tags_item_label): ?> | ||||
|         <a href="#" class="tf-gallery-tags--item active" data-tag="*"> | ||||
|             <?php echo $all_tags_item_label; ?> | ||||
|         </a> | ||||
|     <?php endif; ?> | ||||
|     <?php foreach ($tags as $tag): ?> | ||||
|         <a href="#" class="tf-gallery-tags--item" data-tag="<?php echo $tag; ?>"> | ||||
|             <?php echo $tag; ?> | ||||
|         </a> | ||||
|     <?php endforeach; ?> | ||||
| </div> | ||||
|  | ||||
| <?php if ($tags_mobile === 'dropdown'): ?> | ||||
| <select class="tf-gallery-tags tf-gallery-tags-dropdown position-<?php echo $tags_position; ?>"> | ||||
|     <option value="" disabled><?php echo Text::_('NR_FILTER_BY_TAG'); ?></option> | ||||
|     <?php if ($all_tags_item_label): ?> | ||||
|         <option class="tf-gallery-tags--item active" value="*"> | ||||
|             <?php echo $all_tags_item_label; ?> | ||||
|         </option> | ||||
|     <?php endif; ?> | ||||
|     <?php foreach ($tags as $tag): ?> | ||||
|         <option class="tf-gallery-tags--item" value="<?php echo $tag; ?>"> | ||||
|             <?php echo $tag; ?> | ||||
|         </option> | ||||
|     <?php endforeach; ?> | ||||
| </select> | ||||
| <?php endif; ?> | ||||
		Reference in New Issue
	
	Block a user