Showing previous 5 and next 5 photos

Hi guys,

I'm trying to make a theme, and when a picture is viewed, I want to also show the previous 5 and next 5 photos. You know, just like the previous/next links in the stopdesign theme, but five of them instead of just one.

I've taken a look at the theme functions, and tried to write some loops, but couldn't figure out what to do.

Can someone give me a hint?

Thanks in advance...

Comments

  • class-album.php has a function: `getImage($num)` which will return the num'th image.
    `imageNumber()` will get you the number of the current image. So you could use:

    `$n = imageNumber();

    $p_minus_1 = $_zp_current_album->getImage($n-1);`

    etc.
  • I'm not very good with PHP... so I was wondering how would I use this function? I tried requiring class-album.php file within image.php. But that didn't work, as I still have a "Fatal error: Call to undefined function getimage() in ...\image.php on line 55"
Sign In or Register to comment.