Phoca Gallery Plugin parameters confusion (e.g. detail)

Phoca Gallery plugins - plugins for Phoca Gallery extension
Destroy666
Phoca Member
Phoca Member
Posts: 12
Joined: 19 Mar 2024, 11:27

Re: Phoca Gallery Plugin parameters confusion (e.g. detail)

Post by Destroy666 »

So in this case, on my website, the problem was the animations and `visibility: none` added with a class related to them onto last div with Phoca images. Since it was part of articles it was problematic in all templates. The workaround for me was to remove animations from last Phoca images.

A proper fix for all similar cases would be something like:
https://github.com/PhocaCz/PhocaGallery ... .php#L1072 & https://github.com/PhocaCz/PhocaGallery ... y.php#L785 - don't concantenate the `pwsp` div code to last instance of images. Instead concantenate it to the very beginning or very end of article body here: https://github.com/PhocaCz/PhocaGallery ... .php#L1084

E.g.:
$article->text = $this->loadPhotoswipeBottomPlugin(1, 1) . preg_replace($regex_all, $o, $article->text, 1);

But outside the loop and maybe with some conditional for checking if there are any Phoca instances in the article.

EDIT: here's the entire file with edits that work for me: https://pastebin.com/NNRCAQP2
Feel free to include this as a patch or let me know if you would like a PR on GitHub from me.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48299
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Gallery Plugin parameters confusion (e.g. detail)

Post by Jan »

Hi, thank you for the code, I will take a look at it. The code is developed for some time and I remember there was problem with this feature, so the code was moved to the last and this is why the comment: // Must be at the end is there.

Thank you,
Jan
If you find Phoca extensions useful, please support the project
Post Reply