├── 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 |