Managing Multiple Media Galleries in Sueetie v2.2

One of the huge new features of Roger Martin’s Gallery Server Pro 2.4.4 is multiple media galleries, and I jumped all over it.  At sueetie.com there are two media galleries: Sueetie Screenshots and Document Library.  While only scratching the surface, this is an example of multiple media galleries now available in Sueetie Version 2.2.

Gallery Server Pro handles all the complicated behind-the-scenes issues. What we’re doing in Sueetie is creating a Sueetie Gallery Object so that we can access content from any gallery outside of Gallery Server Pro, correctly identify it in Sueetie reporting like in the Site Activity Report, and apply Custom Sueetie Features like Sueetie Document View on a gallery-by-gallery basis.

If you go to Sueetie.com you’ll see that the Sueetie Screenshots gallery displays by thumbnail image while the Document Library displays by Sueetie Document View. 

Something else that’s very cool in Version 2.2 is how Sueetie records media activity by gallery as you can see in this Site Activity report listing.  All Screenshots gallery and Document Library gallery activity is recorded accurately by gallery.

To help Sueetie v2.2 users get up to speed on multiple media galleries, below is a new How-To Guide in the Sueetie Wiki on Creating Media Galleries in Sueetie.

___________________

Process Overview

Multiple Galleries were made possible with the release of Gallery Server Pro v2.4.4 and its inclusion in Sueetie v2.2. Galleries are first created in Gallery Server Pro, then given properties in Sueetie Administration so that Sueetie can use the gallery-specific information to properly record and display the gallery outside of the Gallery Server Pro application.

The process includes 1) Creating the Gallery in Gallery Server Pro, 2) Adding Sueetie properties to the gallery in Sueetie Administration, and 3) using gallery-specific urls to access the library.

Create the Gallery in Gallery Server Pro

The Gallery Server Pro Gallery Manager lists the Sueetie.com galleries on the initial release of Sueetie v2.2. The two galleries are "Sueetie Screenshots" and "Document Library." Each gallery has a unique ID (in blue.) It’s important to use this ID in the gallery’s media storage location as you can see at right in orange. /media/gs/mediaobjects/[GalleryID/

Image

The Gallery’s Media Storage location is set on the gallery’s Media Objects – General panel.

Image

Add Sueetie Properties to the Gallery in Sueetie Administration

To integrate the gallery into the Sueetie framework for activity reporting and other custom features, we need to assign Sueetie-specific properties to the gallery. Below is the Sueetie Gallery Administration page, added in Sueetie v2.2.

Image

Each gallery has a unique Sueetie Gallery Key. The gallery key is also the name of the .ASPX page used to display that particular gallery in Gallery Server Pro. For instance, the gallery key for the Document Library is "library," so the page used to access the Document Library is /media/library.aspx. This url is used so that Sueetie knows which library it is displaying for adding custom features like Sueetie Document View.

The "IsPublic" Sueetie Gallery property is not currently used, while the "IsLogged" specifies whether activity in the Gallery is logged to the Sueetie Site Activity Log.

Regarding Site Activity Logging, gallery events are now recorded by gallery. You can see in the Sueetie.com activity logs below that events in Sueetie Screenshots is distinguished from those in the Document Library.

Image

Gallery-specific Urls

As we mentioned earlier, each gallery’s unique gallery key identifies its working url. For instance, the "library" gallery key uses a working url of /media/library.aspx. This serves several purposes, one of which is so that Sueetie knows which gallery is being displayed for adding Sueetie enhancements. It also tells Gallery Server Pro which gallery to retrieve (when no "aid" query string is present, but that’s a technical side point.)

In other words, whenever you create a new media gallery you will create a new .ASPX file (copy /media/default.aspx and change the GalleryId property.) Here is the library.aspx file for the Document Library gallery using the library’s GalleryID of "5."

<asp:Content ID="Content1" ContentPlaceHolderID="cphBody" runat="Server">
    <asp:ScriptManager ID="sm" runat="server"         
          EnableScriptGlobalization="true" />
     <gsp:Gallery ID="g" runat="server" GalleryId="5"  />
</asp:Content>

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.