Jump to content






Photo
* * * * * 1 votes

Gallery 4 - Structural Changes

Posted by Matt , in Gallery, Beta 22 September 2010 · 1,302 views

Following on from my manifesto blog entry, I wanted to discuss some of the changes to structure that Gallery 4.0 introduces and explain why we have made those changes.

This blog entry does get a little technical, but even if you are not a technical person, please bear with me and feel free to skip over sections that are not relevant to you. I feel it is important to explain in detail the challenges faced when re-writing Gallery.

Overview
I want to completely re-focus Gallery and make the media the center of the application. I want users to view the images without being so concerned as to where they belong. I want to focus on organic discovery over being forced to browse pages of user albums or pages of categories.

The Problem
Although competent, it's no secret that the current Gallery has become a little confusing and over complicated. Over the years features and settings have been added too appease a small demand that has undermined the "flow" of the product. I have reviewed a lot of our customer's gallery installations and in most cases a lot of the more complex functionality in Gallery is not being utilised.

For example, the current Gallery allows for very complex permission based hierarchical structures that mixes albums and categories. Programatically, this is incredibly hard to maintain and almost impossible to work with beyond a superficial level.

Consider the following:
- Category A (Global viewing permission)
-- Category B (Restricted viewing permission)
----User Album A (Public)
------ User Album B (Private)

This allows for great flexibility but a severe cost to code maintenance and efficiency. The only way to fetch images that the current user has permission to view is by loading all the categories and albums into memory and iterating over each; testing view permissions and finally constructing a large list of permissible IDs which is passed into an SQL query. This is an "expensive" operation and once you get past 10,000 albums you quickly run into issues with MySQL not being able to parse the query as it is too large. This is a wall and the current model allows for no way around it.

The Solution
Categories and albums are almost alike. They are both containers that can accept uploads. For this reason, I have merged them into a more pragmatic "albums" model.

Administrators can set up "Global Albums". These behave much like categories used to in that you can set them to be containers only or allow uploads. You can restrict access permission based on member permissions much like you do with forums.

Users can create "Albums". These are almost identical to the current user albums in that they can be set to "Public", "Private" or "Friend Only". These are no longer restricted to the 'Members' category or being children of categories. They are created at "root" level and are not included in the hierarchy unless attached to a category.

This creates two different spaces. The Admin defined strict hierarchy and a more social public space.

There are hard rules on user created album use and the software deliberately restricts the freedom of use so that order is maintained and a simple flowing permission model is employed. In practical use, you shouldn't notice these limits but the code is much simpler if you box in their usage.

When creating a user album, you can elect to attach it to a category. When you do attach it to a category, it automatically inherits the permission of the parent category. You will be unable to set it to friend only or private. You cannot attach a sub-album to an album attached to a category.

- Category A
---- Category B
------ User Album X (Inherits permission from Category B)

This small change makes selecting images much simpler as you do not have to consider a dozen different possible permutations. We can now cache permissions with the image which makes selecting them outside of an album a quick and efficient task. This allows us to quickly query "streams" of images without having to learn about their album which frees up what we can do with the interface.

I will begin to reveal more specific interface implementation over the coming weeks.

Please let me know if you have any questions!

  • Mouseman likes this



This small change makes selecting images much simpler as you do not have to consider a dozen different possible permutations. We can now cache permissions with the image which makes selecting them outside of an album a quick and efficient task. This allows us to quickly query "streams" of images without having to learn about their album which frees up what we can do with the interface.


Persumably meaning that adding something to select images from the forum in post reply would be a lot easier to achieve? ;) :P

Excellent work there Matt btw
    • Ikadon likes this
It's now possible to have shared albums?

I do not want my members to create albums. I want to be creating 5 or 6 and allow members to upload their photos to these predetermined albums or categories.

Will it be possible?
    • Ran Yefet, JMO, °rret and 3 others like this
Looks great! This may influence me to purchase Gallery :)

What is the oldest version of IP.Board this will be compatible with? I'm assuming my install running on 3.1.0 will not be able to run this?
I also need the Shared Album feature.
In our community we have events and meetings and we have 2-3 photographers.
I want that all the photographers will have access to upload their photos into the same album.
    • °rret and Ikadon like this
Ran, I guess you would create a new user group called 'photographers' and restict the category upload permissions to that group.

Matt, good job on simplifying the gallery, its way over due. I've been trying to get my members to use it, but thats pretty difficult when you don't understand what on earth is going on in the first place!

Ran, I guess you would create a new user group called 'photographers' and restict the category upload permissions to that group.

Yes, but each photographer need to create a new album in that category. If the admin can create a album called "Event XPTO" in category "Events" to all usergroup 'photographers' we are very happy! :rolleyes:

Yes, but each photographer need to create a new album in that category. If the admin can create a album called "Event XPTO" in category "Events" to all usergroup 'photographers' we are very happy! :rolleyes:

http://community.invisionpower.com/topic/321305-calling-all-gallery-owners/page__view__findpost__p__2019710

Read #3.

If you want such a feature, you'll need to endorse that request and help convince Matt to include it. :)
    • Ran Yefet and JMO like this
I just hope IP.Gallery 4 has the "click on image to advance to next image" feature... that is my biggest complaint.
    • The Old Man likes this
I hope so too. I like the advance image arrows that show up in post attachments but clicking image to progress (or use arrow keys) would be sweet.
    • The Old Man and SkimPappa like this
Photo
The Old Man
Sep 23 2010 12:27 PM
Shared albums would make like a lot easier for me too.
    • Ran Yefet and JMO like this
Hurray for keyboard arrow key navigation....
This looks great. +1 for shared. Shared albums would make this mod a hit w/many communities. We have very few users that will opt to keep an album updated on their own, but would be great contributors.
Just "Make it like FaceBook" and call it a day ha ha ha!

But all seriousness, I do like facebook method but a more neutral solution could be modeled after Flickr. I love the streams, sets and galleries as well the different size resolutions that pics are available for view and download. But for sure I agree with the masses that I am worn out on all the page refreshes to view next pic and etc... That's faecess old.
In fact, I think all albums should be viewed from profile page tbh... And public gallery would not include any albums if that makes sense. I rather view a members profiles and see his pics there instead of weeding through pics in neverland. :)
This will be great for WDF and showcasing :)

Nice work :)

April 2014

S M T W T F S
  12345
6789101112
13141516171819
202122 23 242526
27282930   

Recent Entries

Latest Visitors

  • Photo
    zbahadir
    32 minutes ago
  • Photo
    Tricky Nicky
    52 minutes ago
  • Photo
    Tom Christian
    Today, 05:17 PM
  • Photo
    mojeda
    Today, 05:17 PM
  • Photo
    lcs_lex
    Today, 04:38 PM
  • Photo
    Alucard0134
    Today, 04:32 PM
  • Photo
    Ma├źlien Goarin
    Today, 04:29 PM
  • Photo
    NewRockRabbit
    Today, 04:28 PM
  • Photo
    szczepixpl
    Today, 04:23 PM
  • Photo
    4bdul
    Today, 04:19 PM

Recent Comments

Search My Blog