"Photo albums" Component
Control panel
⇒Components
⇒Photo albums
Description
The documentation is relevant for InstantCMS version 2.6.0 and newer. The component works in tandem with the «Photo albums» content type. It implements uploading and managing of photos. On the contrary, the «Photo albums» content type is responsible for categorization of photos. The component processes the uploaded photos, converts them to a specified number of presets, reads the EXIF data if there is one and if the EXIF extension is enabled in your PHP.
Settings
Options
Photo conversion presets
Select presets to convert the main photo to. It will be better if you create custom presets for this component.
Save original photos
If enabled, the engine will save original photos without processing them. Original photos will be shown in a fullscreen mode and in the «download» menu on the photo page.
Preset for a photo on the photo view page
The photo that is converted according to the preset parameters will be shown on the photo view page. Pay attention! The selected preset should be checked in the «Photo conversion presets» option.
Preset for photos in a list
Photos that are converted according to the specified preset parameters will be shown in a list. Pay attention! In the preset settings you are not expected to enter the width, but enter only the height. Moreover, don’t check «Square» in the Preset Settings. The selected preset should be checked in the «Photo conversion presets» option.
Preset for similar photos on the photo view page
Photos that are converted according to the specified preset parameters will be shown in a list of similar photos on the photo view page. The selected preset should be checked in the «Photo conversion presets» option. It makes sense to create a special preset with the dimensions smaller than those for the «Preset for photos in a list» preset, but the choice is yours.
Photo types
Custom photo types are entered in this field. The types are entered in the format:
numeric_index | name
for example:
1 | Photo 2 | Vectors 3 | Illustrations
You can choose not to use the types or enter any amount of custom ones. You can then sort the photos by these types in an album.
Sorting
Select the default sorting for photos in a list.
Number of entries in a list
The number of entries on one page in a list - in an album, on a user albums page, on a camera photo page.
Number of similar photos on a page
The number of photos in a slider on the photo view page.
Photo URL generation template
This field contains a template for generation of a photo view page URL. You can enter latin symbols, numbers, and a hyphen. In addition, there are special expressions for automatic generation:
- {id} - photo id;
- {title} - photo name;
- {album_id} - album id;
- {user_id} - photo owner id;
- {date_pub} - photo’s post date;
- {date_photo} - photo shooting date;
- {height} - height of maximum photo copy;
- {width} - width of maximum photo copy;
- {orientation} - photo orientation (displays square, landscape, portrait depending on a photo);
- {type} - the type that was specified in the «Photo types» option and was selected for an uploadable photo;
- {camera} - name of the camera that shot the photo (if it is reflected in the EXIF data).
For example, the template can be as follows:
{id}-{title}
Permissions
The permission list contains all system presets, as well as the «Original» preset that refers to photo originals. You can set the download permissions for each preset.
Back to Components