Giter Site home page Giter Site logo

leuchtfeuer / typo3-image-gallery Goto Github PK

View Code? Open in Web Editor NEW
5.0 9.0 6.0 478 KB

Simple image gallery for TYPO3 using file collections.

Home Page: https://www.Leuchtfeuer.com

License: GNU General Public License v2.0

PHP 76.85% HTML 20.84% Shell 2.30%
gallery typo3 extension plugin image-gallery simple images

typo3-image-gallery's Introduction

Simple Image Gallery for TYPO3

Latest Stable Version Build Status Total Downloads Latest Unstable Version Code Climate Code Coverage License

This extension creates galleries from images and Youtube videos organized within TYPO3's 'File collection' records. The full documentation for the latest releases can be found here.

Features

  • List, detail and single view for File Collections
  • Sorting, Limit of files
  • Extends TYPO3 'File Collections' by RTE field 'Gallery Description'
  • TYPO3 9 or later: Route Enhancer example for speaking URLs, see
    the example route enhancer

For editors

The 'Simple Image Gallery' Plugin provides various options to cover different scenarios.

Quick & easy

The easiest way to get an front end output of your gallery is to follow these steps (default scenario):

  1. Create one or more file collection records in a folder inside your page tree and include your files. Each file collection represents a gallery.

  2. Add a 'Simple Image Gallery' Plugin on the page where you want to show your gallery. Backend view of bm_image_gallery plugin

  3. You have to select the plugin type that fits your needs. Select the proper EXT:bm_image_gallery plugin

  4. Add references to your file collections in the 'File Collection' section. Backend view of EXT:bm_image_gallery plugin for a gallery list

  5. (Optional) The Plugin Options provide a second tab named 'Gallery'. Here you can limit the number of shown images the gallery. There are also options to sort images. 'Default' will take the order from the file collection. Backend view of EXT:bm_image_gallery plugin for limiting number of images and sorting

Possible scenarios

There are the following scenarios to display galleries:

Scenario 1: A list of galleries with gallery view on the same page as the plugin (default).

For that choose the "Image Gallery: Gallery List" plugin and select "Same Page" as "Detail View" option.


Scenario 2: A list of galleries with gallery view on another page as the plugin.

For that choose the "Image Gallery: Gallery List" plugin and select "Selected Page" as "Detail View" option. After an automatic reload, you will find an additional configuration option "Gallery Page" at the bottom of the screen. Please add a reference to the target detail page here. Save the plugin and navigate to the page just selected. Create a new plugin of type "Image Gallery: Elements of Gallery". Now you are all set.

This scenario is recommended for multiple plugins on the same page.


Scenario 3: A list of galleries without gallery view.

For that choose the "Image Gallery: Gallery List" plugin and select "No Detail View" as "Detail View" option.


Scenario 4: A gallery view for a single gallery.

For that choose the "Image Gallery: Selected Gallery" plugin.

typo3-image-gallery's People

Contributors

bmafeldt avatar bmgrieger avatar elbebass avatar flossels avatar mabolek avatar mfabse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typo3-image-gallery's Issues

Add a date and location field for sys_file_collection

Is your feature request related to a problem? Please describe.
It would make the extension perfect for showing event images, if each gallery would also have a date(time) and location field.
It would make the galleries sortable by these fields.

Describe the solution you'd like
Add the fields to the file collection

Describe alternatives you've considered
Putting stuff into the description field causes data to be less structured, allowing less flexible output rendering in Fluid.

Desription of the filecollection not available

Describe the bug
Desription of the filecollection not available in the frontent view. "Title" is there but not the value of the RTE-Field Description.

==================================================
<f:debug>{items}</f:debug>

array(2 items)
0 => Leuchtfeuer\BmImageGallery\Domain\Transfer\CollectionInfoprototypeobject
identifier => protected7 (integer)
title => protected'Kunst im Steinbruch' (19 chars)
description => protected'' (0 chars)
itemCount => protected19 (integer)
preview => protectedTYPO3\CMS\Core\Resource\Fileprototypeobject
richTextDescription => protected'' (0 chars)

============================================================

Screenshot_20210305_110619

shows only one image

I installed the extension in TYPO3 9.5.9, in list mode it only shows one image. I tried it in 2 different installations. I also checked the generated HTML Code.

Empty file collection description

Describe the bug
Today I upgraded from from version 4.2.1 to 5.0.0. My TYPO3 instance is on 10.4.14. The file collection attribute 'description' is empty although field 'bm_image_gallery_description' was set in the backend.

To Reproduce
Debugging shows that in class Domain/Transfer/CollectionInfo.php method returns an empty string. The root cause is the wrong use of the null coalescing operator (??). With an empty string condition it returns an empty string, too. Using a ternary operator (?:) solves the problem.

Additional context
The following test code behaves the same in PHP 7 and 8: $x3 gets an empty string because isset()evaluates to true for an empty string.
$x1 = "";
print "x1: '".$x1."'\n";
$x2 = isset($x1);
print "x2: '".$x2."'\n";
$x3 = ($x1) ?? "some text";
print "x3: '".$x3."'\n";
$x4 = ($x1) ? $x1 : "some text";
print "x4: '".$x4."'\n";

Translations with bm_image_gallery 4.1.0 in TYPO3 9.5.13

Hello,

I'm using the bm_image_gallery 4.1.0 in TYPO3 9.5.13 with english as default language and try to using german translations.

