Error: More than one slideshow pictures in one article

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
User avatar
Matze848
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Sep 2008, 07:54

Error: More than one slideshow pictures in one article

Post by Matze848 »

Hi all!

I realized an error with the Phoca Gallery Slideshow Plugin if you want to have more than one picture in one article: That doesn't work with the current version 1.0.0 beta, only the first picture is shown, for the others, the plugin code is displayed.
I searched for the reason within plugin file phocagalleryslideshow.php and found two bugs:
  • The first one is the use of the counter variable $i within two loops (line 43 and 86). You have to use different variables for the loops, so I changed $i to $j in lines 43 (all 3 occurences) and 52 (only one occurence).
  • The "return" call at the end of the file (line 121) must be moved one level higher because it should not be called before all of the pictures have been processed by the script. So you have to switch lines 121 and 122.
With these two modifications the plugin works fine, even if you have many slideshow pictures within your article. I've attached the modified script file, just unpack it and replace the original file with this one.

Best regards,
Matze
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error: More than one slideshow pictures in one article

Post by Jan »

Hi, thank you for your fixing.

I will implement it into the plugin.

Thank you, Jan

EDIT: fixed in the 1.0.0 version
https://www.phoca.cz/documentation/index ... how-plugin
If you find Phoca extensions useful, please support the project
Post Reply