![]() |
|
Click Image go to next image then loop back to first? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Click Image go to next image then loop back to first? (/thread-6000.html) |
Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-15 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. Click Image go to next image then loop back to first? - kagutsuchi - 2009-10-16 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/ Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-17 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. Click Image go to next image then loop back to first? - kagutsuchi - 2009-10-17 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 { ?>
There is also one other minor change that should be made - Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-17 Mmmm... I've got: ` ` Returns: Parse error: syntax error, unexpected '}' in C:\Inetpub\vhosts... etc Thanks again. Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-17 If I remove the last `` it then works but the original full size image is displayed... My working code before was as follows: `
] title=""> ` Hope that all sounds clear?? Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-17 I've been trying and trying different methods... ` ` Click Image go to next image then loop back to first? - thestormtrooper - 2009-10-17 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! ` ` Click Image go to next image then loop back to first? - cb0gus - 2012-01-14 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 Click Image go to next image then loop back to first? - micheall - 2012-01-14 You should upgrade from 1.4.1.5 to at least 1.4.1.6, if not to the 1.4.2 release candidate. 1.4.1.5 still had security vulnerabilities. |