The configuration I'm using:
I'm using the gallery with a list and detail view.
On the list view are two file collections linked.
Both pages are translated into german including the content elements and the file collections.

The problem:
In the german translation the link is translated and is linking to the right german url.
But the file collections are not translated and still shwoing the english default title and descripton of the file collection on the details page and the list page.

When I'm linking the german translated file collections in the translated list plugin, the german translations are show up right on the list page (Titles). But it is still not working on the detail view.

Typoscript of the plugin is included.
The languages are set up correctly. For testing purpose I inserted some text blocks on the pages that get translated right.

Thank you very much in advange and best regards,
Sören W

Route Enhancer Error

In a TYPO3 9.5.14 installation I try to use your route enhancer and get the following error:

Parameter "tx_bmimagegallery_list__show" for route "tx_bmimagegallery_list_0" must match "[^/]++" ("" given) to generate a corresponding URL.

Error in Typo3 9.5.5 (but not 8.7.24)

Hi.

I'm getting this error in a Typo3 9.5.5 (composer setup). I have the same version of the extension runing on 8.7.24 ('old school' installation setup with Extension Manager) without any issues:

Argument 1 passed to Bitmotion\BmImageGallery\Domain\Model\Dto\CollectionInfo::setPreview() must be an instance of TYPO3\CMS\Core\Resource\FileInterface, boolean given, called in ...../public/typo3conf/ext/bm_image_gallery/Classes/Domain/Model/Dto/CollectionInfo.php on line 28

Any ideas where I/it might be going wrong?

Thanks. If there is any further information I can provide, feel free to ask, of course!

Cheers

Flexform Override

Hey guys,
today I updated to the latest version.

Is it possible to override the ControllerActions.xml ?

In the old extension I just had to override:

Folder: my_extension/Configuration/TCA/Overrides/tt_content.php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'bmimagegallery_list', 'EXT:my_extension/path/to/flexform/ControllerActions.xml' );

It doesn't work in the new one.

It's very important for me and I hope you can help me.

"Gallery Page" ?

Hi there,
I don't really understand why the CE Plugin needs to know the Page where the Gallery is on as the CE is allready on some page or is meant to be to have the CE somwhere else than the actuall Gallery?
Best
Stefan

Gallery ignores sorting order

I set up a bm_image_Gallery in my Typo3 9.5.14 Environment.
The only problem I discovered, is that the plugin does not respect sorting order.

It respects at least the field for orderBy, but the field of sortingOrder keeps being ignored.
Is this a bug, or is there some other issue with my configuration? (eg. wrong "orderBy").

best regards,
Izaquiel Tomé

Wrong relAttribute

Not sure whether it's an issue or my fault, but I get a wrong relAttribute for fancybox.

html shows rel="fancybox-{field:uid}" while {field:uid} should be a number.

In partial Image.html
<f:debug>{settings.lightbox.relAttribute}</f:debug>
shows
'fancybox-{field:uid}' (20 chars)

fancybox is not working, only one image shows up.

TYPO3 11.5

Hi,
Thanks for the nice extension. Do you plan an upgrade to the latest version?

Regards
Hobokens

Override constants

Its not possible to override the default constants for the template-/layout-/partialRootPath.

My constants:
tx_bmimagegallery {
view {
templateRootPath = EXT:my_ext/Resources/Private/Templates/Gallery/
partialRootPath = EXT:my_ext/Resources/Private/Partials/Gallery/
layoutRootPath = EXT:my_ext/Resources/Private/Layouts/Gallery/
}
}

but it always loads the default templates/layouts/templates... maybe i'm doing something wrong...

Exception if description field is empty

Describe the bug
Exception if the description field of the file collection is empty.

TYPO3 10.4.15
PHP 7.4.16
Composer mode

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to Leuchtfeuer\BmImageGallery\Domain\Transfer\CollectionInfo::setDescription() must be of the type string, null given, called in /var/www/vhosts/REMOVED/private/typo3conf/ext/bm_image_gallery/Classes/Domain/Transfer/CollectionInfo.php on line 134 | TypeError thrown in file /var/www/vhosts/REMOVED/private/typo3conf/ext/bm_image_gallery/Classes/Domain/Transfer/CollectionInfo.php in line 78. Requested URL: https://REMOVED

Expected behavior
The description field of a file collection is optional and could be empty.

Add missing null coalescing operator in CollectionInfo.php to prevent exception message

Prevent exception message:

Argument 1 passed to Leuchtfeuer\BmImageGallery\Domain\Transfer\CollectionInfo::setDescription() must be of the type string, null given, called in /var/www/html/public/typo3conf/ext/bm_image_gallery/Classes/Domain/Transfer/CollectionInfo.php on line 134

SQL definition for field "bm_image_gallery_description" is text. That means, In TYPO3 context, the default value is null.

In CollectionInfo.php:

  • the description setter at row 78 defined $description as string
  • the function call at row 134 only set origin database value
  • if description field is empty th default value from DB is null
  • the exception is thrown

To prevent the exception, add missing null coalescing operator to the function call.

$this->setDescription($properties['bm_image_gallery_description'] ?? '');

TYPO3 10.4.17 / bm_image_gallery 5.1.0

Pagination

Is your feature request related to a problem? Please describe.
If you have a lot of images, it would be nice to have a pagination,

Describe the solution you'd like
Add the new pagination to the extension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.