Page 2 of 2

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

Posted: 10 Jul 2024, 09:54
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.

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

Posted: 16 Jul 2024, 16:39
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