This is in regards to afrojas's post on creating a thumbnail navigation:
afrojas Posted: 2005-10-15 04:27:47I 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