Member
Member
invision   2008-09-29, 17:17
#1

Hi,

I have 3 albums. Each album has 3 pics.

I would like a way to display my Zenphoto Home Page like:

Album 1 Title
Thumb 1 - Thumb 2 - Thumb 3


Album 2 Title
Thumb 1 - Thumb 2 - Thumb 3


Album 3 Title
Thumb 1 - Thumb 2 - Thumb 3

I'm assuming this is fairly straightfoward with some coding tweaks.
Also, after a while there may be more than 3 albums and more than 3 pics in each album.

Can anyone help?

Thank you.

Developer
Developer
trisweb   2008-09-29, 17:19
#2

Indeed, very easy.

Just copy the code from the album.php file, in the while (next_image()): block, into the while(next_album)): block of index.php, right after the album thumbnail, in whatever HTML structure you want. Then you will get the album's images after the album thumbnail and can style it however you like.

Member
Member
invision   2008-09-29, 17:34
#3

Wow! That was quick. And it worked....almost.

I get an odd error:
[code]Fatal error: Call to a member function on a non-object in /home/mysiteuk/public_html/wordpress/zenphoto/zp-core/template-functions.php on line 307.[/code]

Administrator
Administrator
acrylian   2008-09-29, 18:03
#4

You need to put the next_image loop within the next_album loop (each is closed by endwhile).

Member
Member
invision   2008-09-29, 18:17
#5

Thanks for the reply!

Here's my code:

`

                 







                        ">

`
Is this correct?

Administrator
Administrator
acrylian   2008-09-29, 18:20
#6

That should work.

Member
Member
invision   2008-09-29, 18:26
#7

Hmm...strange.

Like I say, it does display them all OK, but gives me the error and crashes my page.

Line 307 of 'template-functions.php' is:
return count($_zp_current_album->getSubalbums());

Member
Member
invision   2008-09-29, 18:29
#8

My apologies, I was being a right eejit.

Had kept this in:

runs off, slightly ashamed

Thanks for the help folks!

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