Administrator’s Guide Version 2.6 Updated April 11, 2012

Contents at a Glance 1. Welcome ...... 6 2. Installing/Upgrading Gallery Server Pro ...... 8 3. Running Gallery Server Pro ...... 36 4. Working with Albums ...... 40 5. Working with Media Objects ...... 64 6. Working with Galleries ...... 112 7. User Management and Security ...... 120 8. Site Administration ...... 136 9. Membership Configuration ...... 192 10. Data Provider ...... 202 11. Customizing Gallery Server Pro ...... 206 12. Using Internet Information Services (IIS) Manager ...... 212 13. Configuring NTFS Permissions in Microsoft Windows ...... 220 14. Management Tools for SQLite, SQL CE and SQL Server ...... 225 15. How-To: Helpful Tutorials ...... 227 16. Glossary ...... 267

Gallery Server Pro 2.6 Administrator’s Guide Page 2 of 267

Contents 1. Welcome ...... 6 What is new? ...... 6 How Gallery Server Pro works ...... 6 Requirements ...... 7 License ...... 7 Product key ...... 7 Known issues ...... 8 2. Installing/Upgrading Gallery Server Pro ...... 8 Quick Start for new installs ...... 8 Upgrading previous versions ...... 9 Upgrading from Gallery Server Pro 2.5 or 2.6 ...... 11 Upgrading from Gallery Server Pro 2.4...... 11 Upgrading from Gallery Server Pro 2.3...... 12 Upgrading from Gallery Server Pro 2.0 - 2.2 ...... 12 DotNetNuke Module upgrades ...... 13 Installation overview ...... 13 Performing a new installation of Gallery Server Pro, SQL CE ...... 16 Performing a new installation of Gallery Server Pro, SQL Server ...... 22 Troubleshooting the installation or upgrade ...... 33 Uninstalling Gallery Server Pro ...... 35 Install the Gallery Server Pro Binary Pack ...... 35 3. Running Gallery Server Pro ...... 36 Running Gallery Server Pro for the first time ...... 36 Adding albums and media objects...... 39 4. Working with Albums ...... 40 Overview of albums ...... 40 Creating an album...... 41 Edit album information ...... 43 Delete an album ...... 45 Move or copy an album ...... 46 Assign album thumbnail object ...... 46 Synchronize an album ...... 48 Album Ownership ...... 53 User Albums ...... 56 Hiding Albums ...... 61 5. Working with Media Objects ...... 64 Overview of media objects ...... 64 Gallery Server Pro 2.6 Administrator’s Guide Page 3 of 267

Adding media objects ...... 64 Edit captions ...... 77 Download media objects ...... 79 Delete objects ...... 83 Delete original files ...... 85 Move or copy media objects and albums ...... 87 Rearrange objects ...... 90 Rotate objects ...... 90 Watermarking ...... 94 Media object metadata ...... 97 Searching ...... 98 Adding or editing a file/MIME type ...... 99 Rendering media objects in the browser ...... 100 Microsoft Silverlight ...... 106 Flash ...... 107 QuickTime ...... 108 DIVX ...... 109 HTML 5 ...... 110 6. Working with Galleries ...... 112 Overview ...... 112 About multiple galleries...... 112 Every gallery gets its own web page ...... 113 Gallery isolation and user/role security ...... 113 Creating a read-only gallery ...... 118 7. User Management and Security ...... 120 Overview ...... 120 Require everyone to log on ...... 121 Users ...... 122 Roles ...... 127 Self Registration ...... 132 8. Site Administration ...... 136 Overview ...... 136 Site Settings – General ...... 137 Site Settings – Backup and Restore Data ...... 141 Gallery Manager ...... 147 Gallery Settings ...... 148 Gallery Control Settings ...... 152 General – Error Log ...... 157

Gallery Server Pro 2.6 Administrator’s Guide Page 4 of 267

Membership - User Settings ...... 158 Membership – Users ...... 162 Membership – Roles ...... 163 Albums – General ...... 163 Media Objects – General ...... 168 Media Objects – Metadata ...... 177 Media Objects – Media Object Types ...... 180 Media Objects – Images ...... 182 Media Objects – Video & Audio ...... 188 9. Membership Configuration ...... 192 Membership overview ...... 192 New membership in current SQL database ...... 192 Use existing membership schema in current SQL database ...... 193 Use existing membership schema in different SQL database ...... 194 Integrate Gallery Server Pro with Active Directory ...... 195 10. Data Provider ...... 202 About the data provider model ...... 202 Moving data between SQL Server and SQL CE ...... 202 Configuring provider options ...... 203 Create a custom data provider ...... 204 11. Customizing Gallery Server Pro ...... 206 Overview ...... 206 Styling ...... 207 Multi-language support ...... 207 Adding a gallery to an existing web application ...... 210 Opening the source code in Visual Studio ...... 211 12. Using Internet Information Services (IIS) Manager ...... 212 IIS 6 ...... 212 IIS 7 and IIS 7.5 ...... 217 13. Configuring NTFS Permissions in Microsoft Windows ...... 220 14. Management Tools for SQLite, SQL CE and SQL Server ...... 225 Overview ...... 225 SQLite ...... 226 SQL CE ...... 226 SQL Server ...... 226 15. How-To: Helpful Tutorials ...... 227 Overview ...... 227 How-To: Install using Microsoft Web Application Gallery on a web host ...... 227

Gallery Server Pro 2.6 Administrator’s Guide Page 5 of 267

How-To: Convert an existing set of directories and files to a read-only gallery ...... 232 How-To: Set up multiple galleries ...... 236 How-To: Add a slide show to a page ...... 241 How-To: Create a treeview menu...... 246 How-To: Add a gallery to an existing ASP.NET application ...... 250 How-To: Integrate into non-ASP.NET web sites (iframe Method) ...... 264 16. Glossary ...... 267

1. Welcome Gallery Server Pro is a free, open source web application for sharing photos, video, audio, documents and other files. It’s like having your own personal YouTube or Flickr site. It is intended for users who want to share large collections of media objects on their own web site while maintaining a high degree of control.

