https://github.com/markocupic/gallery-creator-bundle
Manage and display photo galleries. Plugin for Contao CMS.
https://github.com/markocupic/gallery-creator-bundle
contao galleries photos
Last synced: 5 months ago
JSON representation
Manage and display photo galleries. Plugin for Contao CMS.
- Host: GitHub
- URL: https://github.com/markocupic/gallery-creator-bundle
- Owner: markocupic
- License: gpl-3.0
- Created: 2016-12-24T10:07:06.000Z (over 8 years ago)
- Default Branch: 3.x
- Last Pushed: 2024-11-03T20:15:08.000Z (6 months ago)
- Last Synced: 2024-12-03T22:15:41.760Z (5 months ago)
- Topics: contao, galleries, photos
- Language: PHP
- Homepage:
- Size: 21.9 MB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Gallery Creator Bundle
## Frontend and backend extension for [Contao CMS](https://www.contao.org)
This extension can be used to create, display and manage photo albums in your [Contao](https://www.contao.org) installation.
The Gallery Creator Bundle offers an album listing and an album detail view.
Since version 2.0.0 [markdown](https://www.markdownguide.org/) can be used to
create the album description.https://user-images.githubusercontent.com/1525166/154361326-cc4dc4c0-60c5-41e3-a0dc-a41fcd3d242e.mp4
## Installation
Please use the Contao Manager or run `composer require markocupic/gallery-creator-bundle`
in your CLI to install the extension.## CHMOD
Go to the **Contao Backend Settings** and select a default **album owner**, a **default album owner group** and set the default **access rights****Important**: If you keep the "album owner" field empty, the currently logged in backend user automatically becomes the album owner
when creating a new album.
## Lightbox
As a lightbox we strongly recommend [Glightbox](https://biati-digital.github.io/glightbox/).
Simply run the `composer require inspiredminds/contao-glightbox` command in your CLI.
Please ensure, that you have activated the lightbox template
in the layout settings of your theme in the Contao backend.## CSS
Gallery Creator will add the `.gc-listing-view` and/or the `.gc-detail-view` to the
body tag. This will help you display or hide items you don't want to show in both modes (listing- & detail-view).```
/** SASS
* Do not display ce elements headline in detail mode
*
*/
body.gc-detail-view {
.ce_gallery_creator {
h2:not([class^="gc-album-detail-name"]) {
display: none;
}
}
}
```## Configuration
This gallery extension is shipped with a default configuration.
If you want to override these settings, you
can do this in your common configuration file located in `config/config.yml`.```yaml
# config/config.yml
# Gallery Creator (default settings)
markocupic_gallery_creator:
upload_path: 'files/gallery_creator_albums'
copy_images_on_import: true
read_exif_meta_data: false
valid_extensions: ['jpg', 'jpeg', 'gif', 'png', 'webp', 'svg', 'svgz']# Contao configuration
contao:
url_suffix: ''
#....
```## "galleryCreatorGenerateFrontendTemplate" - Hook
Use the "galleryCreatorGenerateFrontendTemplate" hook to adapt the frontend output.The "galleryCreatorGenerateFrontendTemplate" hook is triggered before the gallery creator
front end template is parsed.
It passes the content element object, the template object and the album object of
the active album (if there is one).
The "galleryCreatorGenerateFrontendTemplate" hook expects no return value.```php
set('foo', 'bar');
}
}```
## "galleryCreatorImagePostInsert" - Hook
Use the "galleryCreatorImagePostInsert" hook to adapt the picture entity
when uploading new images to an album.The "galleryCreatorImagePostInsert" is executed right after an image
has been uploaded and has been written to the database.
It passes the pictures model and expects no return value.```php
security = $security;
}public function __invoke(GalleryCreatorPicturesModel $picturesModel): void
{
$user = $this->security->getUser();// Automatically add a caption to the uploaded image
if ($user instanceof BackendUser && $user->name) {
$picturesModel->caption = 'Holidays '.date('Y').', Photo: '.$user->name;
$picturesModel->save();
}
}
}
```Have fun!