Member
Member
PierreSnugg   2008-04-28, 10:17
#1

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

  1. start looping again from the first image of the album...

Is that possible?

Administrator
Administrator
acrylian   2008-04-28, 10:23
#2

[i]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[/i]

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

Member
Member
PierreSnugg   2008-04-28, 10:40
#3

Ok, i wrote:

`

`

how can i now loop back to the first? sorry, couldn´t find it in docmentation...

Administrator
Administrator
acrylian   2008-04-28, 10:42
#4

http://www.zenphoto.org/documentation/zenphoto/_template-functions.php.html#functiongetFirstImageURL

BTW, you code misses two "{" and "}" for the else part and the `` is not correct, too.

Member
Member
PierreSnugg   2008-04-28, 13:04
#5

for some reason, that works:

`

Member
Member
PierreSnugg   2008-04-30, 12:27
#6

can somebody correct that code? it works, but i know there is something wrong.
I don´t get the link closed!

`

Administrator
Administrator
acrylian   2008-04-30, 12:31
#7

The first link is not closed.

Member
Member
PierreSnugg   2008-04-30, 13:02
#8

well, where should i close?

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?

Administrator
Administrator
acrylian   2008-04-30, 13:22
#9

You just need to look at the second link...

Member
Member
PierreSnugg   2008-04-30, 14:05
#10

If i write:

`

else { ?>

`

i see beside my image "else { ?>" showing up and the last image is missing...

Administrator
Administrator
acrylian   2008-04-30, 15:37
#11

Of course, you need to look closer. the elseneeds to be ``. Always close what you open and always open what you close..:-)

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.