j0nnybrav079 / photoswipe Goto Github PK
View Code? Open in Web Editor NEWTYPO3 PhotoSwipe-Plugin for native image-enlargement
TYPO3 PhotoSwipe-Plugin for native image-enlargement
The latest changes to that service seem to use PHP 7.4 language features. But the composer.json only requires 7.2.
I updated your extension to the latest version. On my local machine running 7.4 there were no errors. But on our Staging-Server currently behind at 7.3 I get the following error message. After upgrading the Staging-Servers PHP version to 7.4 it disappeared.
So the composer.json should reflect those new PHP requirements or the type hint(s) must be removed and instead work with Doc comments @var notation to help the IDE. Then it should be fine too with lower PHP versions.
In v1.2.x the ATagParams were configured per Typoscript:
lib.contentElement.settings.media.popup.linkParams{ ATagParams.dataWrap = class="{$styles.content.textmedia.linkWrap.lightboxCssClass}" rel="{$styles.content.textmedia.linkWrap.lightboxRelAttribute}" data-size="{file:current:width}x{file:current:height}" }
Since v2 you do this in the service class ATagParams
Unfortunately now only witdh and height from the image manipulation editor are used and not the sizes of file:current as before.
So now the data sizes are only set if one has touched the image editor settings. If not, data sizes ar set to 0 with the effect that the image fills all available space.
Could you consider both settings resp. use file:current as fall back if cropping sizes are not set?
This is a common HTML structure:
<figure>
<img>
<figcaption>Text with a <a>link</a>.</figcaption>
</figure>
The link added by PhotoSwipe should only listen to click events on img, not on the whole figure including figcaption. The current behaviour is overriding any link in the figcaption.
Hallo,
how to implement disabling zoom in a lightbox (https://photoswipe.com/v5/docs/adjusting-zoom-level/)?
thx opaque
I just wanted to ask, if we could set the PHP version dependency to add 8.0 and 8.1 as well?
I ignored this restriction and got no problems
In TYPO3 CMS 10.4.31 with PHP 7.2.34 I get this:
(1/1) ParseError
syntax error, unexpected 'FrontendConfigurationManager' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
in /Users/heinzschilling/Web/werkhandkunst.test/typo3conf/ext/photoswipe/Classes/Service/ImageService64.php line 16
use TYPO3\CMS\Extbase\Service\ImageService;
class ImageService64
{
protected FrontendConfigurationManager $frontendConfigurationManager;
protected array $settings;
public function injectFrontendConfigurationManager(FrontendConfigurationManager $fcm)
PHP 7.4.21 works.
If you have for example an image in your gallery which is unprocessed 3000x2000px in size. Then the attribute of the link would render to data-size="3000x2000"
.
But according to the demo and docs of Photoswipe that should reflect the actual size of the linked image. Which would be in a standard TYPO3 installation maxed out to 800px in width and 600px in height. According to the following default constants styles.content.textmedia.linkWrap.width = 800m
and styles.content.textmedia.linkWrap.height = 600m
.
Therefore you have a linked large image for the gallery of max 800x600px and it gets zoomed to fill all available space in the photoswipe UI. And that might end up showing unwanted artifacts depending on how large your browser window and monitors are.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.