Page 1 of 1

Error: More than one slideshow pictures in one article

Posted: 19 Sep 2008, 08:32
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

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

Posted: 19 Sep 2008, 14:05
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