Dynamic albums

I am considering ZenPhoto for building a photo site and since I couldn't find a high-level architecture overview, I have a question about dynamic albums.

The question is, once I do a search and designate its results as a dynamic album, does this album become "permanent"? Specifically, if some time later I ask for this dynamic album, is the search run again or the dynamic album is fixed at the moment of its creation?

By the way, I assume the images in an album are an ordered list, a sequence I can manipulate, and not just an unordered set, right?

A related question is whether an image "knows" which albums it is a member of? Of course it knows its primary/standard album since it's a file folder where it lives. But does it know to which dynamic albums it belongs? If on the image page I want to display a list of all the albums it belongs to (one primary plus zero to several dynamic), is it easy and natural to do or I'd have to do contortions and run expensive searches?

I understand that with sufficient amount of code one can achieve anything, but I don't wish to fight the application and violate its architecture to get to what I want.

Thank you

Comments

  • vincent3569 Member, Translator
    hi

    there is some anwers to your questions :
    The question is, once I do a search and designate its results as a dynamic album, does this album become "permanent"?
    Yes, the dynamic album is permanent : you can seen it in the admin and you can manipulate it (publish or not, order in the albums list,...)

    You can sort pictures, but without manual order (you can't access to the pictures of the dynamic album in the admin) : ie you can use sort by date, filename,...
    A related question is whether an image "knows" which albums it is a member of?
    as far I know, you can't know if a picture is in a dynamic album (a dynamic album is only the result of a search).

    rather than displaying the albums (dynamic or not) of a pictures, you can display tags of the pictures and allows to navigate them...
  • acrylian Administrator, Developer
    Zenphoto is filesystem based and organizes images within folders within the root "albums" folder. An image always does belong to its real album on the filesystem therefore.

    Here is some info how Zenphoto works (all found within the troubleshooting):
    http://www.zenphoto.org/news/how-does-zenphoto-cache-
    http://www.zenphoto.org/news/is-it-really-necessary-to-pre-cache-my-images-at-all-
  • Yep, I've read about caching but that isn't related to my question.

    Let me be more specific. Let's say I have a gallery. I run the search on tag "awesome", it brings up, say, 20 images, I make them a dynamic album. Fine.

    Time passes. I add more images to the gallery, two of which I tag "awesome". After that I bring up my dynamic album page. Will it have 20 images in it or 22?

    In the same context, let's say there is an album (a primary album, corresponding to a folder in a file system) called Quagga. One image in that album/folder is tagged "awesome". On that particular image's page, can I easily enough provide links to other images tagged "awesome", ones that are part of the same dynamic album, or not? Let's say I want to display *two* filmstrips on the individual image page -- one filmstrip for the main album/folder and one filmstrip for the dynamic album. Can I do that without running a search at display time? And can I rearrange the sequence of images in a dynamic album?

    Thanks
  • Consider the dynamic album the result of a search query, not a list of items of a particular point in time. You will get back the results of the search done when you "access" the dynamic album.

    I think you are complicating things with your second example. First thing you must remember is that Zenphoto had no clue about what you are displaying on an image (or other) page. That is the domain of your theme scripts.

    What Zenphoto does is direct a url request to a something that looks like an image (e.g. `myalbum/pic.jpg`) to your image.php script passing along the album and image objects. Tags are simply a way to locate these objects. A search on "awesome" will produce all objects that are tagged with "awesome". The links associated with these objects are simply the `myalbum/pic.jpg` link as above.

    As to your final question, it has already been answered.
    You can sort pictures, but without manual order (you can't access to the pictures of the dynamic album in the admin) : ie you can use sort by date, filename,...
    Anyway, now is the time for you to go read the theming tutorial.
  • I've read the theming tutorial :-)

    Anyway, I think I understand the answers. Dynamic albums aren't really first-class albums, they are, basically, search macros. It's a way to re-run a search and get the results nicely presented to you with a single click. Correct?

    I understand that Zenphoto doesn't care about what's on my image page and that it's a theme script which determines that. The theme script, however, has to work with the underlying database architecture and that's what I was really asking about. It does seem that, using my terminology, an image has no idea which dynamic folders it belongs to -- to figure that out you need to grab the image's tags, figure out whether there are dynamic folders corresponding to them, and then re-run the search, at runtime, to find the images in these dynamic folders.

    Hmm... That's not ideal for what I have in mind which is a structure in which images typically belong to several different albums at the same time and it's easy (and computationally cheap at runtime) to display thumbnails of other images belonging to the same folders... Lemme go and think about whether I can make it work :-)
  • vincent3569 Member, Translator
    hi

    maybe, you can have a look on this site : http://test.vincentbourganel.fr/.

    on gallery page, you have all the tags of pictures.
    when you navigate on a tag, you have all pictures with the same tag : you can consider that it is a dynamic album for each tag (http://test.vincentbourganel.fr/page/gallery).

    when you are on picture page, you can display all the tags of this picture. you can navigate each of them to obtain all picture with same tag, maybe in other albums (http://test.vincentbourganel.fr/20090801-vacances-ete-2009-vars/_mg_2625.jpg.html).

    when you navigate on my gallery, you can see a dynamic album called Portfolio : it shows all pictures with the specific tag 'portfolio' (http://test.vincentbourganel.fr/page/gallery/2/).
    if I manualy add this tag on another pictures, they will be added in this dynamic album.

    so what are your other need ?
  • [HS mode on]
    @vincent3569 : I have a display problem with Chrome when I use the portfolio, here is the link:
    `http://dl.dropbox.com/u/33602932/exemple_pour_vincent.jpg`

    Works great in IE and FF.

    [HS mode off]

    Laurent
  • acrylian Administrator, Developer
    Dynamic albums aren't really first-class albums, they are, basically, search macros. It's a way to re-run a search and get the results nicely presented to you with a single click. Correct?

    You can describe dynamic albums simply as "saved search queries". The exact opposite of the "static real" albums on the file system. Important to know is that dynamic albums require cookies (or sessions) to be enabled. Otherwise the don't work.

    So yes an image itself only knows about belonging to a real album.

    You can also setup searches manually by using the search class. I think after you read the theming tutorial you should also read at the object model one (search is not within it though).
Sign In or Register to comment.