At the highest level, Gallery 3 is a single album that can contain other albums, photos and movies. Each contained album has its own separate title, description and other metadata and is controlled by a set of permissions. There is one single album at the top of the entire hierarchy, which is called the root album. Photos, movies and albums can be moved around inside the hierarchy.
Gallery 3 stores its data files in the gallery3/var/albums directory. Photos and movies have an associated data file while albums are associated with a directory. The gallery3/var/albums directory is maintained so that it always represents the same structure that is visible via the web interface. This makes it easy to understand the data structure and allows other applications to inter-operate with the data you store in Gallery 3.
Every album, photo and movie has a thumbnail which is a small, automatically generated graphical representation of that item. In the case of photos and movies, this is usually a scaled down version of the photo or the first frame of the movie. However album thumbnails are derived from the album cover which is a photo, movie or album chosen to represent the album.
Since photos are typically very large, they have a resize which is an intermediary version of the image that is more detailed than the thumbnail but still viewable in the web browser. There is a single resize version for each photo. Movies and albums do not have a resize.
For more information on the metadata that’s associated with an individual album, photo or movie see the Models section below.
In Gallery 3 a user is a representation of a real world person. Individual users can log in to Gallery 3 with a password and be granted special permissions. Visitors who do not log in as a specific user are automatically assigned as the guest user. Users have an associated username, email address and an optional full name and URL.
There are three types of users in the system:
Groups are collections of users which allow Gallery 3 administrators to treat many users in a similar fashion easily. Each group has an associated name, and Gallery 3 administrators can create, delete and rename groups to their liking. By default there are two special groups in Gallery 3 that cannot be deleted (though they can be renamed):
Each album in Gallery 3 has an associated set of permissions that govern what groups of users can do with the album and its contents. Permissions operate at the intersection of albums and groups - this means that administrators can allow a group to take a specific action with an album. You can not assign a permission specifically to a photo or a movie, and you can not assign a permission to a single user. In both cases, you must wrap the photo or movie in an album or wrap the single user in a group before assigning permissions. Imposing this limitation has had significant positive impact on performance, code comprehension and code size. However note that there are several proposals to broaden the permission model in the upcoming 3.1 release.