Subalbum Administration

I have attached a patch to Track Ticket #6 (http://www.zenphoto.org/trac/ticket/6) implementing Subalbum Administration.

There is one feature (not strictly a subalbum admin issue) that is not implemented in this interface that I could use some advice on. It should be possible to select an image from any album to be the thumbnail of an album. At present you can select only form the images in the album. This is done via a dropdown list that is populated with the album images.

I have already released a patch which provides the underlaying implementation for this feature. What is need is the Admin interface.

What I would like to see is another dropdown list which contains the album list. (I know how to do this.) When you select an album from this list the list of images should be repopulated from the images in the selected album. This is what I do not know how to do.

So, if anyone can help me out, I would appreciate it.

Comments

  • AWESOME! Best fix/upgrade/patch since Tris stopped updating. I just tested it out and it works really well. Thank you for doing this one, it really makes a difference with usage.

    One error I did get was when I click on a album containing subalbums. The parent album is named "Events & Parties" which creates the url: admin.php?page=edit&album=Events%20&%20Partys

    The error I get is: "The album cannot be found."
  • acrylian Administrator, Developer
    Absolutly great!!! That was the number 1 function I was waiting for!! Thanks sbillard.

    I don't understand why I would want to select an image from another album as a album thumb. The album thumb should give you a hint what's in an album. So wouldn't be disturbing if the shown image is not included in the album? Or did I missunderstand you?

    Minor suggestions: A subalbum edit link right next to the parent album name in the album list would be nice (sort of: "albumname (2 subalbums - Edit subalbums)"). If you have many images in your parent album and a few more subalbums it could get a little crowded if you list both on one page.

    And of course we need the possibility to upload directly into the subalbums via admin. I have made a jumpmenu as an addition to my album menu function (wanted to release an update soon, now I can now update the update...:-)) which lists subalbum of course, maybe that could help in any way?
  • aitf311: I know what is wrong with your problem. I'll fix it as soon as I can.

    acrylian: I am not sure exactly what you are asking for. If it is a separate page for the subalbum list, then my answer is "not at this time". The way (as I understand it) that the admin stuff works makes it very hard to separate out the stuff.

    I guess I could insert a bookmark link up at the top, though.
  • trisweb Administrator
    Great stuff, I'll make some time this weekend to get this integrated!

    I never thought of using the current admin to integrate subalbums, I always thought it was such a mess that it'd be better to rewrite it. I still think a rewrite needs to happen, but this will certainly work great in the meantime.

    Isn't it cool that the subalbum representation (album folder string) is inherently compatible with the whole app? I think that's a nice coincidence. :)
  • acrylian Administrator, Developer
    sbillard: Yes, basically I meant a separate subalbum page...sorry, that it came out a little confusing...
  • acrylian:

    Well, sorry, no separate page. However I have updated the patch to add bookmarks and links so you can skip back and forth between the Image list and the Album list.

    trisweb:

    Yes, the admin interface needs a rewrite. I'm not up to that, though.

    aitf311, trisweb:

    The problem with the "&" in the folder name is beyond me. I tried doing urlencode/decode on the parameters and ended up with a url that was a partial encode. I am not sure where it came from. I was testing the album delete on an album named "test & check". The parameter to confirmDeleteImage looked right: "test+%26+check", but I got a "file not found" with a url that was "test+&+check".

    Anyway, I have updated the patch with the bookmark addition.
  • Regarding selecting an image from another album.

    My primary reason is that I have albums which contain only subalbums. Still, I want to assign the thumbnail for the parent album rather than have one chosen at random. For this I assign an image from one of the subalbums. See http://albums.sbillard.org/China 2007/ I do this in phpMyAdmin right now but I would like the admin interface to be able to handle the chore.
  • acrylian Administrator, Developer
    sbillard: The bookmark link is a very good idea. When I think about, the current solution is really good if you use subalbums like you do on your site. In fact I plan to do it a simmilar way on mine. So now I understand perfectly why you want to assign a picture from another album. Good idea.

    According admin interface: You both do mean primarly the code, don't you? I can't really judge this in detail, but in my opinion the admin interface is quite good from the usability point of view. Very clear and straightforward.
  • trisweb Administrator
    acrylian - yes, primarily the code needs a rewrite. It's essentially a whole application (the administration application) stuffed into two PHP files, which is not a good thing. Other than that, I would like a better interface for getting to and browsing the subalbums, if possible. And a few other little tweaks.

    But yeah, I didn't plan to change the UI that much.

    This is looking good, I tried it out today. I think the page needs slightly better organization perhaps, but other than that it's great. Thanks Stephen!
  • trisweb:

    I ended up putting the subalbums at the end because of the form/post stuff. It was just easier that way.

    Have you any thoughts on how to implement setting the album thumb to an image in another album?
  • trisweb Administrator
    A tree-style selector makes sense interface-wise. Expand the branches until you arrive at the image you want to use. Then any sub image could be used as the thumb for any album.

    Implementing that could be a bit tricky, but you can imagine several ways, most having Javascript to make it work.

    1) A select menu of images + subalbums (like the current) .. if a subalbum is selected, display the subalbum's selectbox below and open it. (AJAX would be best used here so you don't have to initially load the whole folder/image tree). Recurse.

    2) An "expanded select" image selector with little + or > arrows next to subalbums, which expand the subalbum trees. Select any image at any level.

    3) Mac OS-X style folder selection, where selecting a folder opens the subfolder to the right, showing again images and subalbums. Rinse, lather, recurse.

    4) ??? Any number of possibilities.

    All of these would set a hidden field with the value of the image folder+filename to use, which would then be stored in the db.

    I prefer #2, it'd be a sort of custom widget, but not difficult to implement given Scriptaculous's list controls. If we want to stick to regular old HTML widgets, then the cascading select boxes would work as in #1.

    I could implement this sometime soon. We'll discuss at the meeting. Is there a Trac ticket?
  • No separate ticket. Just a comment on ticket #6

    I don't have the experience to to the Java stuff. I'd really appreciate your involvement in this.
Sign In or Register to comment.