Hello,
First off - awesome program!!
I am creating my own theme. When one goes to the image.php view from the album.php view, I am able to display all of the thumbnails of the album in a sidebar to ease navigation between the photos in the album.
However, when I go to an image from the search/archive page, my thungnails for the "dynamic" album do not show. I can click through the images spanning across multiple albums created by the search though by using the previous/next links. So, the image (array?) is there, how do I show the thumbs for this dynamic album?
I am currently using:
`
<?php while (next_image(false, $firstPageImages)): ?>
<?php endwhile; ?>
`
Do I need to modify this somehow to be able to show the thumbs when coming from the search/archive page?
I hope this all make sense, and again - thanks a bunch - I love ZenPhoto!
Comments
<?php while (next_image(false, $firstPageImages)): ?>
" title="<?php echo getImageTitle();?>">
<?php printImageThumb(getImageTitle()); ?>
<?php endwhile; ?>
`
It got cut off - sorry - trying again..
To find the dynamic album you will have to use code like is found in `printAlbumBreadcrumb() to establish an album object for the dynamic album.
`<?php if (!is_null($_zp_current_search)) {<br />
$images = $_zp_current_search->getSearchImages();
$x=0;foreach( $images as $image ){
$current=$_zp_current_search->getImage($x);
$x=$x+1;
$_zp_current_image=$current;
printCustomSizedImage('', null, 26, 20); }
}?>`
Lets say I have two galleries with 4 photos in each, both created in April 2008. When I click on the archive for April 2008, I get photo 1,2,3,4 from gallery 1 and a,b,c,d from gallery 2 in that order. When I click on photo 1, it takes me to the image.php view showing photo 1 with the thumbnails in the same order 1,2,3,4,a,b,c,d. When I click on photo A, the order of the photos changes to 4,3,2,1,d,c,b,a. Any ideas how to correct this so the images stay in the same order?
Thanks!
This order is really appromative and I can't see all of the images of the search, when I use "prev / next" buttons.
Also, I've created a link on the full image view, which is leading on the album page.
It works generally, but not for the dynamic albums (in "search mode ^^").
sbillard, I don't understand your method, I'm sorry, I'm french and a little bit newbie ^^
Vincent
as for the sort order.. are you using the lates nightly build?
gjr+vincent;
my complete code for thumbs on the image page both in an dynamic album context as in a normal alnum context is:
`<?php <br />
$remember=$_zp_current_image;
if (!is_null($_zp_current_search)) {
$images = $_zp_current_search->getSearchImages();
$x=0;foreach( $images as $image ){
$current=$_zp_current_search->getImage($x);$x=$x+1;
$_zp_current_image=$current;
?>
" ><?php printCustomSizedImage('', null, <br />
26, 20); ?>
<?php }} <br />
if (is_null($_zp_current_search)) {
$images=$_zp_current_album->getImages();
while (next_image(true)): ?>
" ><?php printCustomSizedImage('', null, <br />
26, 20); ?>
<?php endwhile;<br />
$_zp_current_image=$remember;
}?>`
I used the `$_zp_current_image=$remember;` part to recall the $_zp_current_image to default sized image that is in view to be able to use functions on that after the thumblist
Thanks for helping me!
I would like to install the latest update but I will loose all of my custom modification...
Is it possible to know what are the additions to paste them into my code ?
I'm sorry I'm not really good.
Vincent
If you get problems depends on your modifications. If you only modified your theme you probably will not have that much problems.
BoooOOh... it's my error, too bad for me ^^
Forgiveness for trouble
Then you make a comparison of your customized files and the release. You can also browse http://www.zenphoto.org/trac/log/ where the changes are noted.
But the best thing would be not to modify the zenphoto core if at all possible. You can create your own custom functions--many of the themes have customfunction.php files. If you are making a customized theme, create a copy of the distributed one under a different name then make modifications to it.
www.boutsdeplanete.com
Vincent
PS: Is it on purpose that you don't have next/prev image links on the image page? I always have to go back to the thumbnails for the next image.