Junior Member
Junior Member
iyiinsan   30-12-2007, 21:16
#1

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...

Member
Member
sbillard   30-12-2007, 22:49
#2

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.

Member
Member
impsquared   31-12-2007, 07:41
#3

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"

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.