Saturday, May 18, 2013

Gallery Server Pro Headquarters Relocated to Boulder, CO

A few minutes ago I fired up the PC in my new home office in Boulder, CO. That’s right – my family has moved from my childhood home in Fort Atkinson, WI to a new home in Boulder. That’s why I haven’t been able to respond to the recent forum posts regarding v3 RC1 - I’ve been off the grid for several days except for what I can accomplish on a smart phone along I-80. Between packing and driving a giant U-Haul truck towing a car across Iowa and Nebraska, I could do little more than read the forum posts the last few days. I’ll address everything in the coming days as we settle into our new life.

We lived in Boulder a decade ago but had moved to WI to be closer to my folks in 2004. It’s been wonderful to be near family but the mountains and culture of Boulder kept whispering in our ears. Last summer we visited Boulder on a vacation and it really sunk in how much we missed the place. Check out some of the top rankings Boulder gets:

  • The 10 Happiest Cities – # 1
  • Top Brainiest Cities – No. 1
  • Ten Best Cities for the Next Decade – 4th
  • Gallup-Healthways Well-Being Index – No. 1
  • Best Cities to Raise an Outdoor Kid – No. 1
  • America's Top 25 Towns to Live Well – No. 1
  • Top 10 Healthiest Cities to Live and Retire – No. 6
  • Top 10 Cities for Artists – No. 8
  • Lesser-Known LGBT Family-Friendly Cities – No. 1
  • America's Foodiest Town – No. 1

I’ll continue working on Gallery Server Pro while Margaret looks for a new job. Our 5 year old son is excited to live in a neighborhood teeming with children and having a killer playground just around the corner. In fact, I just returned from buying him a treat from an ice cream truck meandering through the neighborhood. Sweet!

Friday, May 10, 2013

Gallery Server Pro 3.0 Release Candidate 1 Available

Today I am making available release candidate 1 of Gallery Server Pro 3.0. It is functionally complete and now includes support for upgrading from 2.6.0 and higher. This is a major release and includes a tremendous number of new features and updated styling. Here are a few previous blog posts to refresh your memory:

Public Preview of Gallery Server Pro 3.0

Gallery Server Pro 3.0 Beta Released!

Add a PayPal shopping cart and Facebook to your gallery in 10 minutes

You can download the release candidate here:

Download Gallery Server Pro 3.0 RC1
Download Gallery Server Pro 3.0 RC1 (source code)

Skins

The RC ships with two skins – dark and light. The Site Settings – General page lets you switch to a different skin and the popup help icon gives you tips on how you can tweak the styling to suit your preferences, including how to create your own skin.

The beta site has been using the dark skin for a while. Just for fun, I switched it to the light skin for the RC. Check it out.

Reporting Bugs

While I shipped the RC with no known bugs, I will bet good money some are still lurking. Gallery Server Pro is a complex product with over 125 settings, and I have not exhaustively tested every one, much less the nearly infinite combination of them. And don’t even get me started on browser compatibility (sorry IE 6 and 7 users, I can’t support you any longer.) So please report anything you find in the forum.

Product Key and Licensing

The product keys you used in 2.6 do not work in the RC, and I do not yet have the infrastructure in place to provide new ones, so your RC gallery must run in trial mode. The RC is fully functional in trial mode and I expect to release the RTM version before the 30-day window ends, along with an updated product key wizard.

There will be a few licensing changes for 3.0. A free GPL version will continue to be available and I am adding a commercial license that offers benefits not available to GPL license holders. A subsequent blog post will dig into the details.

Upgrade from 2.6

