Member
Member
badcircle   15-03-2007, 21:20
#1

I have my next and previous album links working correctly, but as it is now, once you reach the first or the last album, the respective link just goes to the index. Is there a way to hide the Previous Album link on the first album and the Next Album link on the last album?

Member
Member
badcircle   15-03-2007, 21:35
#2

I noticed that the image.php has this handy feature:

` " title="Previous Image">« prev

" title="Next Image">next »`

tried replacing the word image with album in every instance, but that didn't work. ;-)

Member
Member
thinkdreams   16-03-2007, 15:15
#3

@badcircle-

Providing your using the latest code for Zenphoto, you should be able to use functions which are pretty new and documented here:

http://www.zenphoto.org/trac/wiki/DeveloperReference#getNextAlbumURLandgetPrevAlbumURL

They are part of the core code. Now, as far as the hasPrevImage() thing, I don't think there are comparable functions that exist that do that same thing, at least not from what I can see.

That's probably an easy change to make though.

Try:

`function hasNextAlbum() { global $_zp_current_album; return $_zp_current_album->getNextAlbum(); }

function hasPrevAlbum() { global $_zp_current_album; return $_zp_current_album->getPrevAlbum(); }`

I haven't had a chance to test it yet, but maybe Tris will have a sec to run over it briefly.

Member
Member
badcircle   18-03-2007, 22:43
#4

amazing thinkdreams -- works like a charm

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