Версія: 1.09

Автор: mganko

Дата: 2023.03.20

Категорія: Photos&Images

Сторінка на: GetSimple CMS

Сторінка на: GitHub

Сторінка на: Support Forum


Завантажити...

Плагін EXTRA GALLERY


Опис:


Extra Gallery is a backend plugin for creating galleries, with advanced features like: custom fields, thumbnails cropping, multi language content, easy image browsing. It can be installed in GS more than once (multi instances) to use it with different settings on each copy. Created galleries are available as structured PHP arrays to use in theme.

Інсталяція:


  1. Unpack zip archive to your plugins folder
  2. Enable the plugin in GS Admin

Configuration description:

Gallery title - if not disabled it will be displayed on gallery list.

Gallery name - unique name of gallery.

Languages - provide languages key names to turn on multilanguage edition of gallery title and custom fields.

Additional info - use it to show some important informations for users when in gallery edition.

Fields - you can define custom fields for gallery items. Available field types: text, textarea, select, checkbox, WYSIWYG editor.
Every field can be set as required and have its own label displayed next to it.

Thumbnails - up to 2 thumbnails can be enabled. User can create thumbnail by cropping image selected image.
Every thumbnail can be set as required, and have its own label. There is also possibility to set its width and height, both of it or any of them.
Thumbnail can be set to be automatically cropped when image is added to gallery.

How Extra Gallery data is stored:

All data is stored in ExtraGallery directory in GS data dir.
Subfolders description:

  • admin-thumbs - cache for preview thumbnails displayed in gallery and in image browser used to add gallery images. When source image is deleted via GS file tab also its thumbnail is deleted.
  • galleries - xml files with galleries.
  • settings - xml files with gallery settings
  • thumbs - all thumbnails created by cropping image via plugin interface. Unused thumbnail files are automatically deleted when gallery is saved or deleted.

Plugin multi instancing:

If you wish to have more than one Extra Gallery tab, follow these instructions:

  • Duplicate main Extra Gallery file (ExtraGallery.php) and name it like this: ExtraGallery-1.php where "1" is a number of instance. Use only numbers greater than 0 as instance numbers.
  • Activate new plugin in GS plugin tab.
  • New link to new plugin instance configuration should apear.

Accessing galleries in your theme:

To return gallery array use function call:

eg_return_gallery($name = null, $language = null, $instanceNum = 0)

Parameters: 

  • $name - gallery name to return, or null value to return all galleries in associative array.
  • $language - language key as definied in plugin configuration, if not provided it will return first defined labguage.
  • $instanceNum - plugin instance number, if not provided it will be first instance.

Returned array is self-explanatory:

array(3) { ["name"]=> string(7) "galeria" ["title"]=> string(4) "Test" ["items"]=> array(1) { [0]=> array(10) { ["filename"]=> string(27) "uploads/galeria-foty/01.jpg" ["width"]=> int(1050) ["height"]=> int(740) ["thumb-0"]=> array(3) { ["filename"]=> string(52) "ExtraGallery/thumbs/galeria-foty/01-fill-200-300.jpg" ["width"]=> int(200) ["height"]=> int(300) } ["thumb-1"]=> array(3) { ["filename"]=> string(0) "ExtraGallery/thumbs/galeria-foty/01-10-0-200-300-200-300.jpg" ["width"]=> int(100) ["height"]=> int(150) } ["field-0"]=> string(10) "Test text" ["field-1"]=> string(4) "text" ["field-2"]=> bool(true) ["field-3"]=> string(0) "" ["field-4"]=> string(0) "" } } }

Ми використовуємо cookie для найкращого відображення нашого сайту. Якщо Ви продовжите перегляд сайту, ми вважатимемо, що Вас це влаштовує. Ви можете переглядати сайт без використання cookie з частковою втратою функціональності в приватному режимі вашого браузера. Якщо Ви повністю відмовляєтеся використовувати cookie, Ви повинні залишити сайт.  Прийняти