Module refers to the part of the CMS "Content" and can be installed optionally.
The module consists of two parts, and photo albums.
Module "Photogallery" can be attached to the various pages of the site. If the module is attached to a few pages in the administrative part of the module there is a special filter "Site section" with the possibility of filtering the output (photographs list, categories and settings) as belonging to the page.
The display order of the photos can be changed by using the mouse, simply by dragging them. If connected photo albums, it can only sort photos within the album (in the filter "Album" select an album).
Photos have the following characteristics.
Albums photos can have an unlimited number of nested albums. If desired albums can be omitted. To do this, disable the "Use albums" in the module settings.
When you delete an album removes all sub-albums and photos.
Albums have the following characteristics.
Для работы с модулем «Photogallery» служат следующие шаблонные теги:
show_block – выводит несколько фотографий.
Атрибуты:
— count – number of displayed photos (by default 3);
— site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the photos from the indicated section will be excluded. By default all pages are selected;
— cat_id – альбомы фотографий, если в настройках модуля отмечено «Использовать альбомы». Идентификаторы альбомов перечисляются через запятую. You can indicate negative value, then the photos from the indicated albums will be excluded. You can indicate current value, then the photos from the current (opened) album or all albums, if neither of them is opened, will be shown. By default the album is not taken into account, all photos are shown.;
— sort – sorting photos: by default as on the module page, date – by date, rand – randomly;
— images_variation – image size tag, set in module settings;
— only_module – show the block only on the page to which "Photogallery" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;
— tag – tag attached to the photos;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/photo/views/photo.view.show_block_template.php; default - file modules/photo/views/photo.view.show_block.php).
Example:
<insert name="show_block" module="photo">
выведет 3 последние фотографии из фотогалереи
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
show_block_rel – shows similar photos on the page of the photo. By default the connection between photos are one-sided, this can be changed by checking the option "Link back to parent in the block of similar photos" in module settings.
Атрибуты:
— count – number of displayed photos (by default 3);
— images_variation – image size tag, set in module settings;
— defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;
— defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;
— template – tag template (file modules/photo/views/photo.view.show_block_rel_template.php; default - file modules/photo/views/photo.view.show_block_rel.php).
Example:
<insert name="show_block_rel" module="photo">
выведет 3 фотографии, прикрепленные к текущей фотографии
В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"]
.
{photo} – Photos
{photo_category} – Альбомы фотографий
{photo_category_parents} – Parents relations of альбомов фотографий
{photo_category_rel} – Связи фотографий с альбомами
{photo_counter} – View counter of photos
{photo_rel} – Связи похожих фотографий
The module is located in the folder modules/photo and arranged classically.
modules/photo/admin/js/photo.admin.js – Редактирование фотографий, JS-сценарий;
modules/photo/admin/photo.admin.php – Редактирование фотографий;
modules/photo/admin/photo.admin.category.php – Editing photos categories;
modules/photo/admin/photo.admin.config.php – Module settings;
modules/photo/admin/photo.admin.counter.php – Viewings statistics;
modules/photo/admin/photo.admin.menu.php – Map of links for "Menu on the website" module;
modules/photo/js/photo.id.js – JS-сценарий модуля;
modules/photo/photo.php – Controller;
modules/photo/photo.install.php – Module installation;
modules/photo/photo.model.php – Model;
modules/photo/photo.search.php – Settings for search indexing for "Search" module;
modules/photo/photo.sitemap.php – Map of links for "Site map" module;
modules/photo/views/photo.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";
modules/photo/views/photo.view.id.php – Template of photos page;
modules/photo/views/photo.view.list.php – Template of photos list;
modules/photo/views/photo.view.list_tags.php – Template of images list for module "Tags";
modules/photo/views/photo.view.rows.php – Шаблон элементов в списке фотографий;
modules/photo/views/photo.view.rows_block.php – Шаблон блока фотографий;
modules/photo/views/photo.view.rows_block_rel.php – Шаблон блока похожих фотографий;
modules/photo/views/photo.view.rows_tags.php – Шаблон элементов в списке фотографий для модуля «Теги»;
modules/photo/views/photo.view.show_block.php – Template of photos block;
modules/photo/views/photo.view.show_block_rel.php – Template of similar images block.