Version 3.0 supports upgrading 2.6 or higher galleries. Note that some settings will be preserved while others are reset to conform to the 3.0 requirements. The upgrade wizard from previous versions has been replaced by a new process that allows you to import a 2.6 backup file into a 3.0 gallery. Follow these steps:

  1. Make a backup of your database, web files, and media files. You’ll only need them if the upgrade fails and you need to revert to 2.6.
  2. In your 2.6 gallery, go to the backup/restore page and create a backup file of your user accounts and gallery data.
  3. Delete your web files, but not your media files (the ones stored in gs\mediaobjects by default).
  4. Download the RC and extract the files to your web directory. As with 2.6, the IIS account needs modify permission to the App_Data and gs\mediaobjects directories.
  5. If using SQL Server, open web.config and update the connectionStrings section to use the SqlClient provider instead of SQL CE (that is, comment out the SQL CE connection string and uncomment the SQL Server one.) Then update the SQL Server connection string to point to your gallery database. Note that 3.0 uses a completely different naming scheme, so the 3.0 tables will exist along side your 2.6 ones until you get a chance to manually delete the 2.6 ones (if you want to). For example, the table gs_Album from 2.6 is named Gsp.Album in 3.0 (note the use of a new Gsp schema).
  6. Open default.aspx in a browser. The gallery will detect that no data structure exists for the connection string named GalleryDb and automatically create it. (For you techies it’s using Code First Migrations for this part.)
  7. A default page will load with a message allowing you to create an admin account. Go ahead and create one. This account will be replaced during the restore operation, so don’t worry about writing down the password.
  8. Now you should be able to go to the backup/restore page in your 3.0 gallery. Click the restore tab and upload the backup file you created in step 2 above. Then restore it.
  9. The restore operation detects the file is from 2.6 and upgrades the schema as it imports it into the new tables it created in step 7. For large galleries this can take a few minutes, especially if you are using SQL CE.
  10. Once complete, review the settings on the various admin pages to verify everything looks the way you want it.

Writing the migration code to convert the 2.6 data to the 3.0 schema was a challenge, and I haven’t had very many databases to test it out on. So it’s very important you try out the upgrade process to make sure it is robust. I wouldn’t be surprised if we find a few glitches, but I need your help to find them.

If you don’t have time to try the upgrade yourself but would like to volunteer your database for testing, send your 2.6 database to me at roger*at*techinfosystems*dot*com (i.e. your .sdf or .mdf file). I’ll test it to make sure it converts. But be aware that a default gallery installation stores passwords as plain text in the database file, so if you won’t want me to see them, don’t send it to me. You can preserve some security by sending me your database anonymously.

Upgrade from the RC to 3.0 RTM

I am hopeful that very small changes will be necessary between the RC and the final release. If so, there is a good chance that you can easily upgrade your RC gallery by copying over a fresh set of web files. Unfortunately, I can’t promise this will be the case, so be prepared for the possibility that there won’t be a RC to RTM upgrade path.

When is it going to be released?

That depends on the RC. I’ll wait a couple weeks to see what gets reported. If there is nothing major, I think I’ll have it out by early June. That will be a Very Good Day.

Monday, April 22, 2013

Security Vulnerability for 2.6.1 Patched

Last week a security company alerted me to a vulnerability in Gallery Server Pro. In certain circumstances, a malicious user can manually construct an HTTP request to upload an arbitrary file to the server that may contain code, which may then be executed with a subsequent HTTP request. A user may also be able to upload a file to any album, even one where the user does not have edit album permission.

The fix is in the file GalleryServerPro.Web.dll (TechInfoSystem.GalleryServerPro.dll in the DotNetNuke version) and can be obtained in the patch listed on the download page. Copy the DLL to your bin directory. No other action is necessary. (The other files in the patch fix a UI issue with IE10 and are not related to this vulnerability.)

I strongly recommend you apply this patch. It takes only a minute.

The fix has also been applied to the v3 code, so this vulnerability will not be present in the final 3.0 release.

I should stress that in a default installation anonymous users cannot take advantage of this vulnerability. To exploit the issue, the malicious user must already have a user account in the gallery and be logged on. To write a file outside the mediaobjects directory, the admin must have configured the IIS app pool identity to allow writing to those directories.

The source code for 2.6.1 has been updated, so no patch is necessary for that version. If you are curious, the fix is in the file Website\gs\handler\upload.ashx.cs (function SaveFileToServer).

My thanks goes out to the company who responsibly reported this issue and for giving me time to address it and get it into your hands.

Security best practice tips