What is new? View the Release History page (http://www.galleryserverpro.com/releasehistory.aspx) to see full details for each release.

Upgrading from 2.4.5 or earlier? Version 2.4.6 introduces new metadata extraction capabilities. If you are upgrading from an earlier version, your first action should be to re-extract the metadata. Do this by navigating to the root directory and then choosing Synchronize from the Actions menu. Select the recursive and ‘Re-import metadata’ options and then synchronize the gallery.

NOTE: If you previously deleted the high resolution versions of images, DO NOT re-import the metadata! This is because there is no longer any metadata to import – the original image is gone and selecting the option will have the effect of deleting your existing metadata. In this case just do nothing.

How Gallery Server Pro works  Gallery Server Pro is a web application you install on your or your web hosting company's server.  Add your media library by synchronizing your directory containing photos, videos and other media objects with the Gallery Server Pro database. You can also ZIP up your files and upload them.  Gallery Server Pro automatically creates a thumbnail image to represent each media object. If you upload a high resolution image, a bandwidth-friendly, compressed version is created. EXIF, IPTC and other types of metadata are extracted and stored in the database.  Media object files are stored on the local hard drive or a UNC-accessible location such as a NAS device or network share. Metadata about these files, such as width, height, caption, etc. are stored in the database.

Gallery Server Pro 2.6 Administrator’s Guide Page 6 of 267

 When web users browse your albums and media objects, Gallery Server Pro queries the database for the necessary information, and dynamically renders a custom web page. If watermarking is enabled, the watermark is applied to the image before it is sent.

Requirements

Server Requirements:  Microsoft .NET Framework 4.0 or higher  Internet Information Services (IIS) 5.0 or higher or a compatible web server such as UltiDev Cassini Web Server  Optional: SQL Server 2005 or higher, including the free Express versions. It does not have to be installed on your server, but it must be available on the network.  Optional: SMTP server (required for e-mail functionality).  Optional: Full trust. When the gallery is running under full trust, it automatically takes advantage of features available only in full trust, such as real-time feedback during file uploads and enhanced metadata extraction.

Client Requirements:  Any modern web browser (IE 5+, 6+, Firefox, Opera, Safari, Chrome)

License Gallery Server Pro is released under the GNU General Public License, meaning it is freely available for you to use, edit and distribute. Enjoy!

If the open source license is insufficient for your requirements, alternative license structures are available. Use the Support page to describe your needs.

There is a commercial version of Gallery Server Pro available as a DotNetNuke Module that offers flexible, low cost licensing. Go to www.snowcovered.com and search for “Gallery Server”.

Product key Gallery Server Pro is fully functional for the first 30 days. At the end of the trial period, a watermark appears on each image and the Site Admin area becomes read-only. Enter a product key to restore full functionality. The key is free and easily obtained from the Product Key Wizard at www.galleryserverpro.com.

Note: The Web Platform Installer version of Gallery Server Pro acts a little different at the end of the trial period. No functionality is restricted. Instead, an annoying picture of Roger Martin appears on every page of the Site Admin area. Make him go away by entering a product key.

Gallery Server Pro 2.6 Administrator’s Guide Page 7 of 267

The purpose of the product key is simple: to encourage you to return to the web site after a trial period to give you an opportunity to provide financial support.

Gallery Server Pro is supported by your donations. Without them, I must look for work elsewhere, and that takes away from the time I can spend on it. You can help make Gallery Server Pro a success and prove that the open source model works by providing a donation when you request the product key.

To get your product key, go to the Product Key Wizard at www.galleryserverpro.com. If you provide a donation, the wizard will temporarily transfer you to PayPal where you can make a secure donation by credit card or through your bank. Whether or not you provide a donation, you will receive a valid product key at the end of the wizard.

BONUS: I periodically offer free thank you gifts to donors. If a promotion is active, it will be offered in the Product Key Wizard.

Known issues  Internet Explorer 8 and earlier does not support the rounded corners CSS style, so objects appear with square corners.  Due to the technique used to provide drop shadows around images in IE 8 and earlier, media objects are left aligned. They are centered in IE9 and in all other browsers.  When running in IIS 7 or higher, the IIS application pool must be running in Integrated Mode.  A username or role name containing quotation marks cannot be deleted from the Manage Users and Manage Roles pages. This is a limitation of the ComponentArt Grid control.  (Upgrading from 2.3 or earlier) The upgrade wizard imports some, but not all, settings in your galleryserverpro.config file. If you edited this file with a text editor you may find those settings are not imported. In this case they must be manually migrated.  Restoring data to SQL Server using the Restore function requires SQL permissions equivalent to that provided in the db_ddladmin or db_owner roles. You may have to manually configure the SQL user using a tool such as SQL Management Studio to provide this permission prior to using the Restore feature.  Support for upgrading from Gallery Server Pro 1.0 was removed in 2.4. To upgrade from this version, first upgrade to 2.3 and then upgrade to the current version.

2. Installing/Upgrading Gallery Server Pro

Quick Start for new installs If you don’t have much experience installing web apps, skip everything else in this chapter and just read this.

Gallery Server Pro 2.6 Administrator’s Guide Page 8 of 267

To install Gallery Server Pro on your own web server – Go to the Download page and click the link for the Web Platform Installer version. A wizard will guide you through the process. Ba-da-boom, Ba-da-bing, done.

To install Gallery Server Pro on a hosted site – If your web host supports Microsoft’s Web Application Gallery (WAG), install the gallery through that. If you need a web host, sign up with Arvixe and follow the How-To for installation using WAG on a web host. If your web host does not support WAG, you’ll need to install by following the directions later in this chapter.

DotNetNuke users – Read the section Gallery Server Pro DotNetNuke Module.

Upgrading previous versions Beginning with version 2.5, Gallery Server Pro requires .NET 4.0 or higher. If you are currently running GSP 2.3 or 2.4, upgrade your gallery to .NET 4.0 before upgrading the gallery code to the current version. Technically, you could perform the .NET 4.0 upgrade and the gallery upgrade at the same time, but by separating it into two steps it will be easier to troubleshoot if anything goes wrong.

If you are using GSP 2.0 – 2.2, you must perform the .NET 4.0 upgrade and the gallery upgrade at the same time. The reason is that those versions never shipped with a .NET 4.0 version of web.config, and it is not worth the trouble getting them working under .NET 4.0 only to immediately upgrade to the current version.

Below are step by step directions for upgrading your version of Gallery Server Pro.

Note: If you get an error, temporarily make these two changes to cause detailed messages to be rendered in the browser: (1) Set customErrors=”Off” in web.config (2) Set debug=”true” in web.config

Deleted assemblies and updated web.config When upgrading from 2.4 or earlier, the upgrade wizard automatically removes the cachingConfiguration section in web.config, which is no longer needed. (Caching is now done with the .NET 4.0 MemoryCache class.) It also deletes these DLLs from the bin directory:

 AjaxControlToolkit.dll  System.Data.SQLite.DLL  Microsoft.Practices.EnterpriseLibrary.Caching.dll  Microsoft.Practices.EnterpriseLibrary.Common.dll  Microsoft.Practices.ObjectBuilder.dll  GalleryServerPro.Business.Wpf.dll  GalleryServerPro.Data.SQLite.dll  TechInfoSystems.TracingTools.dll If you integrated the gallery into an existing site that requires one or more of these assemblies, be sure to save a copy and then restore them when the upgrade is complete. Similarly, if your site uses the caching

Gallery Server Pro 2.6 Administrator’s Guide Page 9 of 267

functionality from the Microsoft Enterprise library, you will need to restore the cachingConfiguration section in web.config.

New metadata features Version 2.4.6 introduces new metadata extraction capabilities. If you are upgrading from 2.4.5 or earlier, your first action after upgrading should be to re-extract the metadata. Do this by navigating to the root directory and then choosing Synchronize from the Actions menu. Select the recursive and ‘Re-import metadata’ options and then synchronize the gallery.

NOTE: If you previously deleted the high resolution versions of images, DO NOT re-import the metadata! This is because there is no longer any metadata to import – the original image is gone and selecting the option will have the effect of deleting your existing metadata.

Upgrading in medium trust If you receive a SecurityException when starting the upgrade wizard, try deleting the following files from the bin directory:

 Microsoft.Practices.EnterpriseLibrary.Caching.dll  Microsoft.Practices.EnterpriseLibrary.Common.dll

Then recycle the application pool and try again. While these files are required for the caching system to work, they are not necessary for the upgrade wizard. Version 2.5 and higher does not use them, so there is no need to restore them when the upgrade is complete.

SQL Server 2000 / MSDE no longer supported Gallery Server Pro no longer supports SQL Server 2000 or MSDE. If you are using one of these versions, you must upgrade the database engine before you can upgrade Gallery Server Pro. There is a link to the most recent version of SQL Server Express on the download page.

Upgrading to .NET 4.0 Getting your Gallery Server Pro 2.3 or 2.4 gallery running under .NET 4.0 involves two basic steps. These steps are explained below.

1. Configure IIS to run the application under .NET 4. 2. Update web.config to conform to .NET 4. Note: If you are running Gallery Server Pro 2.2 or earlier, perform the .NET 4.0 upgrade and the gallery upgrade at the same time by following the instructions in the section Upgrading from Gallery Server Pro 2.0 - 2.2. It is technically possible to get those versions working under .NET 4.0, but the tinkering you need to do with the web.config file is – in my opinion – not worth the trouble.

Gallery Server Pro 2.6 Administrator’s Guide Page 10 of 267

Configure IIS to run the application under .NET 4 This step is performed with IIS Manager (type inetmgr in a Start-Run box). For IIS 6, right click the gallery web application and choose Properties. Then click the ASP.NET tab and select 4.0 in the ASP.NET version dropdown box.

For IIS 7 and higher, the .NET version is associated with the application pool the application is running under. In IIS Manager, select the Application Pools node in the treeview, then double-click the relevant application pool in the grid. A dialog appears where you can change the .NET Framework version to 4.0. If you don't know which app pool the gallery is running under, right-click the name of the application in the treeview and select Manage Application - Advanced Settings. This brings up a dialog window that shows the app pool.

If you do not see an option for .NET 4.0, you may need to install it. Use Windows Update to get it.

If you are using a hosting provider, look in your host’s control panel for this setting.

Update web.config to conform to .NET 4 The web.config file, stored in the root of the web application, contains several references to a specific version of .NET. These must be updated to .NET 4.0 references or, in some cases, removed since they are now present in the machine-wide web.config file. Follow these steps:

1. Rename your existing web.config to web_old.config. 2. Grab the relevant web.config from the 2.6 Upgrade Resources download and copy to your web application. For example, if you have version 2.3 with SQLite as your database, use the web.config from the “Files for upgrading from 2.3\SQLite” directory. 3. (SQL Server only) Update the connection string to your SQL Server database in web.config with the one from your previous one (now named web_old.config). It should be named SqlServerDbConnection.

Upgrading from Gallery Server Pro 2.5 or 2.6 1. Make a backup of your web files and database. 2. Copy the upgrade files over the ones in your web application. 3. You are done! Browse to your gallery and confirm you are on the new version by referring to the version number in the site admin area.

Note: The Upgrade Wizard is not displayed when upgrading from 2.5 or higher. The application startup code automatically detects the new version and, if necessary, silently runs a SQL upgrade script to bring the database up to the same version as the application.

Upgrading from Gallery Server Pro 2.4 1. Before starting, update your gallery to .NET 4.0. 2. Make a backup of your web files and database in case anything goes wrong.

Gallery Server Pro 2.6 Administrator’s Guide Page 11 of 267

3. Copy the upgrade files over the ones in your web application and browse to the web site. The upgrade wizard should automatically appear (add “?g=upgrade” to the URL if necessary). 4. Step through the upgrade wizard.

Note: If your data was stored in SQLite, the upgrade wizard will import it to SQL CE. The database file for SQL CE is named GalleryServerPro_Data.sdf and is located in the App_Data directory.

Upgrading from Gallery Server Pro 2.3 1. Before starting, update your gallery to .NET 4.0. 2. Make a backup of your web files and database in case anything goes wrong. 3. Rename galleryserverpro.config to galleryserverpro_old.config (in the gs\config\ directory). 4. Replace System.Data.SQLite.dll in bin directory with the one from the 2.6 Upgrade Resources download (http://www.galleryserverpro.com/download/2.6_UpgradeResources.zip). 5. Copy the upgrade files over the ones in your web application and browse to the web site. The upgrade wizard should automatically appear (add “?g=upgrade” to the URL if necessary). 6. Step through the upgrade wizard.

Note: If your data was stored in SQLite, the upgrade wizard will import it to SQL CE. The database file for SQL CE is named GalleryServerPro_Data.sdf and is located in the App_Data directory.

Upgrading from Gallery Server Pro 2.0 - 2.2 1. Make a backup of your web files and database in case anything goes wrong. 2. Execute SQL scripts against the gallery database to update it to the 2.3 schema. Get the scripts from the 2.6 Upgrade Resources download (http://www.galleryserverpro.com/download/2.6_UpgradeResources.zip).

Which scripts you run depends on the version you are upgrading from:

Upgrading from: Run these scripts: 2.0.2830_to_2.0.2886_upgrade.sql 2.0.2830 2.0.2886_to_2.1.3162_upgrade.sql 2_1_3162_to_2_3_3421_upgrade.sql 2.0.2886_to_2.1.3162_upgrade.sql 2.0.2886, 2.0.2887, or 2.0.2898 2_1_3162_to_2_3_3421_upgrade.sql 2.1.3162 – 2.2.3286 2_1_3162_to_2_3_3421_upgrade.sql

HINT: See the section Management Tools for SQLite and SQL Server for information about tools to help you execute the SQL files.

Gallery Server Pro 2.6 Administrator’s Guide Page 12 of 267

3. Rename galleryserverpro.config to galleryserverpro_old.config (in the gs\config\ directory for 2.2; in the config directory for 2.0-2.1). 4. Rename web.config to web_old.config (in the root of your web application). 5. Retrieve the appropriate web.config from the 2.6 Upgrade Resources download and place it in the root of your web application (that is, place it in the same directory where your old web.config was). For example, if you have version 2.1 with SQL Server as your database, use the web.config from the “Files for upgrading from 2.0 – 2.2\SQL Server” directory. 6. (SQL Server only) Copy connection string from web_old.config to web.config. 7. (2.0 only) Rename connection string from GalleryServerDbConnection to SqlServerDbConnection. 8. Delete global.asax (it is in the same directory as web.config). 9. Replace System.Data.SQLite.dll in bin directory with the one from the 2.6 Upgrade Resources download. 10. Copy the upgrade files over the ones in your web application. 11. (2.0 – 2.1 only) Move galleryserverpro_old.config to the gs\config\ directory. 12. Browse to the web site. The upgrade wizard should automatically appear (add “?g=upgrade” to the URL if necessary). 13. Step through the upgrade wizard.

DotNetNuke Module upgrades Log in as host, go to Host – Module Definitions, and install the Gallery Server Pro module just like the first time you installed it. DotNetNuke will detect it is an upgrade and update your existing installation.

Installation overview There are several versions of Gallery Server Pro available for download:

 Gallery Server Pro DotNetNuke Module  Gallery Server Pro, Web Platform Installer version  Gallery Server Pro web application (pre-compiled, new installs)  Gallery Server Pro web application (pre-compiled, upgrades)  Gallery Server Pro source code (Visual Studio format)

Gallery Server Pro DotNetNuke Module This is a commercial module that provides gallery functionality for DotNetNuke, an open source web content management framework. This guide will not specifically discuss this module, but most of the concepts in this document apply to the DotNetNuke version. Documentation for the module can be downloaded from the Gallery Server Pro DotNetNuke Module Download Page.

Web Platform Installer Version The Web Platform Installer (WPI) version of Gallery Server Pro is the easiest way to get up and running. Just click the install button on the download page and a wizard will guide you through the process. Use this version in the following circumstances:

Gallery Server Pro 2.6 Administrator’s Guide Page 13 of 267

 You have complete access to the web server *OR* the web host supports Microsoft’s Web Application Gallery.

 You have no idea how to set up and configure web applications with IIS Manager – and don’t want to learn

 You prefer a wizard-based install experience

In most cases, the WPI version is the preferred way to install Gallery Server Pro. However, use the pre-compiled version if:

 You want the fastest possible performance

 You are using a hosted environment that does not support Microsoft’s Web Application Gallery.

 You want complete control over every step of the installation

 You are a developer and want to compile from the source code

Note: Some hosting companies allow you to install applications directly from Microsoft’s Web Application Gallery. Gallery Server Pro can also be found there.

Compiled Versions The pre-compiled versions of Gallery Server Pro use a web-based installer to configure the database and initialize the data. The setup process is largely the same whether you are installing it locally or using a hosting provider. The basic steps are:

1. Extract the files from the ZIP and convert the root directory to a web application in IIS.

2. Use your browser to run the web-based installer and step through the wizard.

3. Optional: Install the Gallery Server Pro Binary Pack.

4. You’re done!

Step by step instructions for installing and upgrading are later, but first let's touch on a few topics that may affect your installation:

 Video/audio encoding and advance thumbnail extraction

 Choosing a data provider

 Reduced trust installation

 Integrating with an existing web site

Gallery Server Pro 2.6 Administrator’s Guide Page 14 of 267

Video/audio encoding and advance thumbnail extraction Gallery Server Pro provides advanced media capabilities such as video/audio encoding and thumbnail extraction from videos and a variety of document types. These features require the installation of the Gallery Server Pro Binary Pack. It also requires that the web application be running in full trust.

To configure, first install or upgrade to the latest version of Gallery Server Pro. Then follow the instructions to install the binary pack.

Choosing between SQL CE and SQL Server There are two types of data managed by Gallery Server Pro:

Media files - These are your images, videos, audio files, and documents. The default storage location is the gs\mediaobjects directory in the Gallery Server Pro web application, but you can specify any location on the web server's hard drive or any UNC-accessible location.

Gallery data - Information about the media files, such as captions, width, height, and the album to which they belong, are stored in either a SQL CE or SQL Server database.

The web-based installer will ask you to choose whether to store data in SQL CE or SQL Server.

Microsoft SQL Server Compact (SQL CE) (http://www.microsoft.com/sqlserver/en/us/editions/compact.aspx) is a self-contained, serverless, zero-configuration, transactional, ACID compliant SQL database engine. The data reside in a file named Galleryserverpro_Data.sdf in the App_Data directory of your web application.

Microsoft SQL Server (www.microsoft.com/sqlserver/) is an enterprise class client-server database engine. It is in use by many companies and supported by a large number of web hosting providers.

Most users should choose SQL CE due to its ease of management and potentially lower hosting costs. You may want to use SQL Server if any of the following are true:

 You are comfortable with SQL Server.

 You are already using SQL Server and want to keep all your data in one place.

 You want the fastest possible performance. SQL Server is significantly faster than SQL CE.

 Your installation of Gallery Server Pro is mission-critical and you don’t want to take any chances with your data.

 You have other applications besides the Gallery Server Pro web application interacting with the data file. You may encounter file locking issues and slowed performance as multiple threads wrestle for access to the file. This is a situation where a traditional client-server database such as SQL Server is superior.

Gallery Server Pro 2.6 Administrator’s Guide Page 15 of 267

Reduced trust installation Some hosting providers force .NET applications to run at medium trust. Gallery Server Pro runs well in this environment, but with a few caveats:

 The directory containing the media object files must reside within the web application.

 Some metadata items, such as title, keywords, GPS coordinates, and IPTC data, can only be extracted in full trust.

 The Gallery Server Pro Binary Pack cannot be installed.

Integrating with an existing web site The easiest way to install Gallery Server Pro is as a stand-alone web application living in its own directory. But you can integrate it with an existing web site using one of two techniques:

 (ASP.NET sites only) Add the Gallery Server Pro user control to a page (.aspx) or user control (.ascx) in your web appliction

 Install Gallery Server Pro as a stand-alone application on an ASP.NET-compatible server. Then add an iframe to your existing site that points to this location.

Read more in the section Customizing Gallery Server Pro.

Performing a new installation of Gallery Server Pro, SQL CE Follow these instructions to install Gallery Server Pro using SQL CE as the data store. You can also install the SQL CE version with the Web Platform Installer.

Note: If you get an error, temporarily make these two changes to cause detailed messages to be rendered in the browser: (1) Set customErrors=”Off” in web.config (2) Set debug=”true” in web.config

Set up the web application 1. Download the ZIP file containing the compiled Gallery Server Pro web application from www.galleryserverpro.com. Note: Unblock the ZIP file before extracting the contents. Do this by right-clicking the file, choosing Properties, and then clicking the ‘Unblock’ button on the General tab. If you don’t see this button, then ignore this message.

2. Extract the contents of the zip file to a directory on your web server. For example, C:\inetpub\wwwroot\galleryserverpro\. 3. Use Internet Information Services (IIS) Manager to configure this directory as a web application 4. (IIS 5 and 6 only) Use IIS Manager to make sure the application is running under .NET 4.0 and that the default document is default.aspx.

Gallery Server Pro 2.6 Administrator’s Guide Page 16 of 267

Note: For more information on using IIS Manager, refer to Using Internet Information Services (IIS) Manager.

5. Use Windows Explorer to give the user account IIS is running under modify permission to the web application directory (ex: C:\inetpub\wwwroot\galleryserverpro\). Note: If you are not sure how to do this step, read the section Configuring NTFS Permissions In Microsoft Windows.

Note: Technically, Gallery Server Pro requires modify permission only to the following directories: App_Data and mediaobjects. If desired, you can assign this permission to each of these directories instead of applying them to the parent directory.

Note: Depending on your system and where you install the files, this step may not be needed. You can skip this step for now and come back to it if you receive permission-related errors.

Note: If you are using a hosting provider, follow the process provided by them for performing the above steps. This step is not necessary for some hosting companies, so you can try skipping it for now and only come back to it if you receive an error.

Running the web-based installer 1. Use a web browser to navigate to the gallery. The install wizard should appear. If not, you can manually invoke it by adding “?g=install” to the URL. The screen should look similar to this:

Gallery Server Pro 2.6 Administrator’s Guide Page 17 of 267

2. Click next. Review the license agreement. If you agree to the terms, select the checkbox and click Next.

3. The following screen appears. Select the SQL CE database engine. If you want to use the SQL Server engine, then follow the instructions in the section Performing a new installation of Gallery Server Pro, SQL Server.

Gallery Server Pro 2.6 Administrator’s Guide Page 18 of 267

4. The next step requests the username, password, and email address you would like to use for the administrator account of your new Gallery Server Pro site. You will use this account to log on to Gallery Server Pro to perform administrative tasks. Fill in the fields and click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 19 of 267

5. The final step indicates that all required information has been gathered and it is ready to perform the installation. Click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 20 of 267

6. If the installation was successful, you will see a confirmation message. This page may also specify additional steps you must take to complete the installation. Follow the instructions given. For example, in the screen shot below, the web.config file must be manually updated. Be sure to update the file before clicking the link to go to your gallery. Note: You must manually update web.config when the IIS application pool identity does not have modify permission to the directory containing these files.

Gallery Server Pro 2.6 Administrator’s Guide Page 21 of 267

7. Congratulations! Click the link to go to your new Gallery Server Pro site.

Note: When the wizard finishes, it automatically disables the install and upgrade wizard. To re-enable, change the value of the ENABLE_SETUP hidden field to “true” in install.ascx and upgrade.ascx (in the gs\pages directory).

Performing a new installation of Gallery Server Pro, SQL Server Follow these instructions to install Gallery Server Pro using SQL Server as the data store.

Note: If you get an error, temporarily make these two changes to cause detailed messages to be rendered in the browser: (1) Set customErrors=”Off” in web.config (2) Set debug=”true” in web.config

Set up the web application 1. Download the ZIP file containing the compiled Gallery Server Pro web application from www.galleryserverpro.com. Note: Unblock the ZIP file before extracting the contents. Do this by right-clicking the file, choosing Properties, and then clicking the ‘Unblock’ button on the General tab. If you don’t see this button, then ignore this message.

Gallery Server Pro 2.6 Administrator’s Guide Page 22 of 267

2. Extract the contents of the zip file to a directory on your web server. For example, C:\inetpub\wwwroot\galleryserverpro\. 3. Use Internet Information Services (IIS) Manager to configure this directory as a web application. (Click Start – Run and then type inetmgr to start IIS Manager.) 4. (IIS 5 and 6 only) Use IIS Manager to make sure the application is running under the desired version of ASP.NET (such as ASP.NET 2.0) and that the default document is default.aspx. Note: For more information on using IIS Manager, refer to Using Internet Information Services (IIS) Manager.

5. Use Windows Explorer to give the user account IIS is running under modify permission to the web application directory (ex: C:\inetpub\wwwroot\galleryserverpro\). Note: If you are not sure how to do this step, read the section Configuring NTFS Permissions In Microsoft Windows.

Note: Technically, Gallery Server Pro requires modify permission only to the following directories: App_Data and mediaobjects. If desired, you can assign this permission to each of these directories instead of applying them to the parent directory.

Note: Depending on your system and where you install the files, this step may not be needed. You can skip this step for now and come back to it if you receive permission-related errors.

Note: If you are using a hosting provider, follow the process provided by them for performing the above steps. This step is not necessary for some hosting companies, so you can try skipping it for now and only come back to it if you receive an error.

6. Use a SQL management tool such as SQL Management Studio to create a new, empty database. Note: You can optionally install Gallery Server Pro into an existing database that contains other applications. The only requirement is that there must not be any name conflicts. All database objects in Gallery Server Pro are prefixed with “gs_”, so there is a good chance the tables and stored procedures used by Gallery Server Pro will be unique.

Changing the schema or object name prefix

Database schema – The SQL Server database objects are created with the dbo schema by default. To specify another schema, add an application setting to web.config before running the installer, like this:

...

The schema must already exist in your database. Membership, Roles, and Profile database objects are always created using the dbo schema, regardless of this setting. (This is because the

Gallery Server Pro 2.6 Administrator’s Guide Page 23 of 267

Microsoft-supplied scripts that create these objects hard code dbo and I thought it unwise to change them.)

Object name prefix – The names of all database objects start with “gs_”. You can supply an additional prefix by adding an application setting to web.config before running the installer, like this:

...

In this example, database objects will begin with “GSP_gs_”. (The prefix “gs_” is always present, even when explicitly specifying an object name prefix.)

Running the web-based installer 1. Use a web browser to navigate to the gallery. The install wizard should appear. If not, you can manually invoke it by adding “?g=install” to the URL. The screen should look similar to this:

2. Click next. Review the license agreement. If you agree to the terms, select the checkbox and click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 24 of 267

3. The following screen appears. Select the SQL Server database engine. If you want to use the SQL CE engine, then follow the instructions in the section Performing a new installation of Gallery Server Pro, SQL CE.

Gallery Server Pro 2.6 Administrator’s Guide Page 25 of 267

4. On the next screen, specify the desired SQL Server instance and the security credentials to use to configure the database. The credentials must have permission to create database objects and, if you request a new login be created (see step 6), must be able to create a new login as well. Note: These credentials are used only by the installer and are discarded once the installation is complete. A later step in the wizard will request the connection setting used for normal operation.

Note: The SQL Server database engine does not have to be installed on the web server. As long as the web server can “see” the database, it doesn’t matter where it is. If you are connecting to a local installation, specify (local), 127.0.0.1, or the name of the server. Include the SQL Server instance name if necessary, such as when using SQL Express or when there is more than one instance of SQL Server. The instance name of a default installation of SQL Express on the local server is .\SQLExpress (replace the period with the server name or IP address if it is on another machine, such as MYSERVER\SQLExpress or 192.168.10.100\SQLExpress).

Gallery Server Pro 2.6 Administrator’s Guide Page 26 of 267

5. When you click Next, the installer will attempt to connect. If it is successful, you will see a drop-down list with your database as one of the options. Select your database and click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 27 of 267

6. Specify the account Gallery Server Pro will use to communicate with the database during normal operation. This can be the same account specified earlier, an existing login, or a new SQL login. The credential entered here will be used for the runtime connection string and written into the web.config file in the root of the web application. Note: If you specify a login that does not exist or is not a member of the database you selected, the wizard will attempt to create it during installation.

Gallery Server Pro 2.6 Administrator’s Guide Page 28 of 267

7. The next screen provides installation options. Leave the option “Script ASP.NET Membership” checked unless the database already has the ASP.NET Membership installed or you want to configure Gallery Server Pro to communicate with an external Membership data store. Note: For more information on configuring the membership, see the Membership Configuration section.

Gallery Server Pro 2.6 Administrator’s Guide Page 29 of 267

8. The next step requests the username, password, and email address to use for the administrator account of your new Gallery Server Pro site. You will use this account to log on to Gallery Server Pro to perform administrative tasks. Fill in the fields and click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 30 of 267

9. The final step indicates that all required information has been gathered and it is ready to perform the installation. Click Next.

Gallery Server Pro 2.6 Administrator’s Guide Page 31 of 267

10. If the installation was successful, you will see a confirmation message. This page may also specify additional steps you must take to complete the installation. Follow the instructions given. For example, in the screen shot below, the web.config and galleryserverpro.config files must be manually updated. Be sure to update these files before clicking the link to go to your gallery. Note: You must manually update web.config when the IIS account that the installer is running under does not have “modify” permission to the directory containing these files.

Gallery Server Pro 2.6 Administrator’s Guide Page 32 of 267

11. Congratulations! Click the link to go to your new Gallery Server Pro site.

Note: When the wizard finishes, it automatically disables the install and upgrade wizard. To re-enable, change the value of the ENABLE_SETUP hidden field to “true” in install.ascx and upgrade.ascx (in the gs\pages directory).

Troubleshooting the installation or upgrade

Show detailed error messages You may get this generic error message:

“An error occurred. We are sorry, but Gallery Server Pro encountered an error. It has been logged and, if error reporting is enabled, an email describing the problem has been sent to the administrator.”

To see the detailed error message, do one of these actions:

1. Enable the option on the Gallery Settings page to show detailed information when an error occurs, as seen below, then try again.

Gallery Server Pro 2.6 Administrator’s Guide Page 33 of 267

2. In many cases the error prevents you from getting to the Gallery Settings page, so when this happens, open web.config, set the debug attribute to true, and try again.

3. Review the contents of the gs_AppError table. The error may not be logged if the problem is preventing the error logger from working, so don’t be surprised if it’s not there.

The detailed message will help pinpoint the cause. If you cannot figure it out and want to post a question to the support forum, please copy ALL the text and include it in your post. Remember to search this document and the forum before posting your question.

Insufficient NTFS permissions Depending on your configuration, the IIS application pool identity may need modify permission to the App_Data and \gs\mediaobjects\ directories as well as the web.config file. If you are not sure how to do this, read the section Configuring NTFS Permissions In Microsoft Windows.

SQL Server connection issues There are many reasons why a web application cannot connect to SQL Server:

 Incorrect username/password

 The server name is not entered correctly

 SQL Server was installed with Windows-only authentication and you are specifying a SQL login

Gallery Server Pro 2.6 Administrator’s Guide Page 34 of 267

 You are specifying Windows authentication and the IIS application pool identity has not been added to SQL Server

 A firewall is blocking communication

 SQL Server service is not running

 SQL Server requires a password change before giving a user access

 One or more required protocols are disabled

SQL Server connection issues are commonly discussed on the internet, so perform a web search with the specific error message to learn about the possible causes. Since this is most likely not a problem with Gallery Server Pro, I respectfully ask that you try to resolve the problem on your own rather than submitting a question in the forum. This type of issue is difficult for an outside person to resolve (it is hard enough for the “inside” person).

If you continue to have trouble, consider using SQL CE, which is easier to use for most people.

Uninstalling Gallery Server Pro To uninstall Gallery Server Pro, delete the web application files and the database. You may also want to use IIS Manager to delete the application instance.

Note: Use caution when deleting the mediaobjects directory, since it may contain media files you want to keep!

Install the Gallery Server Pro Binary Pack Gallery Server Pro provides advanced media capabilities such as video/audio encoding and thumbnail extraction from videos and a variety of document types (text files, PDF, EPS, and PSD (Photoshop) files). These features require the installation of the Gallery Server Pro Binary Pack. Below are two albums showing thumbnails generated from a variety of video and document files.

Gallery Server Pro 2.6 Administrator’s Guide Page 35 of 267

These features are made possible through the use of three open source components:

ImageMagick – Creates thumbnail images from EPS, PSD, TXT, and PDF files. It requires GhostScript to be able to create images from EPS and PDF files.

How to install: Copy convert.exe to the bin directory.

GhostScript – GhostScript knows about the internal format of EPS and PDF files.

How to install: Execute the setup program on the web server.

FFmpeg – Creates thumbnail images from video files.

How to install: Copy ffmpeg.exe and libx264-medium.ffpreset to the bin directory.

You can acquire these programs from the sites linked above or from any number of sites that redistribute them. For your convenience, I created a Gallery Server Pro Binary Pack that includes all three. Download it from www.galleryserverpro.com.

Installing these utilities is optional. If they are not present, encoding is not possible and Gallery Server Pro falls back to the default technique of using a generic image for the thumbnail.

NOTE: My experience has demonstrated that you must install the 32-bit version of GhostScript, even when installing on a 64-bit server.

3. Running Gallery Server Pro

Running Gallery Server Pro for the first time The first time you run Gallery Server Pro, a screen similar to the one shown below is displayed.

Gallery Server Pro 2.6 Administrator’s Guide Page 36 of 267

Log in with the administrator account you specified during the installation. An Actions menu appears to the left of the album breadcrumb menu. This menu gives you access to most of the functionality in Gallery Server Pro. Any function the logged on user does not have permission to execute is disabled.

The installer adds an album named Samples and one photo. Click the album to see a thumbnail of the photo. Click the thumbnail of the photo to see a larger version, as shown below.

Gallery Server Pro 2.6 Administrator’s Guide Page 37 of 267

Download objects in ZIP

Show image metadata Start/pause slideshow Delete media object

Download media file Rotate image

Get Copy to another album

Move to another album

Gallery Server Pro 2.6 Administrator’s Guide Page 38 of 267

Notice the toolbar that appears above the photo. Individual buttons are shown or hidden based on the authorization of the current user and whether certain features are enabled. Below is a table that describes the toolbar buttons.

Toolbar button Description

Show image metadata Displays a resizable, movable popup window with metadata, such as EXIF and IPTC, from the image. Does not apply to non-image media objects.

Download media file Download the media file to the user’s computer.

Toggle hi-res image Shows or hides the original, high resolution version of an image, if it exists. This button is hidden when no high resolution image exists or the user does not have permission to view it.

Get permalink Displays a hyperlink that can be used to link directly to the current media object. This is useful because the Next/Previous buttons use AJAX callbacks to load the media object, which does not update the URL in the browser’s address bar.

Start/pause slideshow Starts or pauses a slide show of images in the current album. Slide shows only display images; any video, audio, or documents in the album are skipped.

Move to another album Transfers the current media object to another album. The user is redirected to another page where the destination album can be selected. Not shown if the user does not have permission to move media objects.

Copy to another album Copies the current media object to another album. The user is redirected to another page where the destination album can be selected. Not shown if the user does not have permission to copy media objects.

Rotate image Redirects the user to another page where the image can be rotated. Applies only to images. Not shown if the user does not have permission to edit media objects.

Delete media object Deletes the current media object, including the thumbnail, compressed version (for images), and original media file.

Adding albums and media objects You can add media files into the root album or any child album. Choose Add objects from the Actions menu to add one or more media files. Choose Create album to create a new album.

By default, only JPG and JPEG media files can be added to the gallery. This can be changed on the Media Object Types page in the Site Admin area.

Gallery Server Pro 2.6 Administrator’s Guide Page 39 of 267

There are several ways to add large numbers of albums and media objects in a single operation. Read the section Working with Media Objects for details.

4. Working with Albums

Overview of albums Gallery Server Pro stores media objects in albums, and each album holds zero or more media objects and/or child albums. This is similar to how Windows stores directories and files. In fact, Gallery Server Pro stores albums as directories in the file system, and media objects are stored as files (which makes sense, since they are files.)

Gallery Server Pro starts with one album that serves as a container for all other albums. This top-level album is called the root album and by default is named All albums. This album can never be deleted. Media objects and albums are added to the root album. In turn, each child album can store additional media objects and/or child albums.

There is no limit to the number of media objects and albums one can store, except the limit presented by hard drive space limitations and the operating system for maximum file path length. That is, since some versions of Windows have a maximum file path length of 260 characters, the full path to the album (directory) must be less than this limit.

You must be logged on to perform any action in Gallery Server Pro that modifies albums or media objects. Once logged on, the Actions menu (shown below) is displayed.

Gallery Server Pro 2.6 Administrator’s Guide Page 40 of 267

Note: If the Actions menu does not appear when you are logged on, that means you do not have permission for any of its menu items. In this case, Gallery Server Pro does not render the menu.

Only those menu items that are valid for the current album, and for which the current user has permission, are enabled. For example, if the logged on user does not have Add album permission, the Create album menu item will be disabled.

Creating an album An album is a container that holds one or more media objects and/or child albums. Upon installation Gallery Server Pro has one album named All albums.

To create a new album select Create album from the Actions menu. The following page appears.

Gallery Server Pro 2.6 Administrator’s Guide Page 41 of 267

Step 1: Type the desired name of the album in the Album name field. To make the album private, check the box labeled Private album. Learn more about private albums in the Hiding Albums section.

Step 2: Specify the album to contain the new album. The existing albums are displayed in a tree view. A check box appears next to all albums for which the current user has Add album permission. By default, the album you were viewing when you chose Create album from the Actions menu, is selected.

Note: Only those albums the user has permission to add an album to are shown.

After clicking Create album, the album is created and a screen showing its contents is displayed, as below. It is, of course, empty.

Gallery Server Pro 2.6 Administrator’s Guide Page 42 of 267

Edit album information To edit the information for the albums, select Edit album info from the Actions menu or double click the rectangular area in which the Album’s name, summary and begin and end dates appear, as shown below.

Double click to edit

Note: If nothing happens when you double click in the album area, then you are not logged on or you do not have Edit album permission.

The Edit album box appears as shown below.

Gallery Server Pro 2.6 Administrator’s Guide Page 43 of 267

Fill in the text boxes as desired. All fields are optional. To learn more about private albums see the section Hiding albums. Click Save to return to the album view with the newly entered information displayed.

Note: Learn more about album ownership in the Album Ownership section.

The begin and end date is intended to convey to the user the dates associated with the contents of the album. When not specified, the date label is hidden. It will re-appear if a date is entered.

How album titles correspond to the directory names on the hard disk Recall that each album in Gallery Server Pro has a matching directory in the media objects folder. When an album’s title is changed, Gallery Server Pro modifies the name of the directory for that album to match the title.

This is all well and good, but we have a problem. Most (all?) Windows operating systems cannot handle a directory path longer than 255 characters. Since an album title in Gallery Server Pro can be up to 1000 characters, one could reach this limitation pretty easily. To help prevent this, Gallery Server Pro only uses the first twenty-five characters of the title for the directory name. As a result, you will notice an album with the title “This is a long title for an album” has a directory with the name “This is a long title for ”.

Note: When a gallery is configured as read-only, Gallery Server Pro never changes the files or directory names.

You might want to change this behavior. For example, you may have all your photos in a directory structure with lots of long names, and you don’t want Gallery Server Pro truncating them when you edit the album’s title. There are two settings available to modify this behavior:

Gallery Server Pro 2.6 Administrator’s Guide Page 44 of 267

Synch Album Title And Directory Name – Indicates whether to update the directory name corresponding to an album when the album's title is changed. The default value is true. Setting it to false tells Gallery Server Pro to never alter the directory name. The only exception to this is when Gallery Server Pro has to slightly tweak the name of a directory to prevent a naming conflict. For example, this may happen if you move or copy an album into a directory containing another album with the same name. Adjust this setting on the Media Objects - General page in the Site Admin area.

Default Album Directory Name Length – Gallery Server Pro will truncate directory names longer than this value. The default value is 25, but it can be any value from 1 to 255. This setting is not exposed in the UI. To change it, look in the table gs_GallerySetting and adjust it there.

Delete an album To delete an album, first navigate to the album to be deleted. Choose Delete this album from the Actions menu. The following confirmation page appears.

If you are sure you want to delete the album, click Delete album. The album, all child albums, and all media objects in the album(s) are permanently deleted. There is no undo function, so use caution!

Note: For media objects, both the records in the data store and the media files on the hard drive are permanently deleted.

Note: The current user must have Delete child album permission for the parent album of the album being deleted. If the album contains media objects, they are also deleted, even if the user does not have Delete media object permission.

Gallery Server Pro 2.6 Administrator’s Guide Page 45 of 267

Performance tip: ASP.NET automatically restarts the web application when a directory within the application hierarchy is deleted. This causes a noticeable delay after an album is deleted and may cause errors for other users who are synchronizing, uploading files, or performing other tasks. This, unfortunately, is a "feature" of ASP.NET that occurs when a directory is deleted within the web application. The easiest solution is to place the media objects directory outside the web application (for example, D:\my_media_objects). Read the section Media Objects – General for more information about changing the media objects directory. Another solution is to create a directory junction.

Move or copy an album Albums are copied in the same way that media objects are copied. See Move or copy media objects and albums for instructions.

Assign album thumbnail object Each album has an album thumbnail image. This image is shown whenever an icon representing an album is displayed on a web page. In the screen shot below, there are two albums and two images. The images shown for the two albums are the thumbnail images for that album.

Album thumbnail images

By default, the first media object added to an album is used as the thumbnail image for the album. However, you can choose any media object in the album. To designate an album’s thumbnail image, choose Assign

Gallery Server Pro 2.6 Administrator’s Guide Page 46 of 267

thumbnail from the Actions menu. The media objects are then displayed—each with a radio button underneath, as below.

Select the image you would like to use as the thumbnail image for the album. When you click Assign thumbnail, the image you selected is now set to be displayed whenever an icon view of the album is shown.

NOTE: You must select an image from the current album.

If the image currently set as the thumbnail image for an album is moved or deleted, Gallery Server Pro automatically chooses the next media object in the album as the thumbnail image. If no image is available (because the album is empty), a default image is used. The format and text displayed on the default image can be specified on the Albums – General page in the Site administration console.

Gallery Server Pro 2.6 Administrator’s Guide Page 47 of 267

Synchronize an album Gallery Server Pro maintains two related sets of data – the media files stored in directories on the web server’s hard drive and metadata about those files and albums in the database. If the two sets of data ever get out of synch, you can synchronize the database with the media files on the hard drive to restore data integrity.

When should you synchronize? You might want to synchronize when:

 You just installed Gallery Server Pro and you want to load the database with your entire media library.

 You just extracted a bunch of photos or videos from your digital camera and you want to quickly add them to Gallery Server Pro. You could ZIP them up and use the Add objects menu command, but some people find it easier to copy the media files to the web server and then synchronize.

 You have a read-only gallery and want to add or remove media objects and albums.

 You prefer using FTP to transfer files to the web server. FTP is generally more reliable when dealing with large files.

 You added, moved, copied, or deleted images using Windows Explorer instead of the Gallery Server Pro interface, causing the database to become out of synch with the media files on the web server's hard drive.

 You used a third party program like PhotoShop to alter one or more images, and you want Gallery Server Pro to recreate the thumbnail and compressed images.

In simple terms, the synchronization procedure updates the Gallery Server database with information about the media files on the web server’s hard drive and makes sure the media files have valid thumbnail and compressed versions. Remember that the files themselves are not stored in the database; only metadata about them (size, width, height, etc…)

Synchronizing also ensures the album has a valid album thumbnail image. See the section about setting the album thumbnail image to learn more about what this is.

You can synchronize an album, an album and all child albums, or the entire gallery.

To synchronize an album, navigate to the album you want to synchronize. Then click the Synchronize command from the Actions menu. The following screen appears.

Note: The current user must have Synchronize permission for the album being synchronized.

Gallery Server Pro 2.6 Administrator’s Guide Page 48 of 267

There are four options you can check. They are:

Include child directories (recursive) – When checked, any albums within this album are also synchronized. Recently added directories are added to the gallery as new albums. If the current album does not contain any child albums, this setting has no effect.

Overwrite existing thumbnail images – When checked, new thumbnail images are created when you synchronize the database, even if it means overwriting existing thumbnails. The thumbnails are created from the original media object. If unchecked, a new thumbnail is created only if it doesn't exist. Synchronizing the database will run faster if you leave this option unchecked.

Overwrite existing compressed images – When checked, new compressed images are created when you synchronize the database, even if it means overwriting existing compressed images. The compressed images are created from the original image. If unchecked, a new compressed image is created only if doesn't exist. This setting applies only to images in the gallery. Synchronizing the database will run faster if you leave this option unchecked.

NOTE: Compressed versions of images will exist only for images whose file size is larger than the Compression limit or whose length is larger than the Compressed image length. More information about these settings can be found in the Media Objects – Images section.

Gallery Server Pro 2.6 Administrator’s Guide Page 49 of 267

Re-import metadata for existing images – When checked, metadata that was extracted from images when they were first added to Gallery Server Pro are replaced with the current metadata in the original image file. Metadata includes items such as camera model, shutter speed, title, and keywords. Gallery Server Pro supports the following formats: EXIF, XMP, tEXt, IFD, and IPTC. For example, this is useful if you used a program like Vista Photo Gallery to add keywords to the image files and you want Gallery Server Pro to retrieve this information to aid in searching. This setting has no effect on non-image media objects. More information about image metadata is in the Image metadata section.

Note: Metadata that may exist in the original image files are not replicated to the thumbnail and compressed versions. If you delete the original versions of photos using the Delete high-res images command, that means there is no metadata to extract during subsequent synchronizations. The consequence of this is that checking this option after you have deleted the original images will cause you to lose the metadata that was extracted from the original files. Therefore, it is recommended to leave this option unchecked when you synchronize an album whose original, high resolution photos have been deleted.

When you have selected the desired options, click Synchronize. A popup window like that shown below provides real-time status of the task.

Gallery Server Pro 2.6 Administrator’s Guide Page 50 of 267

A message will indicate when the task is complete, and a Close button will appear on the popup window. Click Close to close the popup window.

NOTE: You can click Cancel to stop a synchronization, but be aware this can cause the database to become out of synch with the media files on the hard drive. If you discover issues after cancelling, start another synchronization and allow it to finish.

Some additional points to remember about synchronizing:

Note: The properties mentioned below in bold can be found on the Media Objects – General page in the Site administration console (i.e. Original file storage location, Thumbnail image storage location, and Compressed image storage location)

 Gallery Server Pro will ignore any file whose type is not enabled on the Media Object Types page in the Site administration console. It also ignores hidden files, even if they are an enabled file type.

Gallery Server Pro 2.6 Administrator’s Guide Page 51 of 267

 Gallery Server Pro ignores any directory it does not have permission to access. This can be used to selectively “hide” directories from the gallery.  Gallery Server Pro NEVER modifies or deletes the original media files during synchronizing. (Rotating is the only function in Gallery Server Pro that modifies the original media file, and that applies only to images.)  Gallery Server Pro searches for media files only in the directory corresponding to the specified album. If the Include child directories option is enabled, then all files below the specified directory will also be synchronized. Gallery Server Pro never searches for or adds media files from outside the Original file storage location.  Thumbnail images are stored in the Thumbnail image storage location. By default, all thumbnail images begin with the prefix zThumb_. If desired, this can be changed on the Media Objects - General page in the Site Admin area.  Compressed images are stored in the Compressed image storage location. By default, all compressed images begin with the prefix zOpt_. If desired, this can be changed on the Media Objects - General page in the Site Admin area.  If the thumbnail or compressed images are ever deleted, they can be recreated by performing a synchronization.  Depending on your web server, Gallery Server Pro typically synchronizes from one to one hundred images per second. Keep in mind that if you have thousands of images, it may take a long time.  Gallery Server Pro does its best to preserve captions and other information you enter about a media object. For example, if you use Windows Explorer to move a media file from one directory to another, and then synchronize the database, Gallery Server Pro will re-link the file with the existing database record, thus preserving the information. (This is done by creating a hash code of the file based on its name and creation date and searching for a matching hash code.) However, Gallery Server Pro does not preserve album information (e.g. the summary and begin/end dates) if you move a directory to another directory outside of the Gallery Server Pro user interface. In general, you should use the Gallery Server Pro web interface when you add, move, copy, and delete media objects and albums.  You can modify any Gallery Server Pro media object in a third party program like PhotoShop without losing the caption or other data you entered, as long as you don’t change the file name or the file’s created date/time stamp. * Behind the Scenes * During a synchronization, database records are inserted, updated and deleted, and compressed and thumbnail versions of media objects are created and/or overwritten on the hard drive. Specifically, synchronizing performs these steps:

1. A table named gs_Synchronize exists in the database to manage the synchronization process. When a synchronization starts, this table is updated so that other users cannot begin a second synchronization until the first one is complete.

2. Starting with the first file Gallery Server Pro finds in the directory representing the specified album, Gallery Server Pro checks its file type to determine if it should be managed by Gallery

Gallery Server Pro 2.6 Administrator’s Guide Page 52 of 267

Server Pro. If it is, it tries to find the corresponding record in its database, based on a hash of the file name and the date/time stamp of when the file was created.

3. If a record is found, it is updated with current information about the file, such as its size and the album to which it belongs.

4. If a record isn’t found, a new media object is created.

5. Gallery Server Pro checks to make sure a thumbnail image exists to represent this media object. If the media object is an image, it verifies a compressed image exists. If not, one is created. If the option Overwrite existing thumbnail image or Overwrite existing compressed image is checked, then new versions are always created, even if it means overwriting an existing compressed or thumbnail image.

6. Gallery Server Pro continues processing each file it finds. If the Include child directories option is checked, then all the album’s subdirectories are recursively processed.

7. If any album or media object records in the data store weren’t updated during this synchronization, then they must not have corresponding media files on the hard disk, and the records are deleted from the data store.

Album Ownership An album owner can add, edit, and delete objects within the album. Think of it as being an administrator of an album.

The permissions an owner has propagate to all child albums and cannot be revoked at a lower level. For example, if an owner can create child albums, he or she can create child albums on those child albums, and so on. This is consistent with the overall security pattern in Gallery Server Pro that permissions always propagate downward.

Only site or gallery administrators can assign a user as the owner of an album. Owners cannot re-assign ownership to another user (unless the owner is an administrator, of course).

Assign the owner of an album on the Edit album info dialog window. The window appears when you select Edit album info from the Actions menu or double click the album title and summary area. The dialog appears as seen here:

Gallery Server Pro 2.6 Administrator’s Guide Page 53 of 267

By default, the owner of an album can add, edit, and delete objects within the album. The permissions given to owners are defined in a role whose name begins with “_Album Owner Template” and can be easily changed using the Manage Roles page in the Site Admin area.

If a user who is the owner of an album is deleted, the album is updated to no longer have an owner.

Multiple ownership for simplified management Only one user at a time can be assigned as the owner of an album. However, child albums can be given a different owner. Since albums always inherit permissions from their parent albums, this has the effect of allowing multiple owners.

For example, above we see that Albin is the owner of an album called Photos. If that album contained a child album Summer Vacation and we brought up the Edit album info dialog, it would look like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 54 of 267

Notice the note about Albin being an inherited owner. If an administrator assigns another user - say, Sam - as the owner of this child album, both Sam and Albin have owner rights to the Summer Vacation album, but only Albin has owner rights to the containing Photos album.

This multiple-owner feature can be used to simplify certain management scenarios. Imagine a gallery configured in a corporate intranet. The system administrator in IT assigns the manager of the marketing department as the owner of the album Marketing Photos. This album has a child album for each employee in the marketing department. Each employee is assigned as the owner of one of the albums.

The manager has full editing permission on all albums in the Marketing Photos album, but each employee can only edit the objects in their album.

Note: A very similar feature - user albums - provides an album for each user and assigns that user as the owner of the album. Using user albums may be a better approach depending on your requirements.

* Behind the Scenes * When a user is assigned as the owner of an album, a new role is created with the user as the sole member. The permissions in the role are copied from the template role. There is one template role for each gallery, and its name begins with “_Album Owner Template”. Note that if the template role is assigned to one or more albums, those albums are also applied to the new role.

Gallery Server Pro 2.6 Administrator’s Guide Page 55 of 267

The name of the role follows this pattern:

Album Owner - {UserName} - {Album Title} (album {album ID})

For example: "Album Owner - Albin - Photos (album 3)"

You can view these roles on the Manage Roles page by selecting the checkbox labeled Show roles that support the album ownership and user album features.

The ownership feature (and the user album feature) is an abstraction of the underlying security model of using roles to limit access to albums. Both of these features manipulate roles behind the scenes to manage the desired level of access for a user.

User Albums

Overview Gallery Server Pro can be used in community scenarios where users automatically receive a personal album they manage. A variety of configuration options are available to satisfy the majority of needs. For example, the following are possible:

 User albums are publicly available for everyone to view, even anonymous users

 Users can add photos to their album, but not other file types such as videos, nor can they create child albums.

 Only logged on users can view albums

 User albums are private and viewable only to each user

 Many more possibilities…

By default, users can perform any function within their album, such as adding and deleting media objects and child albums, rearranging objects, and synchronizing.

These default permissions are stored in a template role. There is one template role for each gallery, and its name begins with “_Album Owner Template”. For example: “_Album Owner Template (Gallery ID 2: 'Engineering')” When a user album is created, the template role for the current gallery is copied and assigned to the user. You can adjust the permissions in this role to change the default permissions users are assigned when their user album is created.

To adjust the permissions a user has for an existing user album, edit the permissions for the role that was created for that user. The role is visible on the Manage Roles page once the option “Show roles that support the album ownership and user album features” is selected.

Gallery Server Pro 2.6 Administrator’s Guide Page 56 of 267

Note: If you don't see the template role on the Manage Roles page, it may not exist. This role is automatically created the first time it is needed. You can trigger its creation by assigning a user as an owner of an album or enabling user albums and navigating to your album.

When user albums are enabled, a user can jump to their personal album by clicking the icon at the top right of every page:

The user album starts out empty. Only the user who owns the album (and administrators, of course) is able to add, edit, and delete objects, unless the administrator has configured a gallery that gives multiple users editing permission to the album that contains the user albums.

Enabling user albums User albums are enabled on the User Settings page in the Site Admin area. This is the relevant portion of that page:

Gallery Server Pro 2.6 Administrator’s Guide Page 57 of 267

There are several configuration options available.

Always redirect to user's album after logging on - When enabled, the user's personal album is displayed each time the user logs on. If the user has disabled the album on their account page, the top level album is displayed.

Album name template - Specifies the template to use for naming the album that is created for new users. The placeholder string {UserName}, if present, is replaced by the user's account name. No other placeholder strings are supported.

Album summary template - Specifies the template to use for the album summary of a newly created user album. No placeholder strings are supported.

User album container album - Specifies the album in which user albums are created. If a different album is selected, existing user albums are not automatically moved. To move them to another album, use the standard functionality for moving albums.

Auto create user albums – Specifies whether a user album is automatically created for a user the first time he or she logs on. Disabling this option can be useful when the user album feature may only be used by a subset of users and you do not want a bunch of empty albums sitting in the user album gallery.

Gallery Server Pro 2.6 Administrator’s Guide Page 58 of 267

When this option is disabled, user albums are not created for users. (If a user album already exists, it is not deleted, however.) If a user wants to enable their personal album, he or she can click the My account link in the top right of the page:

The account page has a section where the user album can be enabled:

When the user checks this box and saves the page, an album is immediately created.

Warning: When a user disables their album, it is permanently deleted and cannot be recovered. Read the next section about deleting user albums for more information.

Note: If you turn off the option to allow a user to manage their account, then only an administrator can enable or disable a user's album on the Manage Users page.

Enable / disable existing user albums The user albums section on the User Settings page allows an administrator to enable or disable user albums for existing users:

Gallery Server Pro 2.6 Administrator’s Guide Page 59 of 267

How is this different than enabling or disabling user albums with the Enable user albums checkbox? The Enable user albums checkbox turns user albums on or off at the gallery level, while the Enable All or Disable All buttons enables or disables user albums at the user level. That is, these buttons update the profile setting of every user, allowing the user or an administrator to subsequently enable or disable user albums on a user by user basis.

For example, you may decide to enable user albums at a time when many users - and their profile records - already exist, but the profile setting does not have the desired value. (Maybe you want each user's album disabled by default but the profile records were created with the EnableUserAlbum setting set to true.) Click the Enable All or Disable All button to update the EnableUserAlbum profile setting to either true (enabled) or false (disabled) for all existing accounts.

IMPORTANT: Clicking either of these buttons will not immediately create or delete any user albums. The next time each user logs on, the validation logic will create or delete the user's album based on the value of their profile setting. When the user's profile specifies a disabled user album and a user album currently exists, the album - and its contents - are permanently deleted. Use with caution!

Note: To improve performance, user profiles are stored in the server's session, which means currently logged on users will not see the effect of you enabling or disabling profiles until the next time their profile is retrieved from the data store. To force your change to take immediate effect, restart the application.

Configuring the visibility of albums Whether or not any album, including user albums, are visible to a person is controlled by two key factors, depending on whether the user is logged on:

Anonymous users – Albums are visible to non-logged on users only when the setting Allow anonymous browsing is enabled (setting is on the Gallery Settings page in the Site Admin area). Disable this option to require users to log on to view objects. See the section Hiding albums from anonymous users for more information.

Logged on users – Albums are visible when a user belongs to a role with view permission to an album. The roles to which a user belongs can be controlled in several ways:

 An administrator manually adds a user to a role.

Gallery Server Pro 2.6 Administrator’s Guide Page 60 of 267

 Self-registration is enabled, and an administrator has specified new users to be automatically assigned to one or more roles.

 An administrator has assigned a user as the owner of an album, which creates a role behind the scene to manage the security access.

For a full discussion of roles, read the Roles section.

Deleting user albums It is important to understand what happens to user albums in various circumstances.

 Deleting a user – When an administrator deletes a user or the user deletes their own account on the account page, the user album is also deleted, including any media objects and child albums it contains. The items are not recoverable.  Disabling user albums at the user level – When a user disables their personal album on the account page, all media objects and child albums in their album are deleted. The items are not recoverable.  Disabling user albums at the gallery level – When an administrator disables user albums on the User Settings page in the Site Admin area, user albums are not deleted, but they are no longer treated as user albums by the gallery - they are just regular albums. If desired, the administrator can delete them through the delete album or delete objects page.  Deleting an album that is a user album – If the delete album or delete objects task on the Actions menu is used to delete a user album, Gallery Server Pro will allow it to be deleted, but the album will be automatically re-created the next time the user who owned that album logs on. Because of this "my album keeps coming back" behavior, this is not the recommended way to get rid of a user album. To delete an individual user album, the user can disable their user album on their account page. To delete all user albums, the administrator can disable user albums at the system level (click Disable All on the User Settings page) and then manually delete them.

Hiding Albums An album can be hidden from anonymous and logged on users so that, from the user’s perspective, the album and any child albums and media objects do not exist. They don’t appear in the browser, cannot be navigated to via URL, and don’t appear in any task pages. However, you can configure individual users to have full access to these albums.

SECURITY WARNING: If your media objects directory is within the web application (which is the default), then users can bypass security by guessing the URLs to the media object (e.g. http://www.site.com/gallery/mediaobjects/photo.jpg). If you wish to prevent this, move the directory outside the web application so that IIS will not serve requests to the objects. Information about changing the media objects directory is in the Media object storage section.

Gallery Server Pro 2.6 Administrator’s Guide Page 61 of 267

Hiding albums from anonymous users To hide all albums from users who are not logged on (anonymous users), disable anonymous browsing for the entire gallery. This is described in the Require everyone to log on section.

To hide an individual album from anonymous users, mark an album as private. This is done in the Edit album popup, which is shown when selecting Edit album info from the Actions menu or double clicking the album title/summary/date area. The Edit album popup appears below.

When an album is private, a small “lock” icon appears next to the album name, as shown below.

Gallery Server Pro 2.6 Administrator’s Guide Page 62 of 267

Private albums have the following features:

 They are never shown to anonymous users.

 The privacy setting of an album applies to all child albums and media objects. You cannot make a child album un-private if its parent is private.

 The privacy setting of an album has no effect for logged on users.

Hiding an album from a logged on user Each user in Gallery Server Pro is a member of one or more roles. Roles are assigned permissions such as View albums / objects, Add albums, and Delete media object.

To make an album invisible to a user, ensure the user does not belong to any roles with View albums / objects permission for the album.

Gallery Server Pro 2.6 Administrator’s Guide Page 63 of 267

5. Working with Media Objects

Overview of media objects A media object is any file or HTML snippet managed by Gallery Server Pro. Typically these are photos, video, audio, and documents, but they can be any file type. The default installation enables JPG and JPEG files. To enable additional types, use the Media Object Types page in the Site administration console.

A media object can also be raw HTML text. This is called an external media object, and can be used to:

 Link to media objects on other servers such as YouTube videos.  Display custom snippets of HTML.  Link to other web pages by embedding other web pages in an iframe HTML . All media objects can be rearranged, moved or copied to another album, deleted and have their captions edited.

Additional features are available for images. Gallery Server Pro extracts metadata such as camera model, shutter speed, and more from images and displays it in a popup window. Gallery Server Pro also provides the ability to apply a watermark to images, run a slide show, and rotate images.

The available functions also depend on the authorization of the logged on user. A user with Administer site permission has unrestricted access to all functions for all albums. A user with restricted access, however, will find particular functions disabled in the Actions menu or toolbar items will be missing from the media object view page.

Any media object - except external media objects - can be downloaded by clicking the Download toolbar item on the media object view page.

Media files are rendered to the browser using HTML defined in templates. For example, .webm files are rendered in a

Adding media objects There are several ways to add media objects to the gallery. Each of these is discussed below.

 Use a web browser to upload individual files.  Use a web browser to add external media objects.  Use a web browser to upload a ZIP file containing multiple files.  Configure Gallery Server Pro to change the media objects directory to an existing directory containing media objects, and then use a web browser to synchronize Gallery Server Pro with the files.

Gallery Server Pro 2.6 Administrator’s Guide Page 64 of 267

 Manually copy files into the Gallery Server Pro media objects directory, then use a web browser to synchronize Gallery Server Pro with the files.

Upload files using a web browser You can add individual media objects to a single album with this technique.

1. Log on to Gallery Server Pro with an account that has permission to add media objects. 2. Navigate to the album to which you want to add media objects. 3. Choose Add objects from the Actions menu. A page similar to the following appears. Note: If you do not see the Actions menu, either you are not logged on or the account under which you are logged on does not have permission to execute any of its commands.

4. Click the Add files button and select one or more files. When a browser supports HTML5 drag and drop, you can drag files onto the file selection window. 5. Optionally select one of the options near the bottom:

Gallery Server Pro 2.6 Administrator’s Guide Page 65 of 267

 Discard original file - When selected, the original file is deleted after the thumbnail and web-optimized versions are created. In browsers that support it, images are compressed before uploading to the server. Administrators can force this option to be always selected through a configuration option on the Media Objects - Images page in the Site Admin area.  Treat ZIP file as media object - When checked, Gallery Server Pro will not extract the contents of any ZIP files that are uploaded. Instead, the ZIP file will be preserved and treated as its own media object. This option will be disabled when the ZIP file extension is disabled on the Media Object Types page in the Site Admin area. 6. Click Add to album. While the files are being transferred to the server, progress indicators display the status. Note: The caption for each object defaults to the file name. For images, if the title metadata item has been specified, that value is used for the caption instead of the file name.

7. When the upload is complete, you will be redirected to the album view page.

About the upload widget The upload control is an open source component named Plupload. It offers several nice features, including:

 HTML 5 drag and drop support  Ability to resize images in the browser  Takes advantage of advanced browser features while gracefully degrading when necessary  Progress feedback in medium trust scenarios  Multiple file selection When the add objects page loads, the upload control detects the browser’s capabilities and chooses the most appropriate runtime, based in this order of preference: HTML5, Silverlight, Flash, BrowserPlus, and HTML4. The runtime is shown in a tooltip when you hover over the upload area, as seen in this screen shot:

Gallery Server Pro 2.6 Administrator’s Guide Page 66 of 267

The exact features available depend on your browser’s capabilities, including whether it has Flash or Silverlight installed. For example, drag and drop works only in Chrome and Firefox. Client side image resizing requires Flash or Silverlight to work in IE.

The upload widget and metadata As mentioned earlier, the upload widget will try to create a compressed version of images in the browser when the ‘Discard original file’ option is selected. This can greatly reduce the amount of time it takes to transfer files to the server.

In most cases, the image’s metadata is copied to the compressed version so that it can be extracted on the server. However, there is one unfortunate exception. The Silverlight implementation, which is often used in Internet Explorer, fails to copy the image’s metadata to the compressed file, resulting in the metadata being lost. There are two workarounds:

1. Do not select the ‘Discard original file’ option when uploading files. Instead, delete the original files after they have been uploaded with the ‘Delete original files’ option in the Actions menu.

2. Modify the file upload’s control definition so that it never uses the Silverlight implementation, or at least prefers the Flash one to the Silverlight one. Do this by opening the file gs\pages\task\addobjects.ascx in a text editor and looking for this line:

runtimes: 'html5,silverlight,flash,browserplus,html4',

Either delete Silverlight from the list or rearrange it to be after Flash.

Add external media objects Note: As a security precaution, a default installation does not allow external media objects to contain HTML. Read the section Security considerations when allowing HTML and javascript in user-entered input to learn how to safely allow HTML to be entered.

Gallery Server Pro 2.6 Administrator’s Guide Page 67 of 267

You can add media objects that refer to objects hosted elsewhere, such as another web site on your intranet or even the internet. These objects are called external media objects and are really nothing more than HTML text that contains anything you want. Typical uses:

 Link to media objects provided as embed code on other servers (e.g. YouTube).  Display custom snippets of HTML.  Link to other web pages by embedding other web pages in an iframe HTML tag. For example, you might upload your videos files to YouTube and then add links to those videos within Gallery Server Pro. Since the videos are streamed straight from the external web site, you save on disk storage and bandwidth costs.

Any web site that offers embed code can be used. A few common ones are YouTube, MSNBC, CNN, Comedy Central's Daily Show, and metacafe.

For example, below is a screenshot of a video on YouTube. Notice, at center right, the embed code. This code can be added to any web site to refer to the original video. Copy this code and paste into Gallery Server Pro to add the video. Although the video appears within the Gallery Server Pro gallery and can be browsed, moved, copied, and deleted, the video is actually stored on - and served from - the YouTube web site.

Follow these instructions to add an external media object:

Gallery Server Pro 2.6 Administrator’s Guide Page 68 of 267

1. Log on to Gallery Server Pro with an account that has permission to add media objects. 2. Navigate to the album to which you want to add media objects. 3. Select the Add objects link from the Actions menu. Click the External Content tab. The screen shown below appears. Note: If you do not see the Actions menu, either you are not logged on or the account under which you are logged on does not have permission to execute any of its commands.

4. Select the type of media object you are adding (audio, image, video, or other). This is used to determine an appropriate thumbnail image for the object. 5. Enter a title. 6. Paste the HTML text into the HTML Fragment / Embed Code textbox. 7. Click Add media object. The media object will be created and shown, as seen here:

Gallery Server Pro 2.6 Administrator’s Guide Page 69 of 267

8. When you click on the thumbnail image, the object will appear:

Gallery Server Pro 2.6 Administrator’s Guide Page 70 of 267

Note: External media objects do not respect the setting for automatically playing video and audio on the Media Objects - Video / Audio / Other page in the Site Admin area. That setting applies only to media files that are uploaded or synchronized in Gallery Server Pro.

Security considerations when allowing HTML and javascript in user-entered input In a default installation, Gallery Server Pro does not allow HTML or javascript to be entered by the user in any textbox. This is the safest way to run your gallery, but it effectively prevents you from creating external media objects.

You can enable HTML input on the Membership - User Settings page in the Site Admin area, as seen here:

Gallery Server Pro 2.6 Administrator’s Guide Page 71 of 267

You can also specify the allowed HTML tags and attributes. The default list does not allow dangerous tags such as

The only way to add this to the gallery is to do three things: (1) enable javascript; (2) add the HTML tag script to the list of allowed tags; (3) add the HTML attribute type to the list of allowed attributes. Doing this makes you vulnerable to an XSS attack, so I do not recommend you use these settings on a long-term basis. However, you can change the settings just long enough to add the code. Then go back to Site admin and revert to the previous settings. The snippet will continue to work, synchronizing won't break it, and your site is still safe.

Forcing the menu to appear above media objects Certain plug-ins, in certain browsers, will render in the browser as the top level object, preventing other objects from displaying above them. For example, in Safari, when you add a YouTube video, the menu appears behind the video, like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 73 of 267

In some cases you can prevent this issue by tweaking the embed code provided by the web site. For example, the default embed code from YouTube looks similar to this:

This code instructs the browser to use the Flash plug-in to play the video. If you know a little about Flash, then you know that you can get a little better behavior by adding a element and a wmode attribute to the tag, like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 74 of 267

When you add a media object with this modified embed code, the menu now appears on top of the Flash plug-in:

Note: It is not currently possible to edit the HTML fragment of an existing external media object.

Upload a ZIP file containing multiple files This is a flexible technique allowing you to efficiently add a virtually unlimited number of media objects very quickly. First prepare a ZIP file containing the files you wish to add to Gallery Server Pro, then upload the ZIP file using the Add objects menu option.

Gallery Server Pro 2.6 Administrator’s Guide Page 75 of 267

Refer to the previous section for uploading a file. When you select a file to upload, choose the ZIP file you prepared.

Note: If the ZIP file contains multiple directories, even nested ones, then those directories are converted to albums. Use this to your advantage! For example, the first time you use Gallery Server Pro, you may have dozens, hundreds, or even thousands of photos you want to add. Put them all into a ZIP file with the desired directory hierarchy, and upload it to Gallery Server Pro.

Configure Gallery Server Pro to point to an existing directory containing media objects, and then use a web browser to synchronize Gallery Server Pro with the files. By default, Gallery Server Pro stores all media object files in a subdirectory named mediaobjects. This can be changed to any location on the web server’s hard drive. To change this location, follow these steps:

1. Log on to Gallery Server Pro with an account that has Administer site or Administer gallery permission. 2. Click the Actions menu and go to Site admin. 3. In the left menu, navigate to Media Objects – General. At the top of the page is a section called Media object storage. It allows you to specify the storage location for media objects, the thumbnail that represent the media objects, and the optimized (compressed) versions of images. 4. You can enter a path relative to the web application, or a full physical path to any UNC-accessible location. Examples: C:\my_media, gs\mediaobjects, \\server1\media, \\mynas\media 5. Click Save changes. If successful, you will see a confirmation message. A label below each text box shows the full physical path to the directory you specified. This helps confirm the directory location is where you intend it when you enter a relative path. Note: Changing the location does not move media objects to the new location. For example, if you choose a new location for thumbnail images, you should immediately synchronize the database to generate new thumbnails in the new location (or you can use Windows Explorer to manually copy the files). If you change the media objects path and then synchronize the database, the files in the new location will replace all database entries for the previous media objects. Use care so you do not inadvertently delete objects.

Follow the steps in the Synchronize an Album section to synchronize the media object files on the hard disk with the Gallery Server Pro database.

Manually copy files into the Gallery Server Pro media objects directory, then synchronize By default, Gallery Server Pro stores all media object files in the directory \gs\mediaobjects\ in the web application. You can copy files to this directory and then synchronize the files with the Gallery Server Pro database. If you copy directories into this folder, they will be converted into albums in Gallery Server Pro.

You can copy the files using any technique such as FTP or Windows Explorer. Once you finish, follow the steps in the Synchronize an Album section to synchronize the media object files on the hard disk with the Gallery Server Pro database.

Gallery Server Pro 2.6 Administrator’s Guide Page 76 of 267

Edit captions Each media object has a caption associated with it. You can edit all captions for an entire album at once, or edit a caption for a single media object. Both techniques are described below.

Note: HTML and javascript are not allowed unless explicitly enabled on the Membership - User Settings page in the Site Admin area.

Editing multiple captions at once When viewing multiple objects within a single album, captions can be edited by choosing Edit captions from the Actions menu. When the images are displayed with text boxes beneath them, edit the contents of the scroll bar to read the desired captions, and choose Save captions. Below is a screenshot of the Edit captions page.

Edit the caption for a single media object When viewing a single object on the media object view page, its caption can be edited by double clicking the existing caption beneath the object, as seen here:

Gallery Server Pro 2.6 Administrator’s Guide Page 77 of 267

A text box appears as shown below. Edit the text and choose Save changes.

Gallery Server Pro 2.6 Administrator’s Guide Page 78 of 267

Download media objects Users can download a media object one at a time or by using the built-in ZIP download functionality. Users are allowed to download only those objects they have permission to view. If watermarking is enabled, the downloaded images will contain a watermark.

You can disable the download functionality on the Media Objects - General page in the Site Admin area. While this prevents users from using the built-in functionality to download the media files, note that the fundamental nature of HTML means that if a user can view a media object, they have access to the file. The only way around this limitation is to use DRM, and even DRM doesn’t protect your images.

When viewing a media object, there is a download icon in the toolbar above the object. Clicking this button downloads the file to your browser:

Gallery Server Pro 2.6 Administrator’s Guide Page 79 of 267

To download several items in a convenient ZIP archive, select the download ZIP archive button:

Gallery Server Pro 2.6 Administrator’s Guide Page 80 of 267

The Download media objects page appears:

Choose the items to download and select the Download button. The selected items will be packaged into a ZIP archive file and sent to you, where you can open or save the file:

Gallery Server Pro 2.6 Administrator’s Guide Page 81 of 267

A few important points about downloading objects:

 When downloading images, you can choose to download the thumbnail, compressed, or original images. Only users who have permission to view the original files are able to download them.

 When an album is selected, all of its contents, including child albums, are packaged into the ZIP archive. If this is done on an album with thousands of items, it may take a long time to process and use a lot of bandwidth to send the file to the user.

The Download media objects page can also be opened from two additional places in Gallery Server Pro. There is an item on the Actions menu:

Gallery Server Pro 2.6 Administrator’s Guide Page 82 of 267

And there is an icon in the album header area:

Delete objects Deleting a media object removes information about it from the data store and permanently deletes the media file from the hard drive. Also deleted is the thumbnail image and compressed image (if it exists).

For external media objects such as YouTube videos, only the database record and locally stored thumbnail image is deleted. The object that is being referred to (such as the video stored at http://www.youtube.com) is not affected.

You can delete several media objects at once using the Delete objects command, or delete a single media object using the Delete toolbar button. Both techniques are described below.

Note: Deleting an object is permanent! There is no undo command, and once an object is deleted, there is no way to retrieve it.

Delete multiple media objects To delete multiple objects in an album, navigate to the album containing the objects you wish to delete. Choose Delete Objects from the Actions menu and the following page appears.

Gallery Server Pro 2.6 Administrator’s Guide Page 83 of 267

Select one or more albums or media objects to delete by checking the associated checkbox. When you are finished, click Delete selected objects. The objects you selected, including the database records and underlying files and/or directories, are permanently deleted. To delete only the database records, select the option ‘Delete only the database records; keep the files/directories’. See the next section for details on this option.

Preserve files and directories When this option is selected, the media files and directories associated with the selected objects are preserved; only the database records and the thumbnail/optimized images are deleted. This can be a convenient way to hide an object without deleting the underlying directory or file.

When this option is selected, the object can be re-imported into the gallery with the synchronize function. You can permanently prevent a file or directory from being imported with one of these tricks:

 Mark the file or directory as hidden with a file utility such as Windows Explorer.

 Edit the NTFS permissions on the IIS application pool identity so that it does not have access to the file or directory.

Delete individual media object To delete a single media object, navigate to a page showing the media object in media object view. Choose the red “X” toolbar button above the media object. A popup window asks for confirmation that the object should be deleted, as shown below. Choose OK and the object is permanently deleted.

Gallery Server Pro 2.6 Administrator’s Guide Page 84 of 267

Note: If the current user does not have permission to delete the media object, the Delete toolbar button does not appear.

Delete original files When you add images whose file size is large, Gallery Server Pro automatically creates a compressed version that is bandwidth-friendly and takes up less hard drive space. However, the original is not deleted and is still available through the Show/hide the original media object toolbar button.

Similarly, when the Binary Pack is installed and encoded versions of video and audio files have been created, the original files are preserved.

You can save significant amounts of hard drive space by deleting the original versions of these media objects, keeping only the compressed and thumbnail versions.

Navigate to the album containing the media objects for which you want to delete one or more original files. Click the Delete original files command in the Actions menu. The following screen appears.

Gallery Server Pro 2.6 Administrator’s Guide Page 85 of 267

The media objects and albums in the current album are displayed with associated checkboxes. If an item does not have an original version, it will not have a checkbox and the message "Not applicable" appears on the thumbnail. Gallery Server Pro calculates and displays the hard drive space that would be saved if all items were selected.

Select the checkboxes of the items for which you would like to delete the corresponding original files. The thumbnail and compressed versions will not be deleted.

NOTE: The original files will be permanently deleted from the web server! If they are important, make sure you have a copy stored elsewhere.

Gallery Server Pro 2.6 Administrator’s Guide Page 86 of 267

Move or copy media objects and albums Media objects and albums can be moved or copied to other albums. When a copy of a media object is made, a copy of the media file is saved to the destination album. The original file remains in the source album. When an album is copied, the directory and its contents are copied.

An example: copying several objects Let’s look at an example. Say we have an album called Photos that contains a couple child albums and several photos. We want to copy one of its albums and a photo to another album called My favorites. We start by navigating to the Photos album. Then we click Copy objects from the Actions menu. A screen like this will appear:

Select the items to copy. In this example, I am choosing to copy the Nature album and a photo of lily pads. When I click Choose these objects, a screen like this appears:

Gallery Server Pro 2.6 Administrator’s Guide Page 87 of 267

Note: Only those albums the user has permission to add objects to are shown.

Since I want to move these objects into the My favorites album, I select that album. Then I click Copy objects. The photos are copied and I am redirected to the My favorites album where I can see that – yes – the items were indeed copied.

An example: moving a single object As you browse your media objects, imagine you come across one that you want to move to your My favorites album. The page might look like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 88 of 267

Move object button

Copy object button

Click the toolbar button labeled Transfer this object to another album. The following screen appears.

Select the My favorites album, and click Move object. The photo will be moved to the album.

Note: To copy the object instead of move it, click the toolbar button labeled Copy this object to another album.

Gallery Server Pro 2.6 Administrator’s Guide Page 89 of 267

Rearrange objects To change the order in which Gallery Server Pro displays objects on a web page, choose Rearrange objects from the Actions menu. The media objects in the current album are displayed as shown below.

Note: The Rearrange objects command on the Actions menu is only enabled when the logged on user has Edit album permission for the current album.

To change the sequence of an object, drag it to the desired location. A rectangular area near the top and bottom of the screen scrolls the window up or down when the mouse hovers over it. Use these areas to drag objects above or below the visible portion of the window. When the user clicks Save changes, the objects will be displayed in album view, again in the right-to-left, then top-to-bottom format.

* Behind the Scenes * Rearranging objects modifies the Sequence field in the database table gs_MediaObject (for media objects) and gs_Album (for albums).

Rotate objects Images can be rotated in intervals of 90 degrees in any direction. You can rotate all the images in an entire album at once, or rotate just a single image. Both techniques are described below.

Gallery Server Pro 2.6 Administrator’s Guide Page 90 of 267

Note: Only images can be rotated. Gallery Server Pro does not support rotating videos or other types of objects.

Rotate more than one image To rotate more than one image in the current album, choose Rotate images from the Actions menu. The thumbnails in the current album are displayed with selectable arrow boxes on each of the images’ four sides, as below.

For each image that needs to be rotated, click on the arrow on the side that should be on top. Click Rotate images and thumbnail image, original image, and compressed image (if it exists) for each image you selected will all be rotated as specified.

Note: After the images are rotated, your browser may display the previous image from its cache rather than the newly rotated image. To get the latest version, refresh the page in your browser (pressing F5 or CTRL-F5 works in most browsers).

Note: Rotating is the only function in Gallery Server Pro that modifies the original image file. In some cases, repeatedly rotating an image will degrade the original, so use this function with caution.

Gallery Server Pro 2.6 Administrator’s Guide Page 91 of 267

Rotating a single image To rotate a single image from the media object view page, select the Rotate this image toolbar button from the toolbar above the image, as shown below.

A selectable arrow box is added to all four sides of the image, as below.

Gallery Server Pro 2.6 Administrator’s Guide Page 92 of 267

Click on the arrow box on the side that should be on top. Click Rotate image and the image will be rotated as requested.

Gallery Server Pro 2.6 Administrator’s Guide Page 93 of 267

Note: After the image is rotated, your browser may display the previous image from its cache rather than the newly rotated image. To get the latest version, refresh the page in your browser (pressing F5 or CTRL-F5 works in most browsers).

Watermarking The watermark feature is a powerful tool to help protect images from unwanted duplication or to communicate the source of the image.

Watermarks are rendered dynamically on the image when it is requested by the browser. The original image files are not modified, and no files are stored on the web server with watermarks applied to them. If a user downloads an image using the Download toolbar button above an image, the downloaded image has the same watermark as the image rendered in the browser.

Below is an example of a photo with an image and text watermark.

Gallery Server Pro supports two kinds of watermarks:

 A custom image that is applied to each image. For example, the Gallery Server Pro logo in the image above.  Custom text that is applied to each image. For example, the copyright message in the image above. You can configure one or both of these watermarking techniques. Furthermore, you can control the following attributes of each watermark:

 The source of the watermark image. Use your own image file. If you specify a .gif or .png with transparent pixels, those pixels will remain transparent when rendered on the image surface.

Gallery Server Pro 2.6 Administrator’s Guide Page 94 of 267

 The location to apply the watermark on the image. Choose from nine locations, such as TopLeft, MiddleCenter, etc.  The size of the watermark. The size can be relative to the size of the image, such as 50% of the width of the image. For a text watermark, you can optionally specify the font size.  The opacity, from transparent to completely opaque.  For text watermarks, specify the font name and size. Note: The watermark image and/or text applies to all images in the gallery. If you wish to use multiple watermarks, create multiple galleries and configure a unique watermark image in each gallery.

You can specify that certain users do not get the watermark. See the section Configure role-based watermarking below.

Enable watermarking Watermark functionality is configured on the Media Objects - Images page in the Site Admin area. Refer to the Media Objects – Images section for detailed information on the various configuration options.

Configuring role-based watermarking Certain users can be configured to not receive the watermark. This is useful for, say, professional photographers who want to allow users to browse all photos in the gallery. A watermark can be applied to users by default, but paying customers can be placed in a role where watermarks are not rendered on the images. This can be specified at the album level so that certain albums render watermarks for a given user while others do not.

To configure Gallery Server Pro so that all users receive a watermark except for a certain user account, follow these steps.

1. Enable the watermark functionality. This is done on the Media Objects - Images page in the Site Admin area. 2. Configure a role with Do not show watermark on image permission for at least one album. 3. Add a user to this role. (Make sure the user has view access to the desired media objects. Add view permission if necessary to the role you configured in step 2.) Note: Browsers often cache images, so you may need to refresh the browser in order to see the non-watermarked version of an image that previously had a watermark.

Gallery Server Pro 2.6 Administrator’s Guide Page 95 of 267

Examples of watermarks Below is a text watermark with the letters “TIS” set to 100% of the image width. Opacity is set to 20%. (TIS stands for Tech Info Systems.)

Here is an example where a custom image has been specified to be 50% of the width of the photo and located in the top left. Opacity is set to 40%.

Gallery Server Pro 2.6 Administrator’s Guide Page 96 of 267

Media object metadata When images are added to Gallery Server Pro, any metadata embedded in the file is extracted and saved to the data store. Gallery Server Pro can extract data in any of the following formats: EXIF, XMP, tEXt, IFD, and IPTC.

Viewing metadata When viewing a media object, click the View information about this media object toolbar button that appears above the item, as shown below. A popup window shows all the metadata that has been extracted. This is a read-only list and cannot be edited.

Toggles image metadata

Gallery Server Pro stores each user’s preference for whether or not the Image metadata popup is shown. This preference is persisted across logon sessions.

Bonus: Additional metadata extraction in full trust If Gallery Server Pro detects it is running under full trust, it automatically uses WPF functionality in .NET to extract additional metadata items, such as title, keywords, GPS coordinates, and IPTC data.

Gallery Server Pro 2.6 Administrator’s Guide Page 97 of 267

Searching The search functionality in Gallery Server Pro allows one to find all objects that contain the search criteria. The following properties are included in the search:

 Album title and summary

 Media object caption and file name

 Media object metadata, such as camera model, shutter speed, title, etc.

An object is considered a match if all search words match an album or media object. For example, if one searches for desert mountain, only those albums or media objects that contain both desert and mountain are returned. If the search words are contained in quotation marks, such as “desert mountain”, then the phrase must exactly match.

The contents of documents such as PDF files are not searched. Only those objects for which the current user has authorization to view are returned in the search results.

Since the search function includes the metadata extracted from images, you can perform some pretty powerful searches. For example, to see all your photos that were shot at -0.5 step compensation, search for “-0.5 step”. You may have to adjust the text depending on your camera.

To begin a search, click the search icon in the top right of the page. Enter the search term and click the Search button.

Note: If the search icon is not visible, it may have been disabled. The configuration setting is on the Gallery Settings page in the Site Admin area.

Gallery Server Pro 2.6 Administrator’s Guide Page 98 of 267

A page with the search results appears. Click the thumbnail to view the item.

Adding or editing a file/MIME type The database table gs_MimeType contains a list of file types that are managed by Gallery Server Pro. This list is exposed through the Media Object Types page in the Site administration console. Each type can be enabled or disabled as desired.

In most cases, this list contains every type of file you may want to add and is already associated with the desired MIME type, but there may be cases where you want to add a new file type or change the MIME type associated with an existing file extension. Since the Media Object Types page does not allow any changes except for enabling or disabling, you may need to edit the data directly in the table.

Note: Changes to the gs_MimeType table affects all galleries.

Note: After editing this table, restart the IIS application pool to force the Gallery Server Pro initialization code to run.

Adding a file extension To add a file type that does not exist in the table gs_MimeType, use your SQL tool to insert a record. For example, perhaps your company uses a custom extension .ks2 for a particular type of text file. This is the SQL you might use:

INSERT INTO [gs_MimeType] ([FileExtension],[MimeTypeValue],[BrowserMimeTypeValue]) VALUES ('.ks2','text/plain', '') Gallery Server Pro 2.6 Administrator’s Guide Page 99 of 267

In most cases the BrowserMimeTypeValue field can be an empty string. This only needs to contain a value when the HTML or script template specifies the {MimeType} replacement parameter and it is inappropriate to send the MIME type (stored in the MimeTypeValue column) to the browser.

Editing the MIME type for a file Each file extension in the table gs_MimeType is mapped to a particular MIME type. You may wish to update the MIME type to change the behavior of Gallery Server Pro.

Example: The .ogg file extension is mapped to the MIME type video/ogg, but it can also refer to an audio file. To force Gallery Server Pro to treat .ogg files as audio files instead of video, update the record in the table:

UPDATE [gs_MimeType] SET [MimeTypeValue]'audio/ogg' WHERE [FileExtension]='.ogg'

Rendering media objects in the browser Note: This section contains advanced information on customizing how Gallery Server Pro generates the HTML for media objects. You should be comfortable with HTML before attempting to modify the generated HTML.

Overview Browsers, by themselves, typically cannot play video, audio, or render many kinds of documents like Adobe PDF or Microsoft Word files. These types of objects require plug-ins which may or may not be installed in your users' browsers.

Note: Browser makers are adding native audio and video support through the use of the HTML 5 video and audio elements. Gallery Server Pro 2.4 adds support for these new elements, although implementation is inconsistent among browsers, making it appropriate only for early-adopter folks at the moment (I write this in December 2010).

Gallery Server Pro is flexible so that administrators can customize the HTML output rendered by Gallery Server. You, as the web site administrator, may feel comfortable having a dependence on a particular plug-in, such as Silverlight or Flash, while others may not. Also, some users might prefer that multimedia files are rendered with tags in order to pass XHTML validation, while others might prefer for maximum backward compatibility. Lastly, different browsers require different syntax, and new versions of browsers are frequently released, potentially breaking something that works today.

Gallery Server Pro uses a combination of automatic browser sniffing and HTML and script templates stored in the database. The table gs_BrowserTemplate contains templates for each type of media object. For example, rendering the HTML for an image is pretty straightforward:

Gallery Server Pro 2.6 Administrator’s Guide Page 100 of 267

The text in brackets – like {MediaObjectUrl} – are placeholders that are replaced with dynamically generated content at runtime. For example, {Height} is replaced with the height of the image. A full list and descriptions of these placeholders can be found below.

When Gallery Server Pro uses the above template to render an image to the browser, it ends up looking something like this:

If desired, one can tweak this template to change how tags are rendered. For example, if you wanted to use the width and height attributes instead of a style, update the template to this:

/>

Rendering browser-specific HTML Let us jump in with a real world example of how Gallery Server Pro sends one browser different HTML than other browsers for a particular media type – in this case, images.

Gallery Server Pro renders images in a white border with rounded corners and a drop shadow. CSS is used to provide the rounded corner and drop shadow effect, but Internet Explorer 8 and earlier does not support these CSS effects. For these versions, we use a different drop shadow technique that requires a more complicated HTML structure:

In other words, when displaying images in the browser, we need one HTML pattern for IE 1-8 and another HTML pattern for all other browsers, including IE 9. We achieve this by having two rows in the gs_BrowserTemplate table – one to handle the default rendering for images and another for IE 1-8 users:

Gallery Server Pro 2.6 Administrator’s Guide Page 101 of 267

Gallery Server Pro automatically matches users with Internet Explorer 1-8 and matches them to the template with the browser ID “ie1to8”. Everyone else gets the default template.

Browse the remaining records in this table to see how Gallery Server Pro handles other media types. There is a ScriptTemplate column that can contain javascript to execute for each media object. This is an important column for Flash and Silverlight rendering. Feel free to modify the templates to suit your requirements. Note that Gallery Server Pro caches these records, so recycle the application pool after any changes to the table.

Browser ID Reference Below are two lists of valid browser IDs – one for .NET 2.0 – 3.5 and the other for .NET 4.0.

Gallery Server Pro 2.6 Administrator’s Guide Page 102 of 267

The browser IDs are hierarchical, which means you can use one ID to match a subset of browsers. For example, entering the browser ID “Opera” will match all versions of Opera, while entering “Opera8to9” will match only Opera 8-9.

Notice that in .NET 4, there are new browser IDs for BlackBerry, iPhone, iPod, and IEMobile, allowing one to send targeted HTML to those systems. The current version of Gallery Server Pro does not take advantage of this, but you can by adding rows to gs_BrowserTemplate.

Side Note: Identifying Internet Explorer 1-8 You may have noticed the browser definitions shown above don’t contain “IE1to8”, which is what we used in our example. By default, Microsoft doesn’t provide any way to target IE 1 to 8, so Gallery Server Pro does a little extra processing to check for this condition so we can use it as a valid browser ID.

*Behind the scenes* The processing to identify IE 1-8 is done in Gallery Server Pro’s code, but it could also have been in a new browser definition file placed in the application’s App_Browsers directory or the .NET Framework’s collection of browser definition files at %WINDIR%\Microsoft.NET\Framework[64]\vXXXXXX\Config\Browsers\.

Template Replacement Parameters Reference The following is a list of all replacement parameters supported in the HTML and script templates.

Gallery Server Pro 2.6 Administrator’s Guide Page 103 of 267

Name Description

{CssClass} A valid cascading style sheet class. The business logic determines which classes, if any, are inserted into this parameter. Example value: "msgsuccess", "msgsuccess indent"

{MimeType} The mime type of the media object. The mime type is determined from the file extension of the media object. The mapping between mime types and file extensions is in the table gs_MimeType. Example value: "video/x-flv", "image/jpeg"

{MediaObjectUrl} The url to the media object. Example value: "/gs/handler/getmedia.ashx?moid=5&dt=2&g=1"

{MediaObjectAbsoluteUrlNoHandler} An url that points directly to the media object and bypasses the HTTP handler. Example value: /gallery/videos/birthdayvideo.wmv. The handler provides security checking and watermarking, so only use this parameter when necessary. For example, perhaps a video plug-in does not work unless the file is directly referenced.

IMPORTANT: This parameter requires that the media objects directory be within the Gallery Server Pro web application directory. By default, media objects are stored in the mediaobjects directory within the application, so this requirement is satisfied unless you change it. If objects are stored outside the web application directory, use the {MediaObjectRelativeUrlNoHandler} parameter.

{MediaObjectRelativeUrlNoHandler} Provides an url that is relative to the media objects directory and which points directly to the media object. Example value: /videos/birthdayvideo.wmv). This parameter bypasses the HTTP handler that normally streams media objects to the browser. The handler provides security checking and watermarking, so only use this parameter when necessary. For example, perhaps a video plug-in does not work unless the file is directly referenced.

Typically this parameter is used instead of {MediaObjectAbsoluteUrlNoHandler} when the media objects directory is outside of the web application. The user must first configure the media objects directory as a virtual directory in IIS. Then the path to this virtual directory must be manually entered into one or more HTML templates in galleryserverpro.config, so that it prepends the relative url returned from this method.

Example: If the media objects directory has been set to D:\media Gallery Server Pro 2.6 Administrator’s Guide Page 104 of 267

and a virtual directory named gallery has been configured in IIS that is accessible via http://yoursite.com/gallery, then the HTML template might look like this:

Click to open

{Width} The width, in pixels, of the media object. Example value: 640, 480

{Height} The height, in pixels, of the media object. Example value: 640, 480

{Title} The title of the media object. May include HTML tags. Example value: “Kayla sledding down the hill

{TitleNoHtml} The title of the media object with HTML tags removed and apostrophes and quotation marks are replaced with " and '. Example value: "Kayla sledding down the hill"

{AutoStartMediaObjectText} Indicates whether to automatically start a video or audio object on the client. Rendered as the text "true" or "false".

{AutoStartMediaObjectInt} Indicates whether to automatically start a video or audio object on the client. Rendered as the value "1" (true) or "0" (false).

{GalleryPath} The path, relative to the web site root, to the directory containing the Gallery Server Pro files. Example: If GSP is installed at C:\inetpub\wwwroot\dev\gallery, where C:\inetpub\wwwroot\ is the parent web site, and the gallery files are in the gsp directory, this property returns /dev/gallery/gsp.

Used when referring to resources such as the .xaml skins for the Silverlight media player.

{HostUrl} The URI scheme, DNS host name or IP address, and port number for the current application. Examples: http://www.site.com, http://localhost, http://127.0.0.1, http://godzilla

Used for some plug-ins such as the DIVX Web Player that require a fully qualified path to the media object.

Gallery Server Pro 2.6 Administrator’s Guide Page 105 of 267

Microsoft Silverlight By default, Gallery Server Pro uses Silverlight to play video and audio files with these extensions: .mp3, .wma, .wmv, .asf, .asx, and .m4a. If the user does not have Silverlight installed, a graphic will appear in place of the media object that says "Get Silverlight". When clicked, the user is stepped through the process of installing the plug-in.

Using Silverlight rather than just sending a generic tag to the browser offers better performance and a more predictable experience for your end users. Video and audio files start playing almost immediately rather than after downloading the entire file. Those users who do not have the Silverlight plug-in receive gentle hand holding for installing it.

There are several skins available for the Silverlight player. By default, audio files use the AudioGray.xaml skin and video files use Professional.xaml. You will find more skins in the \gs\skins\ directory. Update the script template in the table gs_BrowserTemplate as desired to change the media player skin.

Here is the Silverlight video player using the Professional.xaml skin:

Gallery Server Pro 2.6 Administrator’s Guide Page 106 of 267

This is the Silverlight audio player with the AudioGray.xaml skin:

Flash Gallery Server Pro includes a built-in video player for Flash named FlowPlayer. The following file types use this player: .f4v, .flv, .m4v, .mov, and .mp4.

Gallery Server Pro includes the free version of FlowPlayer, which is licensed under GPL 3.0. In some cases, you may want to purchase a commercial license for the player. Do this at the FlowPlayer .

The behavior of the video player can be customized to your requirements. Refer to the FlowPlayer documentation for details. To alter its behavior in Gallery Server Pro, update the relevant record(s) in gs_BrowserTemplate.

Below is the default rendering of the FlowPlayer video player:

Gallery Server Pro 2.6 Administrator’s Guide Page 107 of 267

QuickTime The QuickTime plug-in is used to play files with the .moov and .qt extension. Below is an example of a .moov video played in the QuickTime plug-in for Firefox:

Gallery Server Pro 2.6 Administrator’s Guide Page 108 of 267

Versions of Gallery Server Pro earlier than 2.4 also used QuickTime for .mov files, but now that most .mov files use the MPEG-4 codec, users generally have a better experience using the FlowPlayer for Flash player. If you discover that one or more .mov videos won’t play in your gallery, try renaming it with a .moov extension and re-adding it. .moov files continue to use the QuickTime plug-in.

Or, if you want to revert to the previous behavior of using the QuickTime plug-in for .mov files, execute the following SQL against your gallery database:

UPDATE gs_MimeType SET MimeTypeValue = 'video/quicktime' WHERE FileExtension='.mov';

You will need to restart the application pool to force the gallery to recognize this change.

DIVX DIVX files (*.divx) have their own HTML template that specifies the DIVX Web Player plug-in. It looks like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 109 of 267

HTML 5 Most browsers – including Internet Explorer 9 – now include some level of support for HTML5. The

In Google Chrome, it looks like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 110 of 267

This .webm video will play in Firefox 4, Chrome, IE 9 (when VP8 codec is installed), and Opera. For IE 9 users without the VP8 codec or for versions of IE8 and earlier, users will see this:

Similarly, audio files ending with the .oga or .wav extensions are sent to the browser in an

Gallery Server Pro 2.6 Administrator’s Guide Page 111 of 267

Support for the video and audio tag is sporadic and inconsistent across browsers, so use these new file types with caution, as you may not be able to reach as many internet users as when using something more common such as Flash video.

6. Working with Galleries

Overview A gallery is a collection of albums and media objects bound together with a common set of settings such as file storage location, watermark settings, image size, allowed file types, and whether user albums are enabled.

When Gallery Server Pro is installed, a single gallery is created and all albums and media objects are added to this gallery. In many cases, this is sufficient and you will never need to create another gallery.

Note: Setting up and administering galleries has changed in Gallery Server Pro 2.4. Previous versions required that each web application is bound to a single gallery, while 2.4 allows multiple galleries to exist in a single web application.

About multiple galleries While a single gallery will satisfy the requirements of many users, Gallery Server Pro supports multiple galleries within a single application instance. There are many situations where multiple galleries can help achieve your goals:

 You want to have one area for staging and another for production. Media objects are first added to the staging area, where they are organized and prepped. When they are ready to be deployed, they can be moved or copied to the production gallery.

 You have departments in your company that should each have their own gallery. Each gallery should have its own administrator and can have its own settings, such as user accounts, watermark, permissions, etc. Rather than setting up and maintaining multiple web applications, this can now be handled in a single application instance.

 You have media files in multiple locations you want to expose, such as D:\Pictures and D:\Video.

 You want to set up a gallery for each member of your family. Each person is a mini-administrator for their area and can't edit another person's media objects, yet everything is contained within a single web application and database.

 You want some images to be 640x480 and others to be smaller (or larger).

 You want to have a watermark applied to one set of images but another set should have no watermark, and all images are to be accessible to anonymous users. Or you have different watermarks that should be applied to different sets of images.

Gallery Server Pro 2.6 Administrator’s Guide Page 112 of 267

 You want to provide a user with different gallery-wide permissions. For example, user 'Bob' should be a gallery administrator for one set of objects, but have edit-only permission for another set.

 You want to allow some users to upload any file type of any size, but others should only be able to upload .JPEG's that are less than 5 MB.

Every gallery gets its own web page A gallery manager in the Site Admin area lets you manage your galleries. Generally, each gallery is associated with a particular web page containing the Gallery Server Pro user control. For example, a default installation contains a single web page – default.aspx – that is linked to the gallery that is created during the installation.

If you create a second gallery, typically you will create a second web page to reference it. Because multiple galleries involve creating new web pages, this is a feature that will typically be used only by web developers.

Note: Using multiple galleries in DotNetNuke does not require developer skills because DotNetNuke makes it easy to create new pages, and the gallery manager in Gallery Server Pro allows you to easily link any gallery to any web page.

The How-To section has a tutorial for setting up a second gallery to solve one of the challenges listed above.

Gallery isolation and user/role security Albums and media objects in a gallery are isolated from other galleries. They have separate hierarchies, gallery settings, and are stored in different physical locations. Users and roles can be associated with one gallery and not another, which helps “isolate” a user to a particular gallery.

When a user does not have access to a gallery, everything about it is hidden from the user – its albums, media objects, users, and roles. To that user the gallery may as well not even exist. This, of course, is what you usually want.

There are two types of administrators in Gallery Server Pro:

 Site administrator – Has complete control over all settings in a Gallery Server Pro installation. A site admin is automatically a gallery admin of every gallery, and can always access every media object in every gallery.

 Gallery administrator – Has complete control over a particular gallery. Other galleries (and their albums and media objects) are inaccessible and hidden from view.

Read more about managing users and administrators in the section User Management and Security. For now, we will focus on understanding how lower levels of permission can cause objects to be hidden.

Gallery Server Pro 2.6 Administrator’s Guide Page 113 of 267

Examples of hidden galleries Users can move or copy objects to another gallery only when they are a gallery administrator for that gallery. For example, in the How-To tutorial where we set up two galleries, a site administrator can see both galleries when moving/copying objects:

But when logged in as a gallery administrator for just one of the galleries, only the galleries for which the user is an administrator is shown. For example, user Vino is a gallery administrator for the Engineering gallery, but only has view-only access to the Marketing gallery, so Vino is only allowed to move objects within his own gallery:

Similarly, this user (Vino in this example) sees only a single gallery on the Gallery Manager page, even though two actually exist. This is because Vino does not have administrative permission to the Marketing gallery:

Gallery Server Pro 2.6 Administrator’s Guide Page 114 of 267

A site administrator will see both galleries, as will any user who has ‘Administer gallery’ privileges to both galleries:

Users and roles in galleries As you might expect, a site administrator can see all users and roles anywhere they are displayed, such as the Manage Users and Manage Roles pages.

Two configuration settings control whether a gallery administrator can view users and roles. These are on the Site Settings – General page:

Gallery Server Pro 2.6 Administrator’s Guide Page 115 of 267

By default, these options are enabled, which means gallery admins can see all users and roles and manage them, including creating, editing, and deleting actions. In some cases this may be too much permission.

To prevent gallery admins from modifying users and roles, uncheck the option Allow gallery admins to manage users and roles. This will cause the Manage Users and Manage Roles pages to be inaccessible.

The second option allows gallery administrators to see users and roles that do not have access to the current gallery. This is useful, for example, to allow a gallery admin to give an existing user access to a gallery. However, in some environments it may be inappropriate for a gallery administrator to be able to view users and roles in other galleries, so this setting lets you hide them from the gallery admin. When this option is disabled, only users and roles that have access to a gallery the gallery admin can administer are made visible.

Editing roles that affect multiple galleries Imagine there is a role called Everyone which has view permission to all the galleries. User Bob is a gallery administrator for one gallery but not the others. What happens if Bob tries to edit the role? For example, this is what happens when Bob tries to remove user Vino from the Everyone role:

Gallery Server Pro 2.6 Administrator’s Guide Page 116 of 267

Administrators can create users but cannot give them any permissions greater than they themselves have, nor can a gallery administrator give a user access to another gallery unless he or she is an administrator for that gallery.

The underlying principle is this:

An administrator cannot make any change that would give another user greater access than he himself has.

If you encounter an exception to this rule, please report it as a bug.

What happens when an URL and gallery conflict? As you navigate the gallery, the URL specifies the album ID or the media object ID. For example, this URL specifies album ID #3, which is the album called Samples:

Gallery Server Pro 2.6 Administrator’s Guide Page 117 of 267

Each instance of the Gallery Server Pro user control is also linked to a particular gallery, as seen on the Gallery Manager page:

What happens when a user edits the URL to request an album or media object that exists in a different gallery than specified in the Gallery Manager? If the user has permission to view the object, then Gallery Server Pro will display it. This is not a typical scenario, but if you were curious, there you have it. There is one exception – if an administrator turned off the Allow URL Navigation option on the gallery settings page, then all users are forbidden from specifying an album or media object in the URL, even those in the current gallery.

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.

Gallery Server Pro 2.6 Administrator’s Guide Page 118 of 267

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:

Must be disabled

Must be different than original file location

There are several requirements that must be met before a gallery can be made read-only:

 User albums must be disabled

Gallery Server Pro 2.6 Administrator’s Guide Page 119 of 267

 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.

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.

7. User Management and Security

Overview Gallery Server Pro uses a system of anonymous browsing, user accounts, and roles to provide a flexible security model that should satisfy most security needs. There is no limit to the number of users and roles.

By default, anonymous users - that is, those who are not logged on - can browse the albums and media objects, but they cannot perform tasks that modify data, such as adding albums, rotating an image, site administration, etc…

To perform a task, a user must belong to a role that has the appropriate permission. Roles can be configured with any of several permissions. Here we see a role named View Access Marketing Gallery:

Gallery Server Pro 2.6 Administrator’s Guide Page 120 of 267

A user in this role can view any album and media object in the Marketing gallery, but cannot perform any task. The power and flexibility of Gallery Server Pro becomes apparent when you add users to more than one role. For example, a separate role can be created that provides edit permission to a single album. A user belonging to both of these roles can view all objects in the gallery but can only edit the one album.

Gallery Server Pro uses the ASP.NET Membership and Role provider model. By default, the users and roles are stored in the same database as the Gallery Server Pro data. You can optionally configure Gallery Server Pro to connect to an existing store of users. For example, you may want to use the existing accounts in Active Directory. Read more about configuring the membership provider in the Membership Configuration section.

Require everyone to log on The default configuration allows users to anonymously browse the gallery, but they are prevented from any action that modifies the media objects. To require all users to log on, even to browse, disable the anonymous browsing feature on the Gallery Settings page in the Site Admin area.

As the screen shot shows, you can also prevent anonymous users from viewing the high resolution version of your photos. This can be helpful when you want to restrict access to your original photos. A special role permission named View original, high-res images can be used to give logged-on users access to these images.

Remember - a user that doesn't belong to a role has no permission to view or edit objects. Be sure to include each user in at least one role to provide the desired level of access.

Note: Gallery Server Pro cannot be configured to give anonymous users edit permission. Any action other than viewing requires that the user log in.

Gallery Server Pro 2.6 Administrator’s Guide Page 121 of 267

Users Individuals access Gallery Server Pro anonymously or by logging on with user accounts. User accounts have access to albums and administrative tasks based on the roles to which the user belongs. Users are created and maintained on the Manage Users page in the Site administration area.

If you integrate Gallery Server Pro with an existing membership system, you can manage your users with your original system or with the user management function in Gallery Server Pro.

Create a user Create a user by clicking Add new user… on the Manage Users page in the Site Admin area.

The Create New User wizard appears as shown below.

Gallery Server Pro 2.6 Administrator’s Guide Page 122 of 267

Enter a username and password for the user. An email address can be used for the username if desired. When you leave the username field, an AJAX callback validates the username and reports whether it is already in use.

An email address is optional but is useful for allowing users to retrieve forgotten passwords.

Clicking the Next button displays the second page where one or more roles can be assigned to the user.

Gallery Server Pro 2.6 Administrator’s Guide Page 123 of 267

Click Create User. A confirmation message appears in the pop-up box. Close the pop-up box and the Manage Users page will be updated with the new user you just created.

Edit a user Click the Edit link next to a user to open the Edit user dialog.

Gallery Server Pro 2.6 Administrator’s Guide Page 124 of 267

The General tab of the Edit user dialog allows a description and email address for the user to be updated. You can disable a user account by clicking No on the Is approved setting. Disabled users cannot log on to access.

You can also enable or disable the user's personal album. Note that this option does not appear when user albums are disabled.

WARNING: Disabling a user's album causes the album and its contents to be deleted!

The Roles tab allows one to configure the roles to which the user belongs.

Gallery Server Pro 2.6 Administrator’s Guide Page 125 of 267

The Password tab provides the ability to change the user’s password.

Note: To reset or change a password, select the desired option and then click the Update password button.

Gallery Server Pro 2.6 Administrator’s Guide Page 126 of 267

Roles Permissions in Gallery Server Pro are applied to roles rather than users. Users are allowed to carry out tasks when they are a member of one or more roles that provide the appropriate permission. By combining users and roles in different configurations, you can achieve a highly configurable gallery.

Gallery Server Pro will give a user permission to perform an activity if any of the user's roles contain the requested permission, even if the others do not. For example, consider a user who belongs to three roles. Two of the roles do not have Delete album permission but the third one does. In this case, the user has permission to delete the album that is specified in the role with the Delete album permission.

Below is a list of the permissions that can be applied to a role.

Role permission Description

Administer site (all Provides unrestricted access to all functionality in Gallery Server Pro. This is the galleries and albums) only permission that applies to all albums in every gallery and cannot be selectively applied to individual albums or galleries.

Administer gallery Provides unrestricted access to one or more galleries. This includes adding and editing albums and media objects, configuring gallery settings, and managing

Gallery Server Pro 2.6 Administrator’s Guide Page 127 of 267

users and roles for the gallery. This permission applies to an entire gallery and cannot be selectively applied to individual albums.

View albums / objects Provides a read-only view of photos, videos and other media objects. Note that it does not give access to the original, high resolution versions of images (if they exist).

View original, hi-res Provides read only access to the original, high resolution versions of images, if images they exist.

Add albums Allows a user to add an album in any of three ways: (a) The user can create a new album using the Create album menu item, (b) copy an album from another album, or (c) move an album from another album.

Note 1: Adding an album by moving it from another location is allowed only if the user also has delete permission for the source album.

Note 2: When moving or copying an album, users must have Add albums permission on the destination album.

Note 2: When a user moves or copies an album, any media objects within the album are also transferred regardless of whether the user has Add media objects permission on the destination album.

Add media objects Gives a user the ability to add media objects such as images, videos, audio files, and documents in any of three ways. The user can (a) add a new media object using the Add objects menu item, (b) copy a media object from another album, or (c) move a media object from another album.

Note 1: Adding a media object by moving it from another album is allowed only if the user also has Delete media object permission for the album from which the media object is being moved.

Note 2: A user must have both Add media objects permission and Add albums permission in order to add a ZIP file that contains one or more directories, since Gallery Server Pro converts the directories to albums.

Note 3: Only those media objects that are enabled on the Media Object Types page can be added.

Note 4: To add media objects through synchronizing, the Synchronize permission is also needed.

Edit album Allows a user to edit album information, such as the title; summary; begin and end dates; assigned thumbnail; and sequence of media objects and child albums.

Gallery Server Pro 2.6 Administrator’s Guide Page 128 of 267

Edit media object Allows a user to edit any media object's title. For images, it also allows rotation as well as deletion of the original, high resolution image (if it exists).

Delete child albums Allows the deletion of a child album in one of two ways: the user can either delete an album outright, or move an album to another album.

Note: When moving an album, users must have this permission on the source album, as moving can be thought of as deleting an album from one location and adding it to another. (The user must also have permission to add an album to the destination album.)

Delete media object Allows the deletion of a media object in one of two ways. The user can either delete a media object outright or move a media object to another album.

Note: When moving a media object, users must have this permission on the source album, as moving can be thought of as deleting an object from one location and adding it to another. (The user must also have permission to add a media object to the destination album.)

Synchronize Provides the ability to synchronize the media object files and directories on the web server's hard drive with the records in the data store.

Note: If a user has the ability to edit the media objects directory outside the security boundary of Gallery Server Pro (such as using a utility like Windows Explorer), and the user also has Synchronize permission here, she effectively has the ability to add and delete albums and media objects, even if those permissions are not included in a user's role.

Do not show This permission causes images to be shown to the user in their original form, watermark on image without a watermark applied. If a user belongs to more than one role with conflicting values, then watermarks are not shown. This permission is ignored if the watermark functionality is disabled for the gallery. Refer to the section Watermarking for more information.

If you integrate Gallery Server Pro with an existing role provider, you can use the original role management function to manage the roles. However, you must use the role management function in Gallery Server Pro to execute tasks that are specific to Gallery Server Pro, such as specifying the permissions and albums each role applies to.

Creating, editing, and deleting roles Create a role by clicking Add new role… on the Manage Roles page in the Site Admin area.

Gallery Server Pro 2.6 Administrator’s Guide Page 129 of 267

The following popup window appears.

Gallery Server Pro 2.6 Administrator’s Guide Page 130 of 267

Here we are creating a role named Read Only All Albums giving it view permission to all albums in both galleries. Click Save changes to create the role.

Note: Users are assigned to a role on the Manage Users page.

Edit a role by clicking the Edit button next to a role. Similarly, a role can be deleted by clicking the Delete button.

Understanding how roles apply to the album hierarchy Role permissions automatically propagate to all child albums of the selected album. The top level selected album(s) is considered to have explicitly assigned role permissions. Child albums are considered to have inherited role permissions because they inherit the permission from a parent album.

Since permissions apply to all child albums of a selected album, notice that all child albums become selected when you click an album, and you cannot de-select individual child albums.

Role behavior for new, moved or copied albums Role permissions are assigned to the highest album you select, and child albums always inherit those permissions. If a child album is added, moved, or copied, it automatically inherits the permissions of its new parent album, and the previous permissions no longer apply.

Gallery Server Pro 2.6 Administrator’s Guide Page 131 of 267

When you move or copy an album that has a role explicitly assigned to it, that role stays with the album.

Self Registration Gallery Server Pro supports anonymous users creating accounts in the gallery. There are several configuration options available such as requiring a valid e-mail address, setting the default security access and more.

When self-registration is combined with user albums, a maintenance-free community gallery is possible where visitors to your site each have their own gallery with no involvement required by administrators.

Setting up self-registration The User Settings page in the Site Admin area contains configuration options:

Allow visitors to create accounts This enables the self-registration feature. When checked, a create account link appears in the top right of each page that takes the user to a registration wizard:

Gallery Server Pro 2.6 Administrator’s Guide Page 132 of 267

When disabled, the Create account link is not shown and the only way to create a user is on the Manage Users page in the Site Admin area.

Require e-mail validation to activate account This option sends an e-mail to the user with a validation link that must be clicked before the user can log on. Enable this feature to guarantee a valid e-mail address for each account.

The e-mail sent to the user looks similar to this:

Welcome to the gallery.

Before you can use your new account you must activate it - this ensures the e-mail address you used is valid and belongs to you.

To activate your account, click the link below or copy and paste it into your browser's location bar:

http://site.com/default.aspx?g=createaccount&verify=HFXEL%2BCR5OY%3D

Once you successfully activated your account, you can throw away this e-mail.

Thanks for joining.

Gallery Server Pro 2.6 Administrator’s Guide Page 133 of 267

-- Gallery Server Pro Administrator The text of this e-mail can be changed by editing the appropriate text file in the directory \gs\templates\ of the web application.

Note: Be sure e-mail functionality is configured. This is done on the Gallery Settings page in the Site Admin area.

Note: When both e-mail validation and administrator approval are enabled, the user is first sent the verification e-mail. After the user clicks the verification link, the administrator is sent an e-mail that the user is waiting for approval.

Require administrator approval to activate account When enabled, newly created users cannot log on until an administrator approves the account. To receive e-mail notification when an account needs approval, specify one or more administrators in the User accounts section on the User Settings page, as seen here:

To receive an e-mail, the administrator must have a valid e-mail address and e-mail functionality must be configured.

Only administrators have permission to approve users, so in most cases it makes sense to only choose from the administrators in a gallery. However, one can check the option to show all users if you want to notify a non-administrator that a user is created.

Use e-mail address for user name The default is to allow a user to specify both a username and e-mail address, but you may want to require everyone to use an e-mail address as their account name. This can simplify things for users and administrators:

 Users need only remember one piece of information rather than two, and remembering their e-mail address is often easier than remembering a username, especially if their first choice in usernames is already taken. Gallery Server Pro 2.6 Administrator’s Guide Page 134 of 267

 Users can have their password e-mailed to them. This is not possible when an e-mail address is optional.

When this option is enabled, the registration screen no longer requests a username:

An e-mail address that conforms to the expected format must be entered. For example, if a user enters "Billy Joe", the message Not a valid e-mail appears. But the e-mail address "[email protected]" is allowed. To force users to enter a valid e-mail address, enable the e-mail validation option discussed above.

Default roles Visitors who register their own accounts can be added to one or more roles when the account is created. For example, you might add them to a role that removes the watermark, gives them read-only access to the entire site, or permission to upload items to a particular album.

Note: If user albums are enabled, the user is automatically given full permission to his or her personal album, even if no roles are specified here.

This setting applies ONLY to self-registered users. That is, when an administrator manually creates an account, these roles are not assigned to the user.

To assign one or more roles to new users, choose them from the drop down list on the User Settings page:

Gallery Server Pro 2.6 Administrator’s Guide Page 135 of 267

In this screen shot, new users are added to two roles - No Watermark (has the "Do not show watermark" permission) and Read Only All Albums (gives view permission to all albums).

The drop down box initially hides roles that were automatically created by the system for user albums and album owners. Typically you will never need to interact with them, but if you want to take a peek select the checkbox Show roles that support the album ownership and user album features.

8. Site Administration

Overview Site settings can be accessed by choosing Site admin from the Actions menu. A menu appears on the left. Notice that sections of this menu can be collapsed by clicking on the tiny arrows.

The options that appear in the menu depend on the security access of the logged on user and – for gallery admins – a couple of application settings configured by a site administrator. Site administrators always see the complete list of pages, as seen here:

Gallery Server Pro 2.6 Administrator’s Guide Page 136 of 267

By default, a gallery administrator sees the same options as a site admin except the items in the Site Settings section are not visible. The Manage Users and Manage Roles pages may also be hidden if the application has been configured to hide these pages from gallery admins (this is done on the Site Settings – General page).

Site Settings – General The first section is for application-wide settings. This page is accessible only to site administrators.

Gallery Server Pro 2.6 Administrator’s Guide Page 137 of 267

Gallery Server Pro 2.6 Administrator’s Guide Page 138 of 267

Product key Product keys are free and easily obtained from the Product Key Wizard at www.galleryserverpro.com.

Enter your product key in the text box and click the Enter product key button. A message will appear indicating whether or not the key is valid. If it is, all functionality is enabled and you will not be asked for a key again.

Application settings The table below describes the application setting properties.

Enable caching When enabled, caching is used to reduce the need to query information from the database, substantially improving performance.

Caching may need to be disabled when this application is deployed on a web farm.

Allow gallery Gallery administrators are allowed to add, edit, and delete users and roles. Disable admins to manage this option to prevent a gallery admin from modifying users and roles. This option users and roles does not affect site admins, who always have access to all functionality. See section

Gallery Server Pro 2.6 Administrator’s Guide Page 139 of 267

Users and roles in galleries for more information.

Allow gallery Gallery administrators are allowed to see lists of users and roles that exist but do not admins to see have access to any gallery the gallery admin can administer. When this option is users/roles that do disabled, only users and roles that have access to a gallery the gallery admin can not have access to administer are made visible. This option does not affect site admins, who always current gallery have access to all functionality. See section Users and roles in galleries for more information.

Remove oldest When enabled, Gallery Server Pro will limit the size of the error log to the number of items from error log errors specified here. When the maximum size is reached, the oldest errors are when maximum size deleted to make room for the new ones. Use this feature to keep a rolling history of is reached errors.

jQuery path The path to the jQuery script file. The path may be:

 Relative to the root of the web application. Ex: "~/gs/script/jquery-1.4.4.min.js"

 A full URL. Ex: "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"

If the web application already uses jQuery and is adding the jQuery script reference through another mechanism, specify a blank string for this setting.

jQuery UI path Specifies the path to the jQuery UI script file. The same rules as the jQuery path apply.

Application information This section displays a few basic properties of the application:

Gallery Server Pro 2.6 Administrator’s Guide Page 140 of 267

Trust level – Hopefully the application is running in full trust, as this mode allows all the features to be used. Some hosting providers force applications to run at a lower trust level.

.NET Framework version – Displays the .NET Framework version for the current application pool.

IIS app pool identity – The identity of the IIS application pool.

FFmpeg.exe found? – Indicates whether the utility FFmpeg.exe was found in the application’s bin directory. When present and the application is running under full trust, Gallery Server Pro is able to encode video and audio and generate thumbnails for video files.

ImageMagick found? – Indicates whether the utility convert.exe, which is a component of ImageMagick, was found in the application’s bin directory. This utility allows Gallery Server Pro to generate thumbnails for additional file types such as Photoshop (PSD), EPS images, Adobe Reader (PDF), and more. Some file types require GhostScript to be installed on the server.

NOTE: FFmpeg, ImageMagick, and GhostScript are open source programs that are installed separately. As a convenience, they have been bundled into a single ZIP file called the Gallery Server Pro Binary Pack.

Data providers This section provides read-only information about how the ASP.NET data providers are configured in web.config. Click the information icon next to each provider to learn more about.

Site Settings – Backup and Restore Data Gallery Server Pro stores data in two locations:

 The media files are stored in a physical directory on the web server’s hard drive.

 Information about media objects and albums are stored in a SQL Server or SQL CE database.

Backing up, moving, copying, or restoring Gallery Server Pro data requires moving or copying both sets of data. The backup function built in to Gallery Server Pro exports all gallery data to an XML file, and the restore function replaces existing data with the data in the XML file.

Note: The backup / restore function backs up and restores only the gallery data, not the media files.

There are several techniques for implementing a backup strategy, several of which do not even use the built-in backup / restore function. See the next section for more information about performing regular backups.

Backup strategy A regular backup is a normal part of every computer user's life. Which method you use, and how often, is up to you. Hopefully you don't learn the hard way that your strategy is inadequate.

Gallery Server Pro 2.6 Administrator’s Guide Page 141 of 267

Backing up your gallery data involves these sets of data:

 The media files  The data in the database.  web.config configuration file

Backing up the media files The media files are stored on your server's hard drive and can be backed up the same way you back up any files. You can discover the location where the media files are stored by referring to the Original file storage location on the Media Objects – General page in the Site admin section of Gallery Server Pro. In the example below, the media files are stored at C:\inetpub\wwwroot\gs\mediaobjects.

Backing up the data SQL Server: For SQL Server databases, there are a number of ways to back up the data:

 Use the backup functionality built in to SQL Server.  Use the backup function built in to Gallery Server Pro to export data to an XML file. See below for more information.  Use a third party backup program that knows how to back up SQL Server databases. SQL CE: If you are using SQL CE, backup your data with one of these techniques:

 Use the backup function built in to Gallery Server Pro to export data to an XML file.  Copy the data file App_Data\Galleryserverpro_Data.sdf to your backup location, either manually or through an automated script.

Backing up the web.config configuration file The web.config file, stored in the root of your Gallery Server Pro web application, stores information specific to your application. If desired, back up this file using the same technique you use for your media files, whether it is a third party program, manually copying, or an automated script.

Gallery Server Pro 2.6 Administrator’s Guide Page 142 of 267

Using the built-in backup function to create a backup file The database stores information about your media objects, such as title, extracted metadata, file names, etc. To export this data to an XML file, follow these steps.

1. Log on to Gallery Server Pro with an account that has Administer Site permission. 2. Click the Actions menu and go to Site admin. 3. In the left menu, navigate to the Backup / Restore page. The following screen appears:

4. To include login accounts in the file, make sure the Export user accounts option is selected. Note: Selecting Export user accounts includes the users, roles, and applications stored in the membership tables (the tables whose names start with "aspnet_"). When selected, ALL membership data is exported. If you are using these tables to manage membership for other applications, be aware that the data for these other applications are also included in the backup file.

5. To include the gallery data, make sure the Export media object and album data option is selected. 6. Click Create and download backup file. A file is created and downloaded to your browser. Note: Remember that the backup file does not include the media files. It includes information about the media objects, such as titles, captions, and extracted metadata.

Note: Be aware that the backup file may contain passwords in clear text format. Gallery Server Pro 2.6 Administrator’s Guide Page 143 of 267

Using the built-in restore function Use the restore function to replace all data in your Gallery Server Pro database with the data in the backup file. Remember that the backup file does not include the media files. Restore these files separately by copying them from your backup device to your media objects directory. (You can do this either before or after the restore.)

Note: The backup file must be the same data schema version as the version expected by the web application. For example, a backup file created in 2.3 cannot be restored to 2.4. You can view the current data schema version by creating a backup file and inspecting the contents with a text editor. The version is in the SchemaVersion element, like this: 2.4.5.

SQL Server 2005 / 2008 users: The restore function uses a very efficient algorithm for importing large amounts of data very quickly (equivalent to the bcp utility), but this technique requires SQL permissions equivalent to that provided in the db_ddladmin or db_owner roles. You may have to temporarily modify the connection string in web.config to specify a user with elevated permissions. After the restoration is complete, you can revert to the original permissions.

Note: Restoring data replaces the existing data. This action cannot be undone!

To restore the gallery data from an XML file created with the backup function, follow these steps:

1. Log on to Gallery Server Pro with an account that has Administer Site permission. 2. Click the Actions menu and go to Site admin. 3. In the left menu, navigate to the Backup / Restore page. Click the Restore tab. The following screen appears:

Gallery Server Pro 2.6 Administrator’s Guide Page 144 of 267

4. Use the Browse button to select the backup file. Click Upload. The file will be verified and the web page will display the number of records in each of the tables in the backup file. 5. To import login accounts, make sure the Import user accounts option is selected. Note: If you de-selected the option Export user accounts when you created the backup file, then you do not have any users to restore. In this case, make sure to de-select the option Import user accounts

Gallery Server Pro 2.6 Administrator’s Guide Page 145 of 267

when restoring your data so that the current accounts - including the one you are logged on as - are not deleted.

6. To import the gallery data, make sure the Import media objects and album data option is selected. 7. Click Restore data. When the restore process is finished, a message will confirm that the restoration is complete. Note: Your current login account may no longer be valid since it was deleted during the restore. If this occurs, log out and log in using an account that was in the backup file.

Migrate Gallery Server Pro to a new location Follow these directions for transferring an existing installation of Gallery Server Pro to another web application. The new web application may be on the same server or a new server.

1. Copy the web application files to the destination. 2. Use Internet Information Services (IIS) Manager to configure the new directory as a web application, ensure it is running under ASP.NET 4.0 or higher, and – for IIS 5/6 – has default.aspx specified as the default document. Note: If you encounter an error about permissions, use Windows Explorer to give the user account IIS is running under modify permission to the web directory (ex: C:\inetpub\wwwroot\galleryserverpro). Refer to the section Configuring NTFS Permissions In Microsoft Windows for more information.

3. If necessary, move your media files to the new location. 4. If you are using SQL CE, then you already copied the gallery data, since it is in the file App_Data\Galleryserverpro_Data.sdf. Skip the next step. 5. If you are using SQL Server and you need to migrate the data to another instance of SQL Server, you have a few options:  Use the tool built in to SQL Server for detaching / backing up and re-attaching / restoring the Gallery Server Pro database. Refer to your SQL Server documentation for more information.  Use the tool built in to SQL Server to backup and restore the database. Refer to your SQL Server documentation for more information.  Use the backup function in Gallery Server Pro to back up the data to an XML file, then use the restore function at the destination gallery. Refer to the relevant section in this guide for creating a backup file and restoring it. 6. If necessary, update the SQL Server connection string in web.config. 7. Use your web browser to navigate to your new gallery. If the media files are stored in a new location, you may need to update Gallery Server Pro so that it knows where your files are. This is on the Media Objects - General page in the Site administration console.

Gallery Server Pro 2.6 Administrator’s Guide Page 146 of 267

Gallery Manager The gallery manager page allows you to manage the galleries in the application. A single gallery is created when Gallery Server Pro is installed. Refer to the section Working with Galleries to learn more about them.

Above is a screen shot of the Gallery Manager page. It shows two galleries in the application and indicates that the current web page is pointing to the Marketing gallery.

Note: Be aware that only those galleries you have permission to administer are shown. Site administrators always have permission to all galleries. But one or more galleries will be hidden from gallery administrators when they do not have administrative permission to the gallery.

Switching galleries Recall that each instance of the Gallery Server Pro user control on a web page points to a single gallery at a time. A default installation of Gallery Server Pro includes one web page named default.aspx that points to a single gallery that is created during installation.

If you wish, you can configure the current web page to point to a different gallery by selecting the desired gallery and then choosing Switch to selected gallery. After making the switch, view the items in the gallery by browsing the gallery in the normal manner (click ‘All albums’, click the gallery title, etc.)

The typical scenario for switching galleries is when you add a new web page and gallery and then want to point the web page to the new gallery. A demonstration of this example is in the section How-To: Set up multiple galleries.

Gallery Server Pro 2.6 Administrator’s Guide Page 147 of 267

Creating, editing, and deleting galleries Create a new gallery on the Gallery Manager page by entering a name and choosing Create gallery.

Important! After creating a gallery, it is highly recommended you immediately update the media objects storage directory to a new location, since by default it has an initial value of \gs\mediaobjects\, which may be used by another gallery. Do this on the Media Objects – General page.

Edit the name of a gallery by choosing the Edit button. Note that all you can edit is the name. To modify settings for a gallery, see the next section.

Delete a gallery by clicking the Delete button. This action will delete all database records associated with the gallery, but it will not delete the media files. To delete the media files, use a tool like Windows Explorer to manually delete them.

Modifying settings for a gallery Most of the pages in the Site administration console expose settings for a gallery. (Some are application wide and one – Gallery Control Settings – expose settings for the Gallery user control on the web page.)

To modify a setting for a gallery, first make sure the gallery is configured as the current gallery on the Gallery Manager page. Then navigate to the relevant settings page and update the setting.

Gallery Settings The Gallery Settings page exposes several settings that apply to the current gallery.

Gallery Server Pro 2.6 Administrator’s Guide Page 148 of 267

Gallery Server Pro 2.6 Administrator’s Guide Page 149 of 267

Notice that, in the screen shot above, a message at the top indicates “This page applies to: Gallery ‘Marketing’”. Each page in the Site administration console has a similar message at the top to indicate the scope of the settings on the current page.

Display Options Show header* When checked, the header area of the gallery is displayed. The header includes the gallery title and various links at the top right (login/logout, search, edit account, and user album home page links).

Gallery title* The header text that appears at the top of the gallery. This can be blank.

Gallery title URL* The URL the user will be directed to when they click the header text. This setting is optional – if not present, no link will be rendered. This setting is ignored if the Gallery title field is empty.

Allow anonymous Indicates whether users can browse the gallery without logging in. When browsing* unchecked, users must log in with a valid account to view media objects.

Allow anonymous Indicates whether users can view the original, high resolution images without browsing of high logging in. When unchecked, users must log in with a valid account to view resolution images media objects, and that account must belong to a role that allows viewing the high resolution images.

This setting is ignored when anonymous browsing is disabled.

Show login/logout When checked, login and logout controls are displayed in the top right corner of buttons* every page. You may want to disable this feature when the audience is primarily anonymous web users without user accounts or when you provide your own authentication system. Administrators can always log in by navigating directly to the login page (use the query string g=login; ex: default.aspx?g=login).

Show search link* Indicates whether to display the search link in the top right corner of every page.

* Indicates a setting that can be overridden on the Gallery Control Settings page

E-mail Settings SMTP server Specify the IP address or name of the SMTP server used to send emails (e.g. 127.0.0.1, Godzilla, mail.yourisp.com).

If you wish to use the SMTP server specified in web.config, (either explicitly assigned in this web application or inherited from a parent application) you may leave this field blank. Gallery Server Pro will automatically use the value specified in the system.net mailSettings section if no value is specified here.

Gallery Server Pro 2.6 Administrator’s Guide Page 150 of 267

SMTP server port Specify the port number to use when sending SMTP mail. This setting is useful when the web server is behind a proxy.

If you wish to use the SMTP port specified in web.config (either explicitly assigned in this web application or inherited from a parent application), you may leave this field blank. Gallery Server Pro will automatically use the value specified in the system.net mailSettings section if no value is specified here.

If not specified, and if no value is defined (nor inherited) in web.config, the default port 25 is used.

Use SSL Select this option to send e-mail using Secure Sockets Layer (SSL) encryption. For example, the Gmail SMTP server requires SSL.

Name and address Emails sent from Gallery Server Pro (error reports and password change to show emails as notifications) will appear to be sent from this person at this email address. coming from

Specifying authentication details If your e-mail provider requires authentication, you can specify a username and password in web.config. Open web.config, located in the web application root, and look for this section:

Uncomment the section by moving the --> to just before the element. Then update the host, port, userName, and password attributes to the correct values. When you are done, it will look something like this:

Gallery Server Pro 2.6 Administrator’s Guide Page 151 of 267

Note: When you enable this section in web.config, the SMTP server and port on the Site Settings - E-mail page are ignored, so you must specify the server (i.e. the host attribute) and port in web.config.

Error Management Email detailed When checked, the users specified below are sent a detailed report when a reports when web web site error occurs. The e-mail settings must be configured. site error occurs

Users to notify Specifies the users to receive the e-mailed error report.

Enable error Select this option to use Gallery Server Pro's own error handling routine to handling deal with all unexpected errors. Disable this option if you have an application-level error handler defined in web.config or global.asax you want to use for unhandled exceptions.

Show error details Indicates whether to display the full details of any unhandled exception that occurs within the gallery. This can reveal sensitive information to the user, so it should only be used for debugging purposes. When unchecked, a generic error message is displayed. This setting has no effect if Error Handling is disabled.

If an error is preventing you from opening this page to enable the option, you can enable it directly in web.config. Open web.config in a text editor, find the debug=”false” setting, and set it to “true”. This setting should be changed back to “false” as soon as possible.

Error handling and in web.config: Gallery Server Pro implements its own error handling mechanism that is independent of the section in web.config. This allows Gallery Server Pro to have the desired behavior without depending on a particular configuration of . However, you can override this behavior and revert control to if you wish. To do this, disable the error handling by unchecking the checkbox on this page.

Gallery Control Settings You already know what a gallery setting is: It is a setting that applies to a specific gallery. Most of the pages in the Site Admin area help you manage this type of setting.

But what is a gallery control setting? These are settings that apply to a specific instance of a Gallery Server Pro user control on a page. These settings are managed on the Gallery Control Settings page:

Gallery Server Pro 2.6 Administrator’s Guide Page 152 of 267

Notice the message at the top:

“This page applies to: The Gallery user control 'g' on page '/default.aspx'”

This message tells you the settings on this page apply only to the user control with an ID of “g” on the web page default.aspx. If you open default.aspx in a text editor, you can see what it refers to:

Gallery Server Pro 2.6 Administrator’s Guide Page 153 of 267

The Gallery Control Settings page helps you define the look and behavior of the gallery for a particular web page. This is useful in many scenarios, including:

 You want to create a web page that automatically shows a slide show of items from your gallery.

 You want to create a web page that shows a particular album or media object.

 You want the gallery exposed as a treeview.

 You want to create a custom view of your gallery.

Typically, modifying the gallery control settings involves having two web pages that both point to the same gallery. The Gallery Control Settings page allows you to change the look and behavior of one of the pages, while retaining the default behavior of the other one.

Creating a second web page is easy – just make a copy of default.aspx and give it a new name. Then open it in your web browser and edit the settings as desired. (Make sure the new web page points to the desired gallery.)

VERY IMPORTANT: Changing a gallery control setting OVERRIDES the gallery setting.

View mode The view mode specifies how albums and media objects are displayed.

Album - A single album is shown, with the contents displayed as a set of thumbnail images.

Media object - A single media object is shown. If the URL specifies an album, then the first media object in the album is displayed.

Gallery Server Pro 2.6 Administrator’s Guide Page 154 of 267

Treeview - The gallery is rendered as a treeview of albums. You can optionally specify an URL to navigate to when an album node is clicked. The ID of the clicked album is automatically included in the URL's query string. This can be useful for displaying a treeview that acts as a menu to take users to another page containing a gallery control.

Default gallery object The default gallery object specifies which gallery object to display when an object is not specifically requested. That is, loading the web page without any query string parameters will cause the gallery object specified here to be displayed.

You can select the current gallery, which will show the root level album, or you can choose a specific album or media object.

Users are never shown objects they do not have permission to view. When the default gallery object is set to the current gallery, the user is shown the highest album he or she has permission to view. If an album or media object option is specified and the user does not have permission to view it, a message appears telling the user they have insufficient permission.

NOTE: When the Allow URL navigation option is enabled, users can navigate to other albums and media objects by specifying an album or media object ID in the query string.

Display options The display options section customizes the display of various elements of the gallery.

Gallery Server Pro 2.6 Administrator’s Guide Page 155 of 267

The options are pretty straight-forward, but you can click the information icon next to each one for detailed information.

I will point out one thing about the Show ‘Actions’ menu setting: Even when this option is unchecked, the Actions menu is still displayed for site and gallery administrators. This is a Good Thing, since it allows you to get back to the Site administration console.

Gallery Server Pro 2.6 Administrator’s Guide Page 156 of 267

General – Error Log Gallery Server Pro stores a log of errors and unexpected events. These items can be access on the Error Log page:

View detailed information about each error by clicking the plus sign at the beginning of the row. When trying to discover the cause of an error, consider these tips:

 Read the message carefully. Sometimes a solution is provided within the message.  Use the Gallery Server Pro forum or a to search for your error message. Chances are pretty good that someone has already seen the same error.

Gallery Server Pro 2.6 Administrator’s Guide Page 157 of 267

 Consider whether it is negatively affecting your gallery. For example, a malicious robot might be sending malformed data to the gallery, triggering an error. Study the details to discover whether the source was a real user or a robot. The HTTP User Agent string is helpful here.  If you cannot discover the cause of an error message, feel free to post a question on the forum. Please include ALL the detailed information in the log, but use care not to post sensitive information. For example, an error that occurs while logging in may contain your password in the details.  If you post a question on the forum and I answer it by pointing to another thread or the Administrator’s Guide, you lose 10 Karma points.

Membership - User Settings The following screen shot shows the User Settings page:

Gallery Server Pro 2.6 Administrator’s Guide Page 158 of 267

Gallery Server Pro 2.6 Administrator’s Guide Page 159 of 267

Self registration Gallery Server Pro supports anonymous users creating accounts in the gallery. There are several configuration options available such as requiring a valid e-mail address, setting the default security access and more.

A full discussion of this feature, including how to configure it, is in the Self Registration section.

User albums Gallery Server Pro can be used in community scenarios where users automatically receive a personal album they manage.

A full discussion of this feature, including how to configure it, is in the User album section.

User accounts This section describes several settings related to user accounts.

Send e-mail when user is created Users specified here receive an e-mail notification when an account is created. This applies to both administrator-created or self-registered accounts.

Gallery Server Pro 2.6 Administrator’s Guide Page 160 of 267

To receive an e-mail, each user must have a valid e-mail address and e-mail functionality must be configured.

If self-registration is enabled with the e-mail validation option selected, then the e-mail is not sent until the new account holder validates the account from the verification e-mail.

Allow users to enter HTML Indicates whether to allow limited HTML in titles, captions and external media objects (for example, embed code for a YouTube video). When checked, any HTML that is not approved is automatically removed when the user attempts to enter it. For external media objects, the user is alerted and the object is not added.

When unchecked, HTML is not accepted in any user-editable field. This is the most secure and reliable way to prevent malicious attacks such as cross-site scripting.

Unchecking this option does not remove HTML from existing objects. However, new and changed album and media object titles and captions will be stripped of HTML when they are saved.

Note: Read more about Security considerations when allowing HTML and javascript in user-entered input.

Allowed HTML tags This is a comma separated list of HTML tags that are accepted as user input when the HTML option is enabled. If a tag is in this list, a user may include it in album titles and summaries, media object titles, and external media object HTML snippets.

For best performance, put the most commonly used HTML tags first.

Allowed HTML attributes This is a comma separated list of HTML attributes that are accepted as user input when the HTML option is enabled. If an attribute is in this list, a user may include it in album titles and summaries, media object titles, and external media object HTML snippets.

Note that when an attribute is allowed, the value of the attribute is also allowed. The only filtering that takes place on an attribute value is the removal of the string "javascript:" when the javascript option is disabled.

Allow users to enter javascript Specifies whether javascript is allowed in user input. When enabled, a user may include