Thumnail Navigation

This is in regards to afrojas's post on creating a thumbnail navigation:
afrojas Posted: 2005-10-15 04:27:47

I tweaked his code a little bit to include a link with the thumbnail array. But I really am lost when it comes to PHP arrays and loops, if anyone knows a cleaner way of doing this it would be greatly appreciated:

`<?php`
`$currentImageTitle = getImageTitle();`
`$thumbRange = 2;`
`$iterator = 0;`
`$controlInt = 0;`

`while(next_Image()) {`
`if ($currentImageTitle == getImageTitle()) {`
`$controlInt = $iterator;`
`}`
`$iterator ++;`
`}`

`$iterator = 0;`
`while(next_image()) {`
`if(($iterator >= ($controlInt - $thumbRange)) &&` `($iterator <= ($controlInt + $thumbRange))) {`
`$imageurl=getImageLinkURL();`
`$imagetitle=getImageTitle();`
`echo "<a href="$imageurl" title="$imagetitle">";`
`echo printImageThumb(getImageTitle());`
`echo "";`
`}`
`$iterator ++;`
`}`
`?>`

I saw afrojas already has it working on his site. The only thing I would like to do is be able to put image place holders for the spots not filled in yet when browsing the first or last images in an album. Any help?

Comments

  • I also found out that if you click on an image in an album page after the first page, the thumnails in image.php will start from the first image of the album. Afrojas seemed to get it to work in his though...
Sign In or Register to comment.