Ticket #184 (new enhancement)

Opened 07/09/08 18:23:35 (3 months ago)

Last modified 08/28/08 16:01:58 (6 weeks ago)

Flexible + dynamic collection / album layout

Reported by: sidtheduck Owned by: sidtheduck
Priority: normal Milestone: 2.0
Component: General Version:
Severity: normal Keywords:
Cc:

Description (last modified by sidtheduck) (diff)

Currently, Plogger is set up as a rigid system using collections and albums

      main collection
       /          \
  collection   collection
      |            |
    album        album
      |            |
   pictures     pictures

I would like Plogger to move in the direction of a more liquid, flexible layout that still utilizes Collections and Albums, it just extends it.

Before: Collections housed Albums -> Albums housed Pictures
Proposed: Collections house Albums OR Collections -> Albums still house Pictures

        main collection
        /      |      \
collection   album   collection
    |          |          |
  album	    pictures collection
    |                     |
 pictures               album
                          |
                       pictures

jammindice started something like this from this forum post but his logic add another table to Plogger and only allows 5 levels deep (which should be good in most people's cases).

However, I think it could be accomplished much easier by setting the "base collection" (the collections.php file) as id=0. Then add an SQL column in the plogger_collections table for "parent_id" (much like the plogger_album table). The full path for collections + albums could be stored in the "path" column (much like the plogger_pictures table) and let it sort out that way.

I know this is a large undertaking, but I really think it would be great to have the flexibility (i.e. if some people only have 1 album or if people want to go 3 levels deep, etc.). From my initial thinking there will be more issues with the admin backend than with the gallery front end (mostly in the "Manage" tab). Also, we will have to re-work how the count is displayed (i.e. this collection contains 9 albums will now be this collection contains 2 collections and 7 albums).

What do others think? Should I undertake this re-work to make it part of the core, or is everyone happy with the rigid structure as is?

Attachments

truncate_album_collection_fix.patch (7.7 kB) - added by sidtheduck 3 months ago.

Change History

Changed 07/11/08 15:45:11 (3 months ago) by sidtheduck

As a temporary fix for the current Plogger codebase, I've attached the patch "truncate_album_collection_fix" for r556. This patched code will automatically truncate the levels of Plogger if only 1 album or only 1 collection is available. If you only have one album that has photos in it, Plogger will navigate directly to the album and truncate the breadcrumbs automatically. Same happens if you have multiple albums but only one collection (it will navigate to the collection level).

This doesn't really "fix" the ticket per se, since Plogger still has the rigid level system, but takes an initial step in the direction that some forum members are asking about (here and here and here for example). I may try to take it a step futher and bypass the "collection" level if only one album exists in the collection (see discussion on last link above).

Changed 07/11/08 18:24:35 (3 months ago) by sidtheduck

Changed 07/11/08 18:25:21 (3 months ago) by sidtheduck

  • keywords has-patch needs-testing added

Changed 07/15/08 03:32:39 (3 months ago) by _Eric_

  • description modified (diff)

Patch tested and confirmed working.

Changed 07/15/08 14:10:42 (3 months ago) by sidtheduck

  • keywords needs-patch added; has-patch needs-testing removed
  • description modified (diff)

Added the patched code to r559.

This still needs a full restructuring in my mind, but I would like to hear what others have to say on the matter as well.

Changed 08/26/08 13:18:13 (6 weeks ago) by sidtheduck

In thinking more on this, I can think of 3 ways to accomplish similar concepts.

1. Keep most everything as-is, but allow albums to be placed within the "root collection" (collection_id=0 in database). The whole album would only allow 0, 1, or 2 levels deep (which should be enough for most everyone).

2. Keep the concept of "albums" and "collections", but alter the definition of "collections" to allow housing of albums and/or collections while "albums" stay the same housing only pictures. Albums could be changed to collections and vice-versa, but only if there were no pictures within that album (keeps containers and pictures separate from each other to keep a cleaner display).

3. Set up the whole system like a folder / file system (similar to Zenphoto or Gallery2) and allow "albums/collections" to house both containers and pictures. Output would be displayed with containers first and pictures second.

Just trying to get input from people. This could possibly be a change in the theory of Plogger. Collections and albums sets us apart from other gallery software, so #'s 1 and 2 both follow the same theory where #3 alters that theory. #2 may not be as straightforward for users to understand since (I think) they would want it to either be a set maximum level deep or have it function like a folder / file system.

Thoughts?

Changed 08/28/08 16:01:58 (6 weeks ago) by ryanduff

  • keywords needs-patch removed
Note: See TracTickets for help on using tickets.