Member
Member
os07   2008-06-16, 14:23
#1

Is there a way to display the "sequential" image number on the image.php page?

I.e., if there are four images in the album, when displaying the first image, you would have a field that read "1", when displaying the second image, the field would read "2", etc. (No need for showing total number in album.)

Thanks!

Administrator
Member
Member
os07   2008-06-16, 19:51
#3

Yes, sorry. It's right there. Looked at the file, but I guess not closely enough. Took all of ten seconds to implement, even for me.

What I am trying to do is to have a visual link to each image in the album using the image's sequential number as the basis for the link. Kind of like having a little visual "menu" just consisting of image numbers, with the current image link always highlighted as the user moves through the images in the album.

Member
Member
os07   2008-06-17, 13:49
#4

Is there a way to specify a specific image number (i.e., the image's number in the album's sequence)? I am not experienced much in PHP, I'm afraid.

Thank you.

Member
Member
sbillard   2008-06-17, 14:07
#5

No single function, but as with most anything, there is a way:

`$images = $_zp_current_album->getImages();

$tenthimage = new Image($_zp_current_album, $images[10]);`

Of course, you need to be sure there is such an image!

Administrator
Administrator
acrylian   2008-06-17, 14:30
#6

sbillard, I think he has something different in mind like this:
`

">

`
That prints a " 1 2 3 4 etc" list of the images in the album where the current image is not a link.

Member
Member
os07   2008-06-17, 14:51
#7

Thank you. What I am trying to do is to have a little menu on the image page, so that under each image would be:

1 2 3 4 5 ...

And each number would be a link to that sequential image in the album. A different sort of navigation than the and buttons.

Administrator
Administrator
acrylian   2008-06-17, 14:55
#8

That is exactly what my code above does.

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