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
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."
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?
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.
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.
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.
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.
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.
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!
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?
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?
I don't have the experience to to the Java stuff. I'd really appreciate your involvement in this.