Selected pictures as (sub)album

Hi zenphoto users and developers,

Consider the following situation: I have large albums (say > 100 pictures), and I'd like to be able to propose to the visitors only some selected pictures of this album (so that they don't get bored after 20 pictures). Ideally, the visitor could have a look only at the selected ones, or could see the entire set of pictures, if they really like it.

I was imagining (for example) a check box "Featured picture" for each picture, that would create a virtual subalbum with the checked pictures only (or leave only the non-checked ones in the main album, and place every picture in an "All pictures" subalbum).

I might have missed something, but going through the options of the admin interface and reading a lot on this forum, I didn't manage to achieve this. The only way I found was to actually duplicate the selected pictures and create myself the subalbum with the selection (I find the duplication part quite annoying). Maybe this should go to the feature requests...

Any idea?
M

Comments

  • acrylian Administrator, Developer
    We don't have that. You have two choices to create such an album:

    1. Copy them manually (there are backend functions for this on the images list). Since this is not what you want there is:
    2. Attach for example a special tag named "featured" to those images, perform a search and create a dynamic album (see the user guide on how to use this). This way you can even create a featured album from multiple albums.
  • There may be a way to use the image_album_statistics to obtain the top x highest-rated images as "Featured Images" from an album, and modify the theme to include those above the actual album thumbnails. That wouldn't prevent them from being displayed in the regular album thumbnails as well, but your theme could present these as larger-sized.

    You could also use different criteria, such as "most viewed", or use tags as acrylian suggested.

    Alternatively, another user in the forum wanted an option that would show some images from an album to guest users, but show the rest only to registered users. A suggestion I made on a solution there would be to make the "featured" images the only ones in the album, and then make the rest of the images in a sub-album. This way a user would go to the album in question, see only the "featured" images, but also see the link to the sub-album, which could be named accordingly. For example, naming the featured album "Gorillas", and the sub-album "More Gorillas" or something.
  • acrylian Administrator, Developer
    For a featured album from all albums I think that using a dynamic album is the easiest. If you unpublish it you could manually call it where you like using the object model and it would not show up with the other albums (given the visitor is not a logged in admin).
    Drawback is of course that you can't manually sort images within a dynamic album as they actually belong to other albums.
  • Thx a lot acrylian and Blue Dragonfly for your suggestions. I was thinking about the solution of tags, without knowing about the virtual album solution. Anyway, I was wondering if there was already such a mechanism in zenphoto. At least, I know that there is not :)

    As you said, I don't really like the idea of copying/duplicating every picture I want to "feature". And the suggestion of Blue Dragonfly would only make things more complicated from the user point of view: I want every picture in an album, and only selected ones in a subalbum (or the opposite, does not matter). I think that your suggestion would imply some duplication again.

    I guess that the best thing would be to add a "featured-albumXXX" tag for each featured picture of a given album, and add a virtual subalbum with them. I'll look at the user guide for how to do this. Thx again!
    M
  • I suspect that the user guide will not have the specifics you want. In a nutshell, you tag your pictures with your "featured-albumXXX" tags. Then do a search selecting that string and limiting the search to tags. From the search page that results you will have the ability to create an album [a link in the admin toolbox]. This creates a "dynamic album" which will contain just those images.
  • sbillard, you just gave me the exact key I was looking for (and I didn't even have time to look at the user guide)! I can't believe how easy it is: I didn't know about that link in the admin toolbox, that's brilliant!
    In addition, this solution answers to another question of mine: I was wondering whether it was possible to create albums with only pictures with specific tags spread over the whole gallery. Now I can. Dynamic albums are incredibly powerful (well, as much as normal album, but that's just great enough!).

    Many thx!
    M
  • acrylian Administrator, Developer
    That is what I actually tried to suggest. Sorry if that was not clear enough.
  • Don't worry acrylian. I perfectly understood what you suggested. sbillard actually explained how to do this (before I had a look at the user guide) with the admin toolbox, with an option I didn't even know (hence the simplicity of the approach). So that my thanks really goes to all of you! ;)

    Right now, I'm starting to play with dynamics albums, which I really love! Instead of using tags, I found that using any other field (e.g. "State", which is happily ambiguous for me) is much better: 1) it does not add anything in the template while looking at a picture (tags are displayed below the picture), and 2) it does not mess with the tag system, which is a good thing afterall.

    However, I was wondering if there was any way to use an EXIF field for this, hard-coded directly in the picture (I guess that additional fields coded in zenphoto --state, country, etc.-- are just stored in the data base) so that the picture itself would tell if it's featured or not? But in this case, I wonder if zenphoto is able to search in EXIF fields. It doesn't seem possible from the search box (no EXIF check box), but using for example "state", I ended up with a dynamic album with the search "words=bli&searchfields=64". Is there any hope in the 64 search fields for EXIF fields?

    Thx again! I'm using zenphoto for years, but I'm just starting to really play with it, and it's just a great tool :)
    M
  • acrylian Administrator, Developer
    You can select on the search options which fields the search should search on. Only those appear on the search field selector. You can of course search on EXIF fields as well.
  • Of course! I knew about these options, but just forgot about it, and I was not looking at the right place. Sorry for the inconvenience.

    Meanwhile, I've been a little bit confused about EXIF, so that what I want to do is maybe just not the best approach. Let me play a bit with that, and I'll let you know how I succeeded (hopefully). I'm new at playing with EXIF, so that I might need some time for it.

    In the meantime, I think I will stick on the "State" field (or any zenphoto field) approach, which does a pretty good job for me. Can you confirm that these zenphoto fields, when filled in from the Image tab, are not hard-coded in the picture, and only in the db?
  • acrylian Administrator, Developer
    Zenphoto is not able to write anything into your images, so all you enter manually stays in the db only.
  • OK, thx. I think I have all information I needed, what I need now is to think about it, to figure out what would be the best approach in my case (EXIF, tag, or other field). I'll keep the forum updated in case it can help other people.

    Thanks again! :)
    M
  • Dear acrylian,

    I'm now stuck with the treatment of EXIF data in the picture. I've read in other threads that zenphoto is able to read ImageDescription, and use it as the image title. While I'm still struggling to achieve this, I would like to know if there are other EXIF fields that are automagically handled by zenphoto?

    I guess it is somehow related to $_zp_exifvars, but I tried different searches in the forum and the user guide, but wasn't able to find the information I was looking for.

    In particular, my idea was to check if any EXIF fields could be automatically used for the location/city/state/country/copyright/etc. fields in the image tab (sorry if the terms are incorrect, I'm using a French zenphoto).

    Thx in advance,
    M
  • No EXIF fields (I believe none are defined for those values) But there are IPTC data fields that are used:
    `IPTCSubLocation` => location
    `IPTCCity` => city
    `IPTCState` => state
    `IPTCLocationName` => country
    `IPTCByLine`, `IPTCImageCredit`, `IPTCSource` => credit
    `IPTCCopyright` => copyright

    This is all handled by the image method `updateMetaData()` should you want to research further.
  • Yesssss !!! Thx sbillard for this update! Even though I'm a little bit confused between EXIF and IPTC, I'm now able to hard-code the IPTCState field with exiftool (I'm using Linux) with something like:

    $ exiftool -Province-State='featured' MyPicture.jpg MyPicture2.jpg MyPicture3.jpg ...

    Then, I just have to make a dynamic album with the state 'featured'. This approach can of course be refined with 'featured-albumXXX' keyword, if ones wants dynamic (sub)albums for each album. Last question about this: is it possible to make a dynamic album with such a query:

    words=featured&searchfields=64&album=XXX

    This would allow me to use a single generic keyword ("featured") and cross the request with the album. I couldn't find a way to use the searchbox to achieve this.

    As a conclusion, I know it probably looks quite weird to use the State field for this, but I'm not good enough at php to hack zenphoto to make it use my own EXIF/IPTC field (and I still have to figure out how to create my own field anyway). I believe the State approach is the best I can do for the moment ;)

    Thanks again,
    M
  • acrylian Administrator, Developer
    Using the state field is okay (the name is more a suggestion). Whatever fits your needs..;-)
  • First, a caution on using the searchfields=#, Those numbers could change release to release. Better to name the fields.

    Then you can add the filename(folder) to the search to get the album:

    `searchfields=filename,state`
    `words=featured&XXX`
  • Thank you sbillard. I understand the potential problem using field numbers instead of fields names. However, I wasn't clear enough on my previous question. I can see how the syntax of a search query works, but I'm not able to modify it, neither at the creation of a dynamic album, nor after the dynamic album is created and I want to modify it (the query field does not allow modifications). So that I can search within 2 fields from the searchbox, but cannot modify the query any further. If it does matter, I'm using zenphoto 1.2.6 (shall I upgrade?).

    M
  • acrylian Administrator, Developer
    Yes, you should upgrade because we are only able to support the current version.
  • You can set the fields when you do the search to those you want in the final album. With the current version of Zenphoto you can select which fields (including EXIF/IPTC ones) will be allowed in the search, so there should be no need to modify them later. {also, the named fields is not available to you in 1.2.6!)

    So, yes, you should upgrade.

    If you really want to edit the dynamic album, everything is stored in the .alb file. You can edit that with a text editor.
  • OK, I'll do that! (upgrade and edit the .alb file if needed)

    Thanks again,
    M
Sign In or Register to comment.