Hy, i customized the workflow of the image.php.
so if you click on a image it goes directly to the next one, i wrote:
`
`
So my problem is, that as soon as you come to the last image, it doesn´t show up (makes sense if you got this function on a button..)
how can i hack that?
1. to show the last image and if there is no image after just stop there, or remove the
link function
or better
2. start looping again from the first image of the album...
Is that possible?
Comments
how can i hack that?
1. to show the last image and if there is no image after just stop there, or remove the
link function
That is a little confusing, do you want the link to be shown if there is no next image or not?
Anyway, how about?: `if(next_image()) { show link } else { do something }`
The nightly build has functions for first and last image:
www.zenphoto.org/documentation
`
<?php } <br />
if (hasNextImage()) { ?>
"><?php printDefaultSizedImage(getImageTitle());} <br />
else ?>
<?php printDefaultSizedImage(getImageTitle()); ?>
how can i now loop back to the first? sorry, couldn´t find it in docmentation...
BTW, you code misses two "{" and "}" for the else part and the `` is not correct, too.
`<?php } <br />
if (hasNextImage()) { ?>
"><?php printDefaultSizedImage(getImageTitle());}<br />
else { ?>
"><?php printDefaultSizedImage(getImageTitle());?>}
<?php }?>`
but of course there is a missing after the if statement. don´t know where to place...
I don´t get the link closed!
`
<?php } <br />
if (hasNextImage()) { ?>
"><?php printCustomSizedImageMaxHeight(400);}<br />
else { ?>
"><?php printCustomSizedImageMaxHeight(400);?>
<?php }?>
`
i tried to close after the '}' but than i get an error. i think something else is wrong.
maby the declaration of the if/else statement.
somebody knows?
`
<?php } <br />
if (hasNextImage()) { ?>
"><?php printCustomSizedImageMaxHeight(400);?>
else { ?>
"><?php printCustomSizedImageMaxHeight(400);?>
<?php }?>
`
i see beside my image "else { ?>" showing up and the last image is missing...