Multiple album?

Hi. I've had a look around the forums (searching for multiple albums) and also at the FAQ but can't seem to find anything conclusive (sorry, otherwise I would't be creating this thread) but I was wondering if ZenPhoto supports multiple albums? ie. that one image can be 'categorised' into more than one album.
Thanks!

Comments

  • flick Member
    Is this a no then? :)
  • yeah.. no.. that is not possible yet and not in the so near future either.
  • flick Member
    Thanks for your reply, Chilifrei64 :) It does help!
  • this is something i'd be interested in too.. though perhaps a slightly different approach...

    i'd like to have albums reflecting broad categories - wildlife, architecture, people etc. but i'd also like to have 'sets' or 'collections' of photos - say all my photos from a trip to Hong Kong (or at least the ones worth uploading). some of those photos may also be appropriate in one of the category albums, eg 'people', or 'architecture'.

    there *are* ways which one photo can be in more than one album, but they are no better than ugly hacks - eg create a symlink in one album to a real image in another - however this creates a duplicate record in the database, so its not really the 'same' image. works surprisingly well if your title, caption and keywords are all read from file metadata though.

    im not sure exactly what im proposing here, perhaps an extension to zenphoto to allow not only albums, but also 'collections' or 'sets'. db-wise, i guess you'd have something like:

    zp_collections (id, name) - to hold the named collections
    zp_collection_images (id, collection_id, image_id) - a mapping table for many-to-many image-collection mappings.

    alternatively...

    we could have keyword-based (and even other metadata-based) dynamic albums... say, all images with keyword 'London', and another configured as all images with keyword 'People'. Thus, if you have one image which has London AND People tags, it would show up in both. possibly a nicer solution, all in all.
  • acrylian Administrator, Developer
    You could use tags that use the search that generates a sort of temporary album with the search results. And we have boolean search in 1.1.4, too
  • how about you do a search and can save it as an album?

    could call the saved searches 'dynamic albums' or something. that'd be cool because then people could use them however they wanted.
  • acrylian Administrator, Developer
    What is different from bookmarking a search result page (besides the fact the search results are newly generated and so up to date)?
  • I think it would be a major change to zp to have images categorized into multiple albums. Currently zp is very "file system" based. That is it believes that what is in the file system overrides what might be in the database. So, an image really has to exist in the album folder for it to appear in the album.

    Symlinks are the only real solution. The disadvantage of multiple DB entries can be mitigated by putting all the image info into metadata in the image EXIF/IPTC fields. Then at least the database will get populated automatically with the data.
  • @sbillard: i think you are right, in the short term at least, and since my images have their title, caption and tags embedded (and the files themselves are kept up to date via rsync / refresh metadata), it would certainly work for me. however, provided the db is updated with the metadata from the real, actual images, then the saved searches idea certainly has merit.

    @acrylian: there is no difference at all, except the saved searches / dynamic albums would look like albums, have a thumbnail etc. whereas all they would really be is a link to a saved search - perhaps on a subtly modified search page.

    what im thinking is the resultant page wouldnt show 'Search', but instead could be told to display a 'dynamic album name' - i think this is probably best done via url rewriting rules. something like /*.dynalbum in the url - whatever the * is would be displayed as the album name. certainly, it might be sensible to provide a visual cue that we're looking at a dynamically-generated album rather than a static one.

    the nice thing about this approach is that new images matching the original search criteria will automatically become part of the dynalbum.
  • ok, a little update. ive never used php before (im a java and oracle programmer during the day) but it seems fairly nice.

    i've hacked a little something together - basically i changed the search results page to look for an 'albumname' property. if its set, the name is displayed instead of 'Search', and the 'total results for blah' bit is omitted.

    the next steps are:

    1) at the bottom of the normal search results page (ie no albumname property) have a link to 'save this search as a dynamic album'. this will write the url-encoded version of the search string to a new table (zp_dynalbums) along with a name and optional description.

    2) at the bottom of the dynalbum version of the search results page, have an 'edit this dynamic album' link, for admins.

    3) get the dynamic albums to show up on the main gallery page, alongside the 'normal' albums.

    if anyone wants to see my (very rough) working copy, its here: http://gallery.mungler.com/index.php?p=search&words=(outdoor&!scotland)|bird&albumname=hellomum

    as i say, im totally new to php and im obviously just hacking this together for my own purposes. if anyone wants to take what im doing and add it properly, i'm even happier :) cheers

    EDIT: added an 'omitalbums' to the search results:
    http://gallery.mungler.com/index.php?p=search&words=architecture&omitalbums=1&albumname=stuffblah - this stops it showing the 'architecture' album as a search result.

    EDIT2: well, im giving up for the night. im starting to get my head around how zenphoto is put together. i think the next step is to create a class DynamicAlbum as a subclass of PersistentObject, and set about saving the search criteria to the db. I noticed that my changes to the search results page result in some odd behaviour in the breadcrumb links if you click on an image in the 'dynamic album'.

    ultimately, one of three things will happen:

    1) one of the proper zenphoto devs will pick this up and implement it properly, life will be good, etc

    2) i fail to convince the devs its a good idea, so end up hacking something together just for my own use/amusement, which may or may not work.

    3) i fail to convince the devs, fail to get it to work either through inability or (more likely) lack of time and motivation, and end up using the symlinks instead.

    i'd prefer options 1, then 2, with 3 only as a last resort :)
  • Mugler:

    You should create a new feature ticket for this. Include your implementation as an attachment. We will then add it to the voting poll and see how much interest it generates. Sounds like it would be reasonably popular.
  • acrylian Administrator, Developer
    Mugler: I think I now see what you had in mind. I agree with sbillard.
  • guys, thanks for the feedback. i will do as you say. hopefully it'll be popular with others, as its something i'd really like to see.

    regards

    - mungler
  • http://www.zenphoto.org/trac/ticket/394 - posted. how do i get it in the list of voteable things?
  • acrylian Administrator, Developer
    I just added it.
  • Did this ever get anywhere, I have had a look though the plugins and I didn't see one to handle this.

    IAn
  • acrylian Administrator, Developer
    Zenphoto is file system based so an image can only be physically in one album at the time. However what you are lookinf for are dynamic albums: http://www.zenphoto.org/news/how-to-use-the-dynamic-albums-feature
  • I'll give them a go.

    Many thanks

    Ian
Sign In or Register to comment.