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?
Comments
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:
- " title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>
<?php endwhile; ?>
and here's what i got:<?php while (next_album()): next_image(); ?>
- <img src="/arquivo/cache/single%20works/Afinidades%20Eletivas.jpg_60_cw60_ch60.jpg" alt="Afinidades Eletivas" width="85" height="85" />
- <img src="/arquivo/vulgo/image/thumb/" alt="" width="85" height="85" />
- <img src="/arquivo/serie%20mexicana/image/thumb/" alt="" width="85" height="85" />
- <img src="/arquivo/red%20series/image/thumb/" alt="" width="85" height="85" />
- <img src="/arquivo/corpo%20da%20alma/image/thumb/" alt="" width="85" height="85" />
i surely missed something, but i can't figure out what.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:
`
- " title="<?php echo getImageTitle();?>"><?php printImageThumb(getImageTitle()); ?>
<?php endwhile; ?>
`<?php while (next_album()): next_image(); ?>
and here's what i got:
`
`i surely missed something, but i can't figure out what.
Thanks.
In index.php, look for something like this (the album thumbnail):
`" title="View album: <?php echo getAlbumTitle();?>"><?php printAlbumThumbImage(getAlbumTitle()); ?>`
You want to get the first image in the album, and then get the link to that, so do this instead:
`<?php set_context(ZP_IMAGE); $_zp_current_image = $_zp_current_album->getImage(0); if (!$_zp_current_image) continue; ?>
getImageLink(); ?>"/><?php printImageThumb(getImageTitle()); ?>
<?php set_context(ZP_ALBUM); ?>`
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.
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;
`<?php <br />
global $_zp_current_album;
$albumpagecheck= getAlbumCustomData();
$albumpagecheck = substr_count($albumpagecheck,"noalbumpage");
if($albumpagecheck==1){
$image = $_zp_current_album->getImages();
$first = $image[0];
$album = getAlbumLinkURL();
$album= str_replace(WEBPATH, "", $album);
$path=rewrite_path("index.php?album=" . $album ."&image=".$first);
$host = $_SERVER['HTTP_HOST'];
header( "Status: 301 Moved Permanently" );
header( "Location:http://$host/$path" );
exit(0);
}?>`
`
ps the breadcrumb stays intact!
thanx much!
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!!!!
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!
'
<?php
global $_zp_current_album;
$albumpagecheck= getAlbumCustomData();
$albumpagecheck = substr_count($albumpagecheck,"noalbumpage");
if($albumpagecheck==1){
$image = $_zp_current_album->getImages();
$first = $image[0];
$album = getAlbumLinkURL();
$album= str_replace(WEBPATH, "", $album);
$path= (WEBPATH . $album ."&image=" . $first);
$host = $_SERVER['HTTP_HOST'];
header( "Status: 301 Moved Permanently" );
header( "Location:http://$host$path" );
exit(0);
}?>
'