Member
Member
vsPiotr   2009-05-03, 12:10
#1

Hi All,
first time post

I would like this on my index page:

[ALBUM TITLE 1] TH1] [A1->TH2] [A1->TH....]

[ALBUM TITLE 2]
         [A2->TH1] [A2->TH2] [A2->TH....]

..what I tried was a while(next_album()){ and nesting another while(next_album()) inside... but that was probably stoopid

What I want to do is to be able to accordeon collapse between different galleries so essentially I need their first level of content all on one page.
Is it possible in a simplish maner?

Kind regards,
Peter.

Administrator
Administrator
acrylian   2009-05-03, 17:05
#2

That is possible: http://www.zenphoto.org/support/topic.php?id=5208#post-30464
Also please review our documentation on our user guide section.

Member
Member
vsPiotr   2009-05-04, 03:31
#3

Cool! Much appreciated!

Member
Member
vsPiotr   2009-05-04, 15:32
#4

dang, got an error:

Fatal error: Call to a member function on a non-object in /home/suspects/public_html/zp-core/template-functions.php on line 306

not sure why it's 'fatal' as everything works (no sub-albums but I can live without)

My code is:
`

        " title="">

`

Member
Member
sbillard   2009-05-04, 19:12
#5

We'll need the zenphoto version. That error line# makes no sense in the current code source.

Member
Member
vsPiotr   2009-05-04, 21:30
#6

oh sorry about that (me = amateur hour), it's:
zenphoto version 1.2.2 [2983]

Member
Member
sbillard   2009-05-04, 22:03
#7

The function you are calling is getNumSubalbums() and it is being called when the varialble $_zp_current_album is not an object. This could happen if the function is called before or after the completion of the album loop.

Member
Member
vsPiotr   2009-05-04, 22:06
#8

is there a way to avoid that?
As I understand it, I need to loop through images inside the album loop to get all albums to display on page 1.

Is that correct?

Should I update now?

Cheers!

Member
Member
sbillard   2009-05-04, 23:26
#9

You will have to investigate your code. Probably the getNumSubalbums() should not even be being called at all, maybe something left over from an album.php script you copied.

The loop itself looks reasonable. It is code outside the loop which is failing.

Member
Member
vsPiotr   2009-05-05, 00:24
#10

yep, printPageListWithNav() must have been calling it.

You guys rock!

Member
Member
vsPiotr   2009-07-01, 23:59
#11

Hi, I have a follow up question:
I am building another page which is similar to the original at www.virtualsuspects.com
The only problem is that now I do need subalbum thumbnails to be displayed too.

Album name 1:
[sub th1] [sub th2] [sub th...]
[th1] [th2] [th...]

Album name 2:
[sub th1] [sub th2] [sub th...]
[th1] [th2] [th...]

and so on.

The theme's index page is essentially:
`

while next_album(true){

album stuff

while next_image(true){

    thumb stuff

}

}

`

I'm using Zenphoto version 1.2.5 [4022] (Official Build)

Any clues would be much appreciated!
Cheers.

Administrator
Administrator
acrylian   2009-07-02, 08:04
#12

Within the next_albums loop you need to work with our class methods and make some code for that. Take a look at:
http://www.zenphoto.org/documentation/classes/Album.html
First get the subalbums of the album and then get the album thumbnail.

Also look at the image class methods:
http://www.zenphoto.org/documentation/classes/_Image.html

You need to be a little familar with PHP to archieve that of course.

Member
Member
vsPiotr   2009-07-02, 09:21
#13

Thanks Acrylian,

I might just manage that although it's been a while since I php'd anything serious.
Always up for a challenge though

Member
Member
vsPiotr   2009-07-02, 10:47
#14

Done!
You actually already posted the solution here:
http://www.zenphoto.org/support/topic.php?id=4143#post-24729
..I wasn't searching for the right keywords I guess.

`

Administrator
Administrator
acrylian   2009-07-02, 11:17
#15

All right, far remember that thread. Searching is always good...:-)

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