Pages (3):    1 2 3   
Member
Member
sbillard   17-07-2008, 16:33
#11

It is yours to do what ever you want with. Look through our documentation. I am sure you will find the support functions you need.http://www.zenphoto.org/category/User-Guide/

Member
Member
Joen   17-07-2008, 18:11
#12

I guess I'll try and adopt some code from the rss.php file. I'll let the forum know whether I manage to add pagination to that.

That said, my guess was that zenphoto had such a function built-in; it seems to me that a flat, paginated view containing every picture is a userfriendly way of showing a gallery. Benefits include giving people an idea of how many pictures there are in total, how new the pictures are (page 1 means newest) and so on. I would guess that's why Flickr has that as its default view. Asking here, whether such a function existed seemed like a shortcut at the time, my being stumped at what keyword(s) to search for.

Thanks for taking your time to reply here, and let me know if there's anything I can help you with, to pay back for the time the whole zp team spend here. I'm proficient in design and usability :)

Administrator
Administrator
acrylian   17-07-2008, 18:34
#13

I think that depends what you want to do..:-) I am fine with the normal albums as categories, but I can see the use of it, wether it is in order or just latest to oldest.

For the latter the rss feed is a good start.

If you want the images in album order and not lastest first here is a short round up for the first subalbum level:
`global $_zp_gallery;

$gallery = $_zp_gallery;

$albums = $_zp_gallery->getAlbums();

// gets every top level album within this you can get the images with $topalbum->getImages()

foreach ($albums as $toplevelalbum) {

$topalbum = new Album($gallery,$toplevelalbum,true);

        $subalbums1 = $topalbum->getSubAlbums();

    foreach($subalbums1 as $sublevelalbum1) { // gets every sub level album of the current top level one in the loop.

      $subalbum1 = new Album($gallery,$sublevelalbum1,true);

            }

}`

Within the subalbums1 foreach you can do it all again so you get the next subalbum level and so on (I do this with the printalbumenu up to the 4th level - And before anyone says anything, yes I know that actually should be done rekursively some time, but the direct way was faster for me and 4 levels are actually enough usability wise..:-))

Member
Member
Joen   18-07-2008, 10:30
#14

Acrylian,

That seems to work perfectly! I had to tweak it a bit. Here's what I have:

`

                    ">

















                          "> 



                                 ">

`

Edit: The only thing it seems to be "missing" is the pagination -- it doesn't obey the "galleries per page", nor does it seem to add pagination, but I can live with that. And the sorting works! Excellent.

Keep that design/usability review favor in mind, I'd like to help again. :)

Edit 2: Actually that pagination problem was me being stupid. Pagination DOES work, it just doesn't take its pagination info from "albums per page" but from "images per page". Woo!

Member
Member
jackie   21-07-2008, 05:27
#15

Hi - I'm trying (hate to admit how many hrs!) to get one album on a page, regular php page in my site, altho I have many albums in the gallery. Each page of my site needs a specific album... or 2.
I have the code from above "single album" working... I have only 2 albums in the gallery now but notice that the array #0 is the second one I set up, and #1 is the first (?)
But my question is: is there a way to display a specific album on a php page calling it by name, by the album's $folder name?

thank you
Jackie

Administrator
Administrator
acrylian   21-07-2008, 08:35
#16

Why don't you just link directly into an album?

Member
Member
jackie   21-07-2008, 21:49
#17

Thank you acrylian for your response.
yes - I can do that - but I wanted it to display in a spry tabbed panel on the page. (Don't we always want the 'next' thing?)
I think the code posted above will do that for me but I was wondering if there was a way to display one album by calling it by name.

Member
Member
sbillard   22-07-2008, 00:32
#18

What do you mean "calling it by name"? As acrylian said you can create a direct link to www.mydomain.com/zenphoto/album which will display that album. You can also create code that does the same thing as album.php to display the album in place.

Member
Member
jackie   22-07-2008, 02:11
#19

By 'calling it by name' I meant a possible function that would display the album within another page ( like a link would) - but that's actually what your code above does. Where you could pass the album folder name as a parameter. However I have it ok now -
I am using your 'one album' code - which displays the thumbnails and then the user can click into the album.
Thanks for the help and it's a great app. Once I read more of the core code functions I'll know more how it works.

Member
Member
edbury   23-07-2008, 21:19
#20

Joen, could you post the entirety of that file?

Pages (3):    1 2 3   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.