Hi,
I'm wanting to make my image page go to the next image when you click the image... then when at the last image in the sequence when you click it for it to go back to the first in the album? loop back round basically.
I've had a search and all I could find was this:
http://www.zenphoto.org/support/topic.php?id=2886#post-17289
and this:
http://www.zenphoto.org/support/topic.php?id=1225#post-6896
I've had a try and failed, I'm not the best at this stuff so totally lost as to the code I should put in??
Any help is greatly appreciated.
Thanks.
The first link you posted gives you the code necessary for what you're asking. All you need to do is to put the code in your theme page, image.php to be exact. However, it would probably be best that you create your own custom theme with this change (if you haven't already), otherwise your changes will disappear after updating zenphoto.
You might want to read the theming tutorial if you're having trouble with adding the code to your theme file. It gives explanations and insight into how themes in zenphoto work. http://www.zenphoto.org/2009/03/theming-tutorial/
Thanks for the response...
I've tried putting the code in to my theme within the image.php page in the image div and no matter which version I choose or how I alter it I still can't get it working? I can get it working in the original way to see thickbox, or full size image, or no link at all, but just can't seem to get it to go to the next image then loop back!?
The first link above the guy seemed to have figured it out, but there is so many variations then slight confusion at the end as to whether it was solved in the end or not?
If anyone could help me out I would appreciate it. Almost reaching my final design :-)
Thanks again.
In the first link, the code in the responses all build off of the last, so the code you want will be the last posted:
`
else { ?>
However, the code exactly how it is is still not completely correct; it needs to have the change posted by acrylian to work (else { ?>` needs to be ``).
There is also one other minor change that should be made - printCustomSizedImageMaxHeight is considered deprecated, so you should replace printCustomSizedImageMaxHeight with printCustomSizedImageMaxSpace (see http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintCustomSizedImageMaxHeight in the functions guide for details).
Mmmm...
I've got:
`
`
and... it doesn't work? I'm sure it's an error someone who knows about php more than me will be able to spot instantly?
Returns: Parse error: syntax error, unexpected '}' in C:\Inetpub\vhosts... etc
Thanks again.
If I remove the last `` it then works but the original full size image is displayed...
My working code before was as follows:
`
[url=
] title="">
`
I basically want to get that code working with the click image to go to the next image and loop back round function?!
Hope that all sounds clear??
I've been trying and trying different methods...
`
`
That code seems to work but my comments only show up in the last picture of any album? other than that it all seems to work? well except for the fact I've not figured out how to incluce the image alt tag again yet... Light at the end of the tunnel though :-)
Sorted... Just in case anyone looks at this in the future... this is the code that I got working, not sure if it's correct or not but it works!
`
`
Sorry for reviving an older thread - but I really needed this feature. This is how I've done it - not sure if this is a safe or even sane thing to do though. Works with ZP 1.4.1.5:
--- themes/zenpage/image.php.bak 2012-01-12 05:58:03.810204278 +0100
+++ themes/zenpage/image.php 2012-01-14 01:15:57.890243727 +0100
@@ -75,7 +75,7 @@