I am curious if it is possible to link directly to a photo from the main Album. This would skip opening the album to view all of it's thumbnails, then clicking on a thumbnail to view it.
This would force the user to use the previous/next buttons to view an album.
Any suggestions?
Yep! If you want the album to link directly to the first image in the album, just call next_image() inside the while(next_album()) and call its printImageThumbnail (or whatever, I'm not looking at the code). You'll get thumbnails of the first image in each album linking directly to that image, bypassing the album page.
hey, tris
i got close to that solution, but i'm really not a php programmer and i'd much appreciate your (or anyone's) help.
so here's how i understood your instructions:
[list]
[*]" title="">
[/list]
and here's what i got:
[list]
[]
[]
[]
[]
[*]
[/list]
i surely missed something, but i can't figure out what.
hey, tris
i got close to that solution, but i'm really not a php programmer and i'd much appreciate your (or anyone's) help.
so here's how i understood your instructions:
`[list]
[*]">
[/list]`
and here's what i got:
`[list]
[*][img]/arquivo/cache/single%20works/Afinidades%20Eletivas.jpg_60_cw60_ch60.jpg[/img]
[*][img]/arquivo/vulgo/image/thumb/[/img]
[*][img]/arquivo/serie%20mexicana/image/thumb/[/img]
[*][img]/arquivo/red%20series/image/thumb/[/img]
[*][img]/arquivo/corpo%20da%20alma/image/thumb/[/img]
[/list]`
i surely missed something, but i can't figure out what.
There are actually several ways to do this, but I'll give you one example.
In index.php, look for something like this (the album thumbnail):
">
You want to get the first image in the album, and then get the link to that, so do this instead:
`
`
I've just tested this and it works great. One other note - you'll probably also want to edit the image.php for your theme and remove the breadcrumb link to the album, in case you want to hide it completely.
I did something like this but with a different approach because for some albums i wanted to go straight to the first image and for some albums just go to the album page.
eg on http://www.bertsimons.nl/zenphoto/ 'paper sculptures' goes to the album page and 'furniture' goes straight to the first image on the image page.
did this like this. in the customdatafield for the albums I insert 'noalbumpage' to define this album as a noalbumpage album cq go straight to the first image.
then on album php at the top I wrote this, actually just a conditional redirect to the first image;
`
ps the breadcrumb stays intact!
I'm a ZenPhoto newbie, and I am DYING to get BertSimons solution to work, but I'm having problems getting it to work.
First off, is this designed to work with mod_rewrite on or off? When it's on (which I don't want for my set-up), it almost works, but adds an extra "/" between the host and the path. When mod_rewrite is off, it doesn't return any image information in the link, just the album ID.
Any advice appreciated!!!!
Hmmm... got it working with mod_rewrite on by taking out the forward slash "/" between $host and $path in the third line from the bottom
header( "Location:http://$host/$path" );
to
header( "Location:http://$host$path" );
but can't get it working with mod_rewrite off. Once again, any advice appreciated!