Here are a few tips to maximize the security of your gallery installation:

  • Create a unique IIS app pool identity that is used solely for the gallery website. Lock down its permissions to read access for web files and read/write access to the App_Data and media objects directory.
  • Store the media objects directory outside the web application root. This has the added benefit of not triggering an app restart when an album is deleted (which deletes the directory, causing ASP.NET to restart the app).
  • Don’t let users enter HTML and especially javascript in titles and caption. These setting are on the User Settings page and are disabled by default.
  • Keep the option ‘Display detailed error message when an exception occurs’ disabled, turning it on for debugging only (Gallery Settings page).
  • Keep debug set to ‘false’ in web.config.
  • Switch to hashed or encrypted passwords for users.
  • Run the app in medium trust. This has a downside, though, in that you can’t take advantage of the features in the GSP Binary Pack.
  • (SQL Server) Use Windows Authentication to connect to the database using the IIS app pool identity and configure the database to give the smallest possible set of permissions to this user. Basically, that means select/execute permission on the views/stored procedures for 2.6 and select/update/insert/delete permission to the tables for 3.0+.

Monday, April 1, 2013

Add a PayPal shopping cart and Facebook to your gallery in 10 minutes

Probably the most exciting feature in 3.0 is the template engine that generates the UI from jsRender templates. They are easy to modify and don’t require .NET or C# programming experience. This feature gives you the power and flexibility to mold the gallery experience to fit your website requirements and UI style guidelines.

There is a lot to write on this topic, but let’s start with a demonstration to show how easy it is. We’ll customize a default installation of the 3.0 beta to add these features:

  • Add a Facebook ‘Like’ button for every gallery item.
  • Add the Facebook comment widget to allow discussions for each gallery item.
  • Add PayPal ‘Add to cart’ and ‘View cart’ widgets to let users add gallery items to a shopping cart and manage them.
  • When users are ready to complete their purchase, they use the secure payment process provided by PayPal. PayPal notifies the website owner of the purchase via e-mail and optionally a programmatic callback, who can then take the necessary action (ship items, add user to new role, etc).

We can make all of these changes on the new UI Templates page in the site admin area. Here is what it will look like when we’re done:

uitmpl17

You can see these changes in action in the beta site. This tutorial combines Facebook and PayPal integration and applies it to the entire gallery, but in the beta I split them into two child albums: Facebook album and PayPal album

NOTE: Be sure you are using the latest version of the beta. This tutorial requires a version of the beta that was released today (April 1) or later. You can check your own version by looking at the date modified timestamp on GalleryServerPro.Web.dll in the bin directory. It should be April 1, 2013 or later.

Download Gallery Server Pro 3.0 Beta
Download Gallery Server Pro 3.0 Beta (source code)

More info, including install instructions

 

Facebook ‘Like’

Let’s add a ‘Like’ button at the top of the right pane each time a media item is displayed:

uitmpl6

Go to the UI Templates page in the Site admin area and select RightPane in the Gallery item dropdown:

uitmpl1

We want to modify the right pane template, but we don’t want to mess with the default one in case we want to revert back to it and to eliminate the possibility of our changes getting overwritten during an upgrade. So click Copy as new, type Facebook & PayPal Integration for the name and click Save:

uitmpl2

Before we continue with our new template, we want to deactivate the default one. Select Default from the Name dropdown, click the JavaScript tab, uncheck all the albums, and save.

uitmpl3

At this point our new template is being used to render the right pane. Go back to the new template by picking it from the dropdown.

Adding a ‘Like’ button requires some HTML and JavaScript. Facebook provides the code we can use as a starting point, but we need to tweak it a bit. The code is not specific to any Facebook account so you can just copy and paste the text I use here:

HTML:

<div id="fb-root"></div>
{{if MediaItem != null}}
<iframe src="//www.facebook.com/plugins/like.php?href={{:App.HostUrl}}{{:App.CurrentPageUrl}}?moid={{:MediaItem.Id}}&amp;width=450&amp;colorscheme=dark&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height:27px;display:block;margin:5px 0 0 5px;" allowTransparency="true"></iframe>
{{/if}}

JavaScript:

(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));

$('#{{:Settings.MediaClientId}}').on('next.{{:Settings.ClientId}} previous.{{:Settings.ClientId}}', function() {
if (typeof (FB) != 'undefined') FB.XFBML.parse();
});

Paste the HTML in at the beginning of the HTML template and paste the JavaScript in at the end of the existing script, then save.

uitmpl4

uitmpl5

This code differs from the sample Facebook provides in two respects:

Conditional rendering – There will be times when we don’t have a single media item in scope when the right pane is rendered. This happens, for example, when the user drags a select box around several thumbnails. In this situation, the right pane displays a summarized view of all selected items, and since we can’t generate a unique URL to give to Facebook that represents this situation, we don’t want to render the like button. So we wrap the iframe in a jsRender if conditional ({{if …}}…{{/if}}) that checks the client API to see if we have a single media item available. When we do, the contents of the if statement are rendered; otherwise we just skip that chunk of HTML.

Replacement parameters – We need to generate a unique URL to give to Facebook to represent the media item being liked. We construct it from several properties available to us in the client data model:

{{:App.HostUrl}}{{:App.CurrentPageUrl}}?moid={{:MediaItem.Id}}

As the page is being rendered in the browser, jsRender replaces each {{..}} section with the property referenced inside. So what gets generated in the client-side HTML ends up being a real URL:

http://beta.galleryserverpro.com/default.aspx?moid=3502

The JavaScript code does two things:

  1. It dynamically loads the Facebook JavaScript library.
  2. It calls the Facebook parse routine each time the next and previous media event occurs. Without this, the like button would appear when the page first loads, but not as the user navigates between items with the next and previous buttons.

Now navigate to a media object and notice the like button. It works just like you would expect, and if that’s all you wanted to do to your gallery, you are done. But let’s keep the sweetness going.

uitmpl6

 

Facebook Comments

Facebook offers a comment widget that lets you add discussion capability to any website. It includes moderation tools and even lets users log in with providers other than Facebook, such as Yahoo, AOL, and Hotmail. Let’s add the widget under each media item.

On the UI Templates page, select the MediaObject template, create a copy of it named Facebook & PayPal Integration, and save it. Then switch over to the default template, uncheck all the albums associated with it, and save. We’re doing the same thing we did with the right pane template – making a copy and activating it.

Here is the HTML provided by Facebook, tweaked to replace the static URL with a dynamic URL:

<div class="fb-comments" data-href="{{:App.HostUrl}}{{:App.CurrentPageUrl}}?moid={{:MediaItem.Id}}" data-width="470" data-num-posts="10" data-colorscheme="dark"></div>

We’re constructing an URL using replacement parameters the same way we did with the like button. Paste it in at the location shown here and then save.

uitmpl7

We didn’t have to add JavaScript this time because the script we added for the like widget also covers us here. If we hadn’t added the like widget, then we would have had to add that script into our template here. Now view a media object and start adding comments:

uitmpl8

 

PayPal Integration

Now let’s add e-commerce to our gallery with the widgets provided by PayPal. Your media items can represent anything you want to sell – photographs, videos, or physical objects like clothing or toys. When your customers finish paying at PayPal, you get an e-mail with details about the purchase, including the title of the media item and its unique ID (this corresponds to the moid query string parameter and the ID column in the media objects table in the database).

Advanced admins can even configure PayPal with a callback URL that can programmatically receive the purchase details and take action without human intervention. One example might be to add the buyer’s account to a role that gives them access to the high resolution version of the images they purchased.

The first step is to set up a PayPal account and use their button wizard to generate the HTML for the ‘Add to cart’ and ‘View cart’ buttons. PayPal has excellent documentation for this process, so I’ll refer you to that. Here is the code PayPal provides for the add to cart button that links to my account:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JP2UFSSRLBSM8">
<input type="image" src="
https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="
https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

We need to make a few modifications to it before we can use it in our template:

<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="JP2UFSSRLBSM8">
<input type="hidden" name="item_name" value="Photograph - {{:MediaItem.Title}} (Item # {{:MediaItem.Id}})">
<input id='{{:Settings.ClientId}}_addToCart' type="image" src="
https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="addToCart" alt="PayPal - The safer, easier way to pay online!" style="padding:5px;">
<span style='display:inline-block;vertical-align:top;margin-top:10px;'>$1.00</span>
<img alt="" border="0" src="
https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">

Remove the form – ASP.NET renders all page content inside a form, and we can’t nest forms, so we remove the beginning and ending form elements.

Add item_name – We add a hidden input tag named item_name that holds the description of the item and it’s ID. This is picked up by PayPal to describe the purchased item in the invoice.

Add ID to button – We add a unique ID to the button (the input tag of type image). We do this so we can get a reference to it in JavaScript – more on that below. The ID includes the ClientId property to ensure it is unique even if multiple instances of a gallery are on a single page. That is not common but better safe than sorry, right?

Add the price – We add a span tag with the price. This is just for display purposes. The real price is stored on the PayPal server and cannot be overridden for security reasons. If you need different prices on your items, you can generate additional button templates at PayPal or use the PayPal API.

Paste the code into the HTML area of the right pane template named Facebook & PayPal Integration. We can add it right next to the Facebook code we added earlier:

uitmpl9

We also need to construct a bit of JavaScript:

var bindAddToCartButton = function() {
$('#{{:Settings.ClientId}}_addToCart').click(function() {
  var f = $('form')[0];
  f.action = '
https://www.paypal.com/cgi-bin/webscr';
  f.submit();
  return false;
});
};

$('#{{:Settings.MediaClientId}}').on('next.{{:Settings.ClientId}} previous.{{:Settings.ClientId}}', function() {
bindAddToCartButton();
});

bindAddToCartButton();

This script does the following:

  1. Adds an event handler to the click event of the add to cart button to submit the form to PayPal.
  2. Binds this event handler when the page loads and also when the user clicks the next/previous buttons.

Paste this script in after the Facebook code, like this:

uitmpl11

Save it and take a look:

uitmpl10

When you click the button you are redirected to PayPal where you can see your cart:

uitmpl12

Click the Continue Shopping button to return to the gallery, where you can add other items. At this point you can check out and complete your purchase anytime you add an item, but it would be convenient to add a view cart button to the top of the page. Let’s do that next. The HTML PayPal provides for viewing a cart looks like this:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="…encrypted text removed…">
<input type="image" src="
https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="
https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

We’ll include some of the same modifications we did to the add to cart button – remove the outer <form> tag and add an ID to the image button:

<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="…encrypted text removed…">
<input id="{{:Settings.ClientId}}_viewCart" type="image" src="
https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif" border="0" name="btnPayPal" alt="PayPal - The safer, easier way to pay online!" style='float:right;margin-top:5px'>
<img alt="" border="0" src="
https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">

Create a copy of the header template, call it Facebook & PayPal Integration, and deactivate the default one (just like with the media object and right pane templates). Then paste the HTML into the HTML template at the point where you want the view cart button to appear. In this example I’m putting it just before the {{if Settings.ShowLogin}} line:

uitmpl13

We need to wire up some script to submit the form when clicked, just like we did with the add to cart button. It can be a little simpler than that code, though, because we don’t need to bind it to next/previous events. That’s because the header is generated once when the page loads, while the right pane gets regenerated on each next/previous event. Here is the code::

$('#{{:Settings.ClientId}}_viewCart').click(function() {
var f = $('form')[0];
f.action = '
https://www.paypal.com/cgi-bin/webscr';
f.submit();
return false;
});

Select the JavaScript tab and add the script.

uitmpl18

Save your changes and notice the view cart button at the top right:

uitmpl16

Summary

We’ve integrated Facebook and PayPal into the gallery by doing nothing more than editing a few of the templates. Here is the final result:

uitmpl17

This is just one example of the power of the new UI templates feature. Future posts will dig into the client data model and some of the other new features. Have fun!

Friday, March 22, 2013

V3.0 Beta Refreshed

Today I released an updated beta version of Gallery Server Pro 3.0. Get it here:

Download Gallery Server Pro 3.0 Beta
Download Gallery Server Pro 3.0 Beta (source code)

See a demo of the beta here.

There is no support for upgrading an earlier beta. Delete the first beta and install this anew.

NOTE: An authentication cookie left over from the beta can trick the new version into thinking you are logged on, causing a problem when it can’t find a record for the user in the database. To prevent this, log out of your browser before deleting the beta.

The refresh includes these changes:

  • Many bug fixes, including most or all of the ones reported in the beta forum.
  • Changed upload page to use plUpload 1.5.6. (The 2.0 beta had some stability issues.)
  • Replaced the HTTP handler that receives file uploads to use an architecture based on Rick Strahl’s excellent Westwind.plUploadHandler.
  • Switched to a thread-safe architecture for storing albums and media objects in cache.
  • Albums are automatically resorted when objects are added via synchronizations and file uploads.
  • ZIP file uploads are extracted and processed asynchronously instead of forcing the user to wait.
  • Modified the architecture of the next/previous workflow so that the MediaObject UI template has access to all metadata items. That is, you can use the new jsRender function findMetaItem(metaId) to grab any meta item. Read this thread for an example.
  • Improved robustness of synchronization.
  • Improved performance when setting the privacy of an album. The action now occurs asynchronously.

Thursday, March 14, 2013

Gallery Server Pro 3.0 Beta Released!

I can’t tell you how excited I am to be releasing the beta of the groundbreaking 3.0 release of Gallery Server Pro. Two years in the making, it offers a beautiful user interface that is easy to use while giving administrators power and flexibility that no other digital asset management program offers.

Download Gallery Server Pro 3.0 Beta
Download Gallery Server Pro 3.0 Beta (source code)

See a demo of the beta here.

Be sure to add the Download Gallery Server Pro Binary Pack to get video/audio encoding, better thumbnail extraction, and more.

gsp_v3_beta1

Here is a quick rundown of the features:

  • UI completely rewritten using modern HTML5/CSS3
  • Three-pane layout minimizes scrolling
  • UI is rendered from customizable jsRender templates. Templates can target individual albums.
  • Video now encoded to H.264 MP4 video by default, allowing video to render on iOS, Android, and Microsoft ecosystems
  • Ability to tag media and albums, then create virtual albums matching those tags.
  • Apply properties to media and albums (editable metadata)
  • Full screen slide show
  • Able to browse through search results as if they were an album
  • Skinned user interface – ships with dark and light skins
  • Rate media objects on a 5-star scale
  • Flexible sorting
  • Adaptive rendering for mobile devices and tablets

Under the hood, there are significant changes as well:

  • New data provider model eliminates database-specific code and makes data upgrades significantly easier (EF Code First with Data Migrations)
  • Removed ComponentArt dependency and replaced with jQuery widgets
  • Removed dependence on MS Ajax library and ScriptManager
  • Replaced ASMX web services with Web.API
  • Simplified solution architecture to reduce number of projects from 11 to 6.
  • JavaScript follows modern patterns such as the Revealing Prototype Pattern and Revealing Module Pattern, with no variables exposed to the global scope.

Over the next few weeks I will explore these features in additional blog posts, but you’ll find some good stuff in the posts where I announced the Public Preview of Gallery Server Pro 3.0 and the announcement of GSP 3.0.

Requirements

Version 3 requires .NET 4.5 and ASP.NET on the server. This is a change from 2.6, which required .NET 4.0. By default it uses an internal SQL CE database, but you’ll get faster performance with SQL Server 2005 or higher, including the free Express versions.

Clients need only a web browser, with no dependencies on any plug-ins except where necessary to play certain media files (for example, playing MP4 on Chrome and Firefox requires Flash). Current versions of all major browsers have been tested and work well.

Installation

NOTE: This is pre-release software and does not include support for upgrading earlier versions of GSP, nor is there any guarantee you will be able to migrate to the release version. The final version will, however, support upgrading from 2.6.

Installation is improved from previous versions, which used an install wizard to guide you through database creation and admin account setup. I simplified it to the point where no install wizard was needed. Follow these steps:

  1. Extract the zip file to a directory. Configure the directory to run as an application in IIS under .NET 4.5. Make sure the IIS process identity has modify permissions to the App_Data and gs\mediaobjects directory.
  2. SQL Server only: To use SQL Server, open web.config and comment out the SQL CE connection string named GalleryDb. Add a connection string for your SQL Server – you can uncomment the sample SQL Server connection string in the file. Be sure it is named GalleryDb. If the specified database does not exist, the gallery will attempt to create it when the app starts.
  3. Open default.aspx in a web browser. The database will automatically be configured and seeded with default data. This step may take a minute or two, so be patient. The screen will look like this:

    gsp_v3_inst1
  4. Click the link to create an admin account. Enter a username and password and you are all set!

gsp_v3_inst2

gsp_v3_inst3

Running from Source Code

You can open the source code in Visual Studio 2012, including the free Visual Studio Express 2012 for Web. You should be able to compile and run the gallery without any additional dependencies.

Known Issues & Removed Features

These are the known issues:

  • Album treeview and splitter panes do not work in IE 8 and earlier
  • The light skin is not finished. In fact, it is exactly like the dark skin with only the page background color changed. This is a good opportunity for a volunteer to jump in – all you need to do is edit the colors in gallery.css and pick new icons for the gs\skins\light\images folder.
  • No support for upgrading from earlier versions
  • The backup/restore feature is not functional.
  • Concurrency error sometimes occurs when multiple users request an album at the same time

The following features existed in 2.6 but were removed in 3.0:

  • The start and end dates for albums no longer exist in the UI. These tended to cause confusion and were not used by many people. However, the API still supports them so it is possible to modify the UI template to add them back.
  • There are a couple places on the gallery settings and user settings pages where all user accounts were displayed in a drop down. Those dropdowns now include only those users who are site or gallery admins.
  • Cannot re-extract metadata during a sync. This feature has been replaced by the metadata rebuilding options in the site admin metadata page.

Final Release & Reporting Issues

I hope to release the final version within a couple months. It will be driven by the time it takes to put the last few things in place (that is, implementing an upgrade algorithm and fixing the issues).

Please report any issues on the beta forum or e-mail me at roger *at* techinfosystems *dot* com. Remember that I can only fix problems that I know about.

New License Option & DotNetNuke Version

I expect to continue providing a free GPL version of GSP, just like now. But I have heard from many of you that you would like a commercial license option, so I am looking into making that possible. A commercial license will free you of the GPL restrictions, such as having to publicly provide the source code for any changes you make. In addition, I may offer guaranteed support options.

Adding a commercial license option will help me continue to be able to focus on improving GSP instead of taking on paying contracts that distract me from this project. I cannot stress enough how important your donations are to keeping this project alive. I thank you for your support and humbly request that you provide a contribution to the best of your ability.

Once the final release is out, I will focus on merging the code with the DotNetNuke branch of GSP. Due to the substantial modifications, this will likely take several weeks and be pretty difficult. But I am committed to making it happen.

Gallery Server Pro Binary Pack Updated

The Gallery Server Pro Binary Pack is a set of open source utilities that add some great features to your gallery:

  • Video and audio encoding to web-optimized formats
  • Thumbnail extraction for video and TXT, PDF, EPS, and PSD (Photoshop) files
  • Metadata extraction for video and audio formats

These components are GhostScript, ImageMagick, and FFmpeg. Today I gathered the latest versions of them and packaged them together into an updated Gallery Server Pro Binary Pack.

Download the Gallery Server Pro Binary Pack.

Progressive loading for MP4

By far the most exciting new feature in this update is FFmpeg’s new support for creating an MP4 that will play in a browser as soon as a few seconds are buffered rather than waiting for the entire video to download. The benefit of this is that now GSP can create standard-compliant MP4 videos that start playing immediately. Because previous versions of FFmpeg forced the browser to download the entire video before beginning playback, GSP defaulted to creating a Flash Video (.flv), which *did* start playing immediately. But that created its own headaches, as the number of devices unable to run Flash have greatly increased over the last couple years.

The next version of GSP will default to creating H.264 MP4 video from most uploaded videos. But you don’t have to wait for 3.0. Install this binary pack into any 2.4 or later version of GSP and then update the Video & Audio page in site admin to include this FFmpeg argument string for MP4 video conversions:

-y -i "{SourceFilePath}" -b 384k -vcodec libx264 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8 -subq 6 -trellis 0 -refs 5 -bf 0 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -ac 1 -ar 16000 -r 13 -ab 32000 -movflags +faststart "{DestinationFilePath}"

You will also want to swap the positions of the MP4 and FLV rows so that FLV is *below* MP4, thus giving it a lower priority. The above string is close to what I expect to ship in v3. It has been carefully optimized to create a web-friendly H.264 MP4 video that works well on bandwidth-sensitive mobile devices as well as traditional computers. When you are done it will look like this:

3-14-2013 3-07-47 PM

With this change, all uploaded videos will be converted to MP4 as well as ones you sync when the ‘overwrite optimized’ option is enabled.

Remember that the Binary Pack requires full trust environments. You can tell if your site is running in full trust by looking it up on the Site Settings – General page.