├── language └── en-GB │ ├── en-GB.plg_fields_uikitgallery.sys.ini │ └── en-GB.plg_fields_uikitgallery.ini ├── README.md ├── tmpl └── uikitgallery.php ├── params └── uikitgallery.xml ├── uikitgallery.php └── uikitgallery.xml /language/en-GB/en-GB.plg_fields_uikitgallery.sys.ini: -------------------------------------------------------------------------------- 1 | PLG_FIELDS_UIKITGALLERY="Uikit Gallery" 2 | PLG_FIELDS_UIKITGALLERY_DESC="Uikit Gallery Custom Field for Joomla! with Lightbox" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Joomla! User Group Nuremberg Uikit Galleryfield 2 | 3 | Joomla! CustomField - Displays jpg-images from a folder within a gallery and lightbox 4 | 5 | This customField shows a folderlist dropdown and renders the images in frontend with a lightbox according to the following example: 6 | https://getuikit.com/v2/docs/lightbox.html 7 | 8 | You have to enable the lightbox.js in your uikit-template. 9 | Additionally you may insert the uk-grid uk-grid-width-medium-1-4 class into the container class of the field settings 10 | -------------------------------------------------------------------------------- /language/en-GB/en-GB.plg_fields_uikitgallery.ini: -------------------------------------------------------------------------------- 1 | PLG_FIELDS_UIKITGALLERY="Uikit Gallery" 2 | PLG_FIELDS_UIKITGALLERY_DESC="Uikit Gallery Custom Field for Joomla! with Lightbox" 3 | PLG_FIELDS_UIKITGALLERY_PARAMS_DIRECTORY_LABEL="Directory" 4 | PLG_FIELDS_UIKITGALLERY_PARAMS_DIRECTORY_DESC="Select your image directory" 5 | PLG_FIELDS_UIKITGALLERY_PARAMS_MULTIPLE_LABEL="Multiple" 6 | PLG_FIELDS_UIKITGALLERY_PARAMS_MULTIPLE_DESC="Choose if you want multiple selection" 7 | PLG_FIELDS_UIKITGALLERY_PARAMS_CONTAINER_CLASS_LABEL="Container class" 8 | PLG_FIELDS_UIKITGALLERY_PARAMS_CONTAINER_CLASS_DESC="Define container class for output" 9 | -------------------------------------------------------------------------------- /tmpl/uikitgallery.php: -------------------------------------------------------------------------------- 1 | value || $field->value == '-1') { 12 | return; 13 | } 14 | // get the folder name in images directory 15 | $path = $field->value; 16 | $class = $fieldParams->get('container_class'); 17 | 18 | // read the .jpg from the selected directory 19 | jimport('joomla.filesystem.folder'); 20 | $filter = '.\.jpg$'; 21 | $images = JFolder::files('images/' . $path); 22 | ?> 23 | 24 |
25 | 26 |
27 | $image), false); ?> 28 | 29 | '{group:\'my-group\'}', 'title' => $image)); ?> 30 |
31 | 32 |
33 | -------------------------------------------------------------------------------- /params/uikitgallery.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 | 29 | 30 | 37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /uikitgallery.php: -------------------------------------------------------------------------------- 1 | setAttribute('type', 'folderlist'); 42 | $fieldNode->setAttribute('directory', 'images'); 43 | $fieldNode->setAttribute('required', false); 44 | $fieldNode->setAttribute('hide_none', false); 45 | $fieldNode->setAttribute('hide_default', true); 46 | $fieldNode->setAttribute('recursive', true); 47 | $fieldNode->setAttribute('default', '/'); 48 | $fieldNode->setAttribute('label', 'PLG_FIELDS_UIKITGALLERY_PARAMS_DIRECTORY_LABEL'); 49 | $fieldNode->setAttribute('description', 'PLG_FIELDS_UIKITGALLERY_PARAMS_DIRECTORY_DESC'); 50 | 51 | 52 | 53 | return $fieldNode; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /uikitgallery.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | plg_fields_uikitgallery 4 | Barbara Aßmann 5 | June 2017 6 | Copyright (C) 2005 - 2017 webnet-assmann.de. All rights reserved. 7 | GNU General Public License version 2 or later; see LICENSE.txt 8 | info@webnet-assmann.de 9 | www.webnet-assmann.de 10 | 1.0 11 | PLG_FIELDS_UIKITGALLERY_DESC 12 | 13 | uikitgallery.php 14 | language 15 | params 16 | tmpl 17 | 18 | 19 | en-GB.plg_fields_uikitgallery.ini 20 | en-GB.plg_fields_uikitgallery.sys.ini 21 | 22 | 23 | 24 |
25 | 37 | 38 | 39 | 40 | 48 | 49 | 50 | 51 | 52 | 59 |
60 |
61 |
62 |
63 | --------------------------------------------------------------------------------