Gallery Server Pro supports multiple galleries. A gallery encompasses all the media objects associated with a single web application. Each web application has one gallery. However, there can be multiple installations of Gallery Server Pro on a web server, with each specifying a different gallery.
The albums and media objects within each gallery are not visible to other galleries. The list of user accounts and roles can be shared across galleries or separated depending on your requirements. A single SQL Server database can store data for an unlimited number of galleries.
Gallery Server Pro 2.3 Administrator’s Guide Page 187 of 238 Galleries are useful for setting up hosted solutions where individuals require administrative permission to separate groups of media objects. They are also useful when site-wide settings, such as watermarking, need to be applied to multiple groups of albums and media objects.
For example, one can set up a gallery at http://www.yoursite.com/robert/ and another at
http://www.yoursite.com/susan/. Each gallery is set up with its own membership, where user Robert is the administrator for his site and user Susan is the administrator for the other. Robert and Susan manage each of their galleries, but neither has permission to the other gallery. Robert cannot view any of Susan’s media objects from his URL http://www.yoursite.com/robert/ and vice versa. Robert can enable any site-wide setting such as watermarking and thumbnail length without affecting Susan’s site.
Even though the two sites appear as completely separate web applications, both can share the same data store. This simplifies the management of Gallery Server Pro, and offers greater value to customers who pay hosting providers on a per-database policy.
By default, Gallery Server Pro is installed with a gallery ID = 1. The gallery ID is managed on the Site settings – General page in the Site administration console.
SQLite users
The concept of galleries is useful when groups of media objects must be kept separate and the data must be stored in a single SQL Server database.
Starting with 2.1, you can store data in a SQLite database that is locally stored within the web
application. Since each web application has its own SQLite database (and therefore list of user accounts and gallery data), it is not necessary to follow these directions for creating multiple galleries. Instead, just run the install wizard in each web application. Each web application is completely self contained and does not have access to the other.
If you want to share a single set of user accounts across multiple web applications, then use SQL Server or store your SQLite database file in a shared location and then update your web.config file in each web application to point to this file (galleryserverpro_data.sqlite).
SQL Server users
To set up an additional instance of Gallery Server Pro to use a different gallery than the default, follow these steps.
1. Copy the web application files for Gallery Server Pro from the original instance and save them to a new location on the web server’s hard drive. Do not copy any media files that may be in the mediaobjects directory.
2. Use IIS to configure the directory as a web application.
3. Open the home page for the new application in a web browser. Log on to the application as an administrator and click Site admin from the Actions menu. The Site Settings - General page appears.
Gallery Server Pro 2.3 Administrator’s Guide Page 188 of 238 4. Change the gallery ID to a new value, such as 2. Click Save changes. Behind the scenes, Gallery
Server Pro updated the galleryId property in the configuration file galleryserverpro.config. 5. Click the root album in the breadcrumb menu (usually named All albums). You will probably see a
screen similar to the following.
* Behind the Scenes* The first time a page is clicked after the galleryserverpro.config file is updated, the Gallery Server Pro web application restarts, using the new values in the config file. Special startup code runs that checks for basic data integrity in the data store. This includes verifying that a record exists in the gallery table for the current gallery (table gs_Gallery), a root album exists in the album table (gs_Album), and that each role is linked to the current gallery (table gs_Role). In this case, when a new gallery ID is specified, Gallery Server Pro will add a record to gs_Gallery, a record to gs_Album, and as many records to gs_Role as there are roles in the roles provider. However, for security reasons, Gallery Server Pro does not give any of the roles permission to the root album, so no accounts will have access to the new gallery until one of the tables is manually updated (explained below).
4. If the message Insufficient permission appears, don’t panic. The security system is working properly. Use SQL Management Studio (SQL 2005/2008) or Enterprise Manager (SQL 2000) to open the table gs_Role in the Gallery Server Pro database.
5. You need to give Administer site permission to a role. Search the records in the table gs_Role until you find one where the FKGalleryId column matches the new gallery ID and the RoleName field contains a role that should have Administer site permission to the new gallery. For this record, set the AllowAdministerSite field to true. (A default installation of Gallery Server Pro creates a role named System Administrator with this permission, so if this role exists in your installation you will look for the record where RoleName = System Administrator and FKGalleryId = 2.)
6. Since Gallery Server Pro uses caching to retain a list of roles and permissions, the cache must be cleared by restarting the web application. This can be done by recycling the application pool in IIS or by entering the text iisreset in a Start-Run dialog box.
Gallery Server Pro 2.3 Administrator’s Guide Page 189 of 238 7. The new gallery is ready to go! Add new albums and media objects. Notice they do not appear in the
original gallery (gallery ID = 1), even though both galleries use the same database.
Note: If your original gallery was configured to store media objects at an absolute path such as C:\MyMedia rather than a relative path such as gs\mediaobjects, then be sure to update the media objects path in the new gallery to a different location. You don't want both galleries storing files in the same directory.
Creating a read-only gallery
Gallery Server Pro helps you share and manage your media collection over the web. In some cases you may not want to allow it to make any changes to your media files. In other words, you want Gallery Server Pro to expose a read-only view of your collection.
When Gallery Server Pro is in read-only mode, users cannot create albums or upload files, nor can they move, copy or delete albums and media objects. In other words, they can't perform any action that modifies the original media files. However, users can synchronize, download, rearrange and edit captions, and administrators can change settings in the Site admin area, including managing users and roles.
A read-only gallery is configured on the Media Objects - General page in the Site admin area, as seen here:
Gallery Server Pro 2.3 Administrator’s Guide Page 190 of 238 There are several requirements that must be met before a gallery can be made read-only:
User albums must be disabled
The directory for the thumbnail and compressed images must be different than the original media objects directory
The option Synchronize directory names with album titles must be disabled
When a gallery is read-only, the only way to add or remove media objects is by manually updating the media objects directory with a tool like Windows Explorer and then running the synchronize function.
Must be disabled
Must be different than original file location
Gallery Server Pro 2.3 Administrator’s Guide Page 191 of 238 If this setting is enabled, it is recommended to configure the IIS application pool identity to have
read-only access to the media objects directory as an additional safeguard. This helps guarantee that the web application cannot manipulate the media files.