tag:blogger.com,1999:blog-45417920710382734702024-02-20T20:49:24.701-06:00Gallery Server Pro BlogNews and information about Gallery Server Pro, a digital asset management and web gallery application.Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.comBlogger138125tag:blogger.com,1999:blog-4541792071038273470.post-63704419109971852592015-01-12T17:59:00.002-06:002015-01-12T17:59:49.005-06:00This blog has been moved to galleryserverpro.com/blog/In January 2015 I revamped the website at <a href="http://galleryserverpro.com/">galleryserverpro.com</a>. This involved migrating the content of this blog to the WordPress blog built in to the site. Therefore, this is the last post on this blog. You can read the latest news on <a href="http://galleryserverpro.com/">galleryserverpro.com</a>. It has a copy of all the blog posts from this blog, plus the new ones that have been added since.<br />
<br />
Thank you Blogger, for hosting this blog these last few years. It's been a pleasure!Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-37587091369813116502014-12-05T09:21:00.001-06:002014-12-05T09:21:43.753-06:00Use dropdowns for easier data entry, better searching, and increased data integrity<p>Gallery Server Pro supports 75 pre-defined properties for your media assets, such as title, caption, and more. There are also 20 custom properties you can use for any purpose you desire. You can make any of these editable on the Metadata page in the site admin area. When you do, Gallery Server gives you a text box where you can edit the property. For example, here I’ve given one of the custom properties the name ‘Color’:</p> <p><img title="dd1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dd1" src="http://lh6.ggpht.com/-K0sDLgWWBM0/VIHNenVaH8I/AAAAAAAAKJ0/VRCESc5BXvg/dd1%25255B4%25255D.png?imgmax=800" width="704" height="532" /></p> <p>When I am logged in as a user with edit permission, I can edit the value by clicking on it:</p> <p><img title="dd2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dd2" src="http://lh5.ggpht.com/-g24sPcjF3DM/VIHNfSEeOwI/AAAAAAAAKJ8/FLkQofTBlgc/dd2%25255B4%25255D.png?imgmax=800" width="704" height="532" /></p> <p>This works well for many situations, but wouldn’t it be nice to restrict the entry to a list of pre-defined choices? For example, what if the only colors you want to allow are black, gray, brown, red, green, and blue? A dropdown would be perfect:</p> <p><img title="dd3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dd3" src="http://lh5.ggpht.com/-E_7RLs_499E/VIHNgF6Du3I/AAAAAAAAKKE/gLmemLvwROA/dd3%25255B4%25255D.png?imgmax=800" width="704" height="532" /></p> <p>We can achieve this effect with a little editing of the right pane UI template. No changes to the source code are required, and your customization is preserved during upgrades to newer versions of Gallery Server. The only required skills are HTML and JavaScript. Let’s look at how to do it.</p> <p>Start by logging in to your gallery as an admin and going to the Metadata page in the site admin area. Scroll down to the custom properties section, pick one and give it a name. In this example I’m calling it ‘Color’. I enabled it for media objects but not albums, gave it a blank default value, and made it editable. Save your changes, then hit the rebuild button. Gallery Server will add the property for every media asset in your gallery, which behind the scenes means a new record is added to the Metadata table for each item. It can take a while for large galleries, so look in the event log for an entry to indicate it’s finished.</p> <p><img title="dd4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dd4" src="http://lh4.ggpht.com/-EyPRJkCngy4/VIHNgsvM3NI/AAAAAAAAKKI/u8MDx2u0NmQ/dd4%25255B4%25255D.png?imgmax=800" width="704" height="210" /></p> <p>When it’s done, you’ll see the new property when you view a media asset. As we saw earlier, the default behavior is to edit the value in a free-form text field.</p> <p><img title="dd5" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dd5" src="http://lh5.ggpht.com/-FpXI50zJhug/VIHNhuwhQHI/AAAAAAAAKKU/I5_kENb6AWg/dd5%25255B4%25255D.png?imgmax=800" width="704" height="532" /></p> <p>Now we’d like to turn this into a dropdown list to enforce a set of color choices. We’ll do this by modifying the right pane template to include the new HTML dropdown. We’ll also add custom JavaScript so that when a new choice is made, the changes are automatically persisted to the server.</p> <p>Go to the UI templates page in the site admin area and select the right pane template. Beginning in 3.2.1 changes are not allowed to the default template, so if you haven’t done so yet, copy it, give it a name and save it. To make this template the active one, go back to the default template and uncheck the albums, thus making the copy the only one with active albums selected.</p> <p>On the HTML tab, find this line:</p> <p>{{else MTypeId == 26}}</p> <p>Insert this HTML just before it:</p> <p>{{else MTypeId == 2005}} <br /> <tr class='gsp_m2Row' data-id='{{:Id}}' data-iseditable='{{:IsEditable}}'> <br />  <td class='gsp_k'>{{:Desc}}:</td> <br />  <td class='gsp_dd'> <br /> {{if ~root.Album.Permissions.EditMediaObject}} <br />   <select> <br />    <option value='Black' {{if Value=='Black'}}selected='selected'{{/if}}>Black</option> <br />    <option value='Gray' {{if Value=='Gray'}}selected='selected'{{/if}}>Gray</option> <br />    <option value='Brown' {{if Value=='Brown'}}selected='selected'{{/if}}>Brown</option> <br />    <option value='Red' {{if Value=='Red'}}selected='selected'{{/if}}>Red</option> <br />    <option value='Green' {{if Value=='Green'}}selected='selected'{{/if}}>Green</option> <br />    <option value='Blue' {{if Value=='Blue'}}selected='selected'{{/if}}>Blue</option> <br />   </select> <br /> {{else}} <br />  {{:Value}} <br /> {{/if}} <br />  </td></tr></p> <p>Change the ‘2005’ in the first line to the ID of your property. The IDs are shown on the Metadata page. And modify the option tags in the HTML to match the choices you want to display.</p> <p>Then, on the JavaScript tab, add this script after the existing script:</p> <p>var configDropDown = function() { <br />var data = {{:Settings.ClientId}}.gspData;</p> <p>var getMetaItem = function (id) { <br /> // Find the meta item with the specified ID. <br /> return $.grep(data.ActiveMetaItems, function (mi) { return mi.Id === id; })[0]; <br />};</p> <p>// When this code runs the right pane may not yet be built, so we use the overload of on() that takes a selector <br />$('#{{:Settings.RightPaneClientId}}').on('change', '.gsp_meta tr[data-iseditable=true] td.gsp_dd select', function (e) { <br /> $('#{{:Settings.RightPaneClientId}}').addClass('gsp_wait'); <br /> var metaTypeId = getMetaItem($(e.target).closest('.gsp_m2Row').data('id')).MTypeId; <br /> var galleryItemMeta = { GalleryItems: data.ActiveGalleryItems, MetaItem: { MTypeId: metaTypeId, Value: $(this).val() } };</p> <p> Gsp.DataService.saveMeta(galleryItemMeta, <br />  function () { $('#{{:Settings.RightPaneClientId}}').removeClass('gsp_wait'); }, <br />  function (gim) { <br />   // Data is updated on the server, so now update the local data <br />   for (var i = 0; i < gim.GalleryItems.length; i++) { <br />    var gNew = gim.GalleryItems[i]; <br />    var gCurrent = Gsp.findGalleryItem(data, gNew.Id, gNew.ItemType);</p> <p>    if (gCurrent == null) <br />     gCurrent = Gsp.findMediaItem(data, gNew.Id, gNew.ItemType);</p> <p>    if (gCurrent.MetaItems != null) { <br />     var mi = Gsp.findMetaItem(gCurrent.MetaItems, gim.MetaItem.MTypeId); <br />     if (mi != null) mi.Value = gim.MetaItem.Value; <br />    } <br />   } <br />  }, <br />   function (response) { $.gspShowMsg("Cannot Save Changes", response.responseText, { msgType: 'error', autoCloseDelay: 0 }); } <br /> ); <br />}); <br />};</p> <p>$('#{{:Settings.ThumbnailClientId}}').on('select.{{:Settings.ClientId}}', function() { <br /> configDropDown(); <br />});</p> <p>$('#{{:Settings.MediaClientId}}').on('next.{{:Settings.ClientId}} previous.{{:Settings.ClientId}}', function() { <br /> configDropDown(); <br />});</p> <p>configDropDown();</p> <p>It’s kind of a lot to absorb, but all it really does is detect the change event of the dropdown, persist the changes to the server, and update the client data model. There is also code to reconfigure the dropdown each time the right pane is rendered, which happens when the user navigates forward and backward in an album and when selecting a thumbnail on the album view page.</p> <p>Save your changes, then take a look at one of your media assets in the gallery. You should see a dropdown for the property, just like one of the earlier screenshots. Users without edit permission see plain text, just like with the other properties.</p> <p>Notice it also works on the thumbnail view in an album. You can use drag-select or CTRL-select several thumbnails, then select a color from the dropdown to update all of them at once. Super efficient.</p> <p>This is a pretty slick feature that is usually available only in high-end digital asset management systems. Feel free to adapt this sample code to your own requirements. For example, you may want to get a list of choices from a web service or use a datetime picker for a date property. You have full control over the rendering through the power of the UI templates.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-64506784856216089372014-10-01T10:30:00.001-05:002014-10-01T10:31:31.628-05:00Congrats to gallery contest winner Joe Hakooz!<p>Last month I invited you to submit your gallery for a new Gallery Showcase we’re building that highlights the diverse ways people use Gallery Server Pro for managing digital assets. Thanks for all your great entries!</p> <p>The winner, chosen at random, is Joe Hakooz from <a title="Interactive Web Design" href="http://www.innovah.com/">Innovah</a>, a custom web app company in North Carolina. His client is <a href="http://www.lacourfruits.com/">Lacour Fruits</a>, an international fruit and vegetable distributor based in France. They needed a secure way to store a large number of photos and videos in high resolution formats, primarily for use in their marketing and print collateral. They considered building a custom app but when they found Gallery Server Pro they knew they found their solution.</p> <p>Here’s what Joe had to say:</p> <p>“Gallery Server was incredibly simple to install and converting to an SQL database was painless. The automatic installation is tough to beat, but my favorite thing is how easy it is to use. We gave the client a quick demo and they haven't needed additional training since we deployed!”</p> <p>Joe and his team branded the gallery with their client’s logo and other graphic elements using the UI template feature and a bit of CSS editing.</p> <p>The gallery is for internal company use so you can’t browse to it, but Joe shared a few screen shots. Take a look. Nice job, Joe!</p> <p><a href="http://lh4.ggpht.com/-eNZhMXc1TkA/VCwd6ivdzJI/AAAAAAAAJhg/PTrRluzC88Y/s1600-h/lacour-1%25255B4%25255D.jpg"><img title="lacour-1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="lacour-1" src="http://lh3.ggpht.com/-JYrQe62Q3ho/VCwd7u4Qp_I/AAAAAAAAJho/yrXLUZ3J3vo/lacour-1_thumb%25255B2%25255D.jpg?imgmax=800" width="644" height="449" /></a></p> <p><a href="http://lh4.ggpht.com/-IqGF8bGnKH4/VCwd8DzzQkI/AAAAAAAAJhw/2oOuHQw2Udg/s1600-h/lacour-2%25255B3%25255D.jpg"><img title="lacour-2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="lacour-2" src="http://lh3.ggpht.com/-k-cctCNfd1k/VCwd8wjnfAI/AAAAAAAAJh4/aHcvd3UOlzM/lacour-2_thumb%25255B1%25255D.jpg?imgmax=800" width="644" height="449" /></a></p> <p><a href="http://lh3.ggpht.com/-yDf_wXL1El0/VCwd9s_0UtI/AAAAAAAAJiA/x4QWldtAMuo/s1600-h/lacour-3%25255B3%25255D.jpg"><img title="lacour-3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="lacour-3" src="http://lh3.ggpht.com/-pn-6Bpyb4Tc/VCwd-ZtlA4I/AAAAAAAAJiE/rDJbyQozfFc/lacour-3_thumb%25255B1%25255D.jpg?imgmax=800" width="644" height="449" /></a></p> <p><a href="http://lh4.ggpht.com/-OyiGxalBfNA/VCwd-wUQ6fI/AAAAAAAAJiQ/Wx34ibgnV-E/s1600-h/lacour-4%25255B3%25255D.jpg"><img title="lacour-4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="lacour-4" src="http://lh4.ggpht.com/-w6Ijj8tw3nI/VCwd_-v83jI/AAAAAAAAJiY/ssoiNv90r8g/lacour-4_thumb%25255B1%25255D.jpg?imgmax=800" width="644" height="449" /></a></p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-74716878311340612742014-09-09T09:28:00.001-05:002014-09-09T09:28:46.036-05:00Show off your gallery and win $50<p>Got a great gallery you'd like to show off? Tell us about it and it might appear in the new Gallery Showcase we're adding to our site.</p> <p>Any gallery built with Gallery Server Pro is eligible. If selected, we'll post a screenshot and a little blurb about how you're using the gallery. We'll even provide a link to help with your SEO.</p> <p>Use the <a title="Submit your gallery" href="http://www.galleryserverpro.com/get-support">contact form</a> to provide:</p> <ul> <li>An URL to your gallery. If it's password protected and you don't want to share a login account, give us a screenshot. </li> <li>A few sentences that describes how you're using the gallery. What problem does it solve? If you're happy with GSP, say so. </li> <li>Your name, title, email and - ideally - a photo of your face. We'll select positive comments for a separate "What our customers are saying" section. </li> </ul> <p><strong>All entries received by September 30 are entered into a drawing for a $50 Amazon gift card.</strong></p> <p>Tip: The easiest way to send files (like your screenshot and personal photo) is to reply to the auto-generated email you receive from the contact form.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-75387521956446251222014-09-02T17:37:00.001-05:002014-09-02T17:45:54.531-05:00Secure your media files in a read-only gallery<p>People who want to share their media assets with the world through a website typically have one of two views:</p> <ul> <li>I want to fully manage my media files through the website, including adding and deleting media. That is, I want a Digital Asset Management System (DAMS).</li> <li>I already have a process for managing my files; I just want to expose a read only gallery on my website. That is, I want a Web Gallery.</li> </ul> <p>Both of these are valid and supported in Gallery Server Pro. In this post I’ll focus on the second approach – exposing a collection of files in a read-only gallery.</p> <h4>Who would want to do this?</h4> <p>I would, for one. Like a lot of people, I have accumulated thousands of photos and videos over the years. My master collection of media files is stored on a desktop PC in my home. No matter how I acquire a media asset – whether it’s through my cell phone, tablet, video camera, or sent to me from someone else – they all end up on my PC. I want 24/7 availability to these files, but I don’t want to keep my PC running all the time nor do I want to run a web server from home. It would be great if I could copy these files to a web server and set that up as a read-only gallery.</p> <p>Who else would want to do this?</p> <ul> <li>You run a business and have all your media files on a shared drive. You want to expose them internally or on a public website but want to guarantee no one can delete your assets through the website.</li> <li>You run a web server from your home and want to expose your media collection, but am worried about the security risks. You don’t want to trust that a web gallery is truly secure; you need to keep things locked down for your own peace of mind.</li> <li>You have a system in place for adding, editing and deleting your files. It works but you want to make it easier for those who just want to browse the files.</li> </ul> <h4>Setting up the read-only gallery</h4> <p>Configuring a gallery to be read-only is easy. It all takes place on the Media Objects – General page in the site admin area:</p> <p><img title="rog1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog1" src="http://lh3.ggpht.com/-84UEh_gNUVc/VAZGjulWF-I/AAAAAAAAJMA/O46wkSnw4I8/rog1%25255B4%25255D.png?imgmax=800" width="356" height="486" /></p> <p>Select the option <em>Media files are read-only</em> and then save. That’s it. From now on, Gallery Server Pro won’t modify any of your original media files. It also won’t let users or even admins make any changes to files, as seen here in this screenshot of the Actions menu:</p> <p><img title="rog2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog2" src="http://lh3.ggpht.com/-k_Qpks-6cC0/VAZGkF-4EBI/AAAAAAAAJME/rAh84VF2xnk/rog2%25255B9%25255D.png?imgmax=800" width="281" height="590" /></p> <p>When a gallery is read-only, users cannot create albums or upload files, nor can they move, copy or delete albums and media objects. That is, they cannot perform any action that modifies the original media files. However, users <em>can</em> synchronize, download, sort, edit titles, captions and tags, and administrators can change settings in the Site admin area, including managing users and roles.</p> <h4>Prerequisites</h4> <p>There are a few requirements that must be met before a gallery can be made read only:</p> <ul> <li>User albums must be disabled </li> <li>The directory for the thumbnail and compressed images must be different than the original media objects directory </li> <li>The option <em>Synchronize directory names with album titles</em> must be disabled</li> </ul> <p>This should come as no surprise since these options have the potential to modify files, so they must be configured such that this isn’t possible. If any settings have the wrong value, your gallery will notify you when you try to enable the read-only option.</p> <h4>How do I manage files in a read-only gallery?</h4> <p>To add or remove media files to or from your gallery, use a tool like Windows Explorer or an FTP program to add or delete the files from the media file directory. Then run the synchronize function to have the gallery auto-detect the file changes. You can turn on the auto-sync function on the Albums – General page so you don’t have to manually run a sync.</p> <p>In very large galleries, a sync can take a long time even when there aren’t any changes. That’s because the application has to iterate through every file in the gallery. If this becomes an issue, instead of auto-syncing you can create a script to periodically run a sync on one or more down-level albums. You’ll find this option below the auto-sync settings:</p> <p><img title="rog3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog3" src="http://lh4.ggpht.com/-FU33JYdcv9g/VAZGkvi7D2I/AAAAAAAAJMQ/or7eH5peyrY/rog3%25255B4%25255D.png?imgmax=800" width="656" height="298" /></p> <p>You can use Windows Task Scheduler to start a sync on any schedule you choose. Do a Google-Bing search on <a href="https://www.bing.com/search?setmkt=en-US&q=task+scheduler+http+request">task scheduler http request</a> for more info.</p> <p>As mentioned earlier, management tasks that don’t affect the original media file as still available. That means you can still assign album thumbnails, sort albums, and edit titles, captions and tags.</p> <h4>One more piece for bullet-proof security</h4> <p>The previous steps will give you a read-only gallery, but one should acknowledge the security risks that are still present:</p> <ul> <li>If a hacker gets your administrator credentials, they can log in, turn off the read-only setting, and then proceed to wreak havoc in your gallery.</li> <li>A hacker can exploit an unpatched security hole in Gallery Server Pro to damage your gallery. (None are known at this time, however.)</li> </ul> <p>You can eliminate these risks by configuring the IIS application pool identity to have read-only access to the media directory. When you do this, the OS’s file security system will prevent IIS and the gallery from making any changes to the file system, thus giving you an extra layer of protection.</p> <p>Start by identifying the application pool identity your website is using. In IIS Manager, right click the web application and choose Manage Application – Advanced Settings. You’ll see the application pool identity in the dialog window:</p> <p><img title="rog4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog4" src="http://lh6.ggpht.com/-WQPRFXdVmZ4/VAZGle8mHHI/AAAAAAAAJMY/9ShGO73Qt5o/rog4%25255B4%25255D.png?imgmax=800" width="689" height="398" /></p> <p>Now figure out the identity the application pool is running under. Click the Application Pools node in the left pane of IIS Manager, find the app pool name in the center pane and notice the value in the Identity column. Here we see it’s running under ApplicationPoolIdentity:</p> <p><img title="rog5" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog5" src="http://lh5.ggpht.com/-OoV8HT52PLQ/VAZGmAdWBMI/AAAAAAAAJMc/QCQptJMHZvM/rog5%25255B4%25255D.png?imgmax=800" width="704" height="260" /></p> <p>This next part is confusing and trips up a lot of people, including me the first few times I did it. The term ApplicationPoolIdentity is not the actual name of the user account in Windows. Instead, it is telling you the identity is the name of the application pool concatenated to IIS APPPOOL. In our case, since the pool is named DefaultAppPool, the user account is IIS APPPOOL\DefaultAppPool.</p> <p>If the identity was something other than ApplicationPoolIdentity, like LocalService, NetworkService, or an AD account, then you don’t need to do any of this dancing around. The identity is simply what it says.</p> <p>Open Windows Explorer and navigate to the directory containing your media files. Right click the folder and choose Properties. Click the Security tab and choose Edit, then click Add on the Permissions window:</p> <p><img title="rog6" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog6" src="http://lh6.ggpht.com/-Rbo6XYT4kmk/VAZGmr7VY9I/AAAAAAAAJMo/lppiIEBKyKA/rog6%25255B9%25255D.png?imgmax=800" width="486" height="704" /></p> <p>Type in the pool identity. In our case we enter IIS APPPOOL\DefaultAppPool:</p> <p><img title="rog7" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog7" src="http://lh3.ggpht.com/-2BjUyzGezPg/VAZGoAqUYXI/AAAAAAAAJMs/kMqy9XKhcDo/rog7%25255B9%25255D.png?imgmax=800" width="469" height="258" /></p> <p>Verify that the OS recognizes the name by clicking Check Names. When valid, the name becomes underlined. In our case Windows decides to drop the IIS APPPOOL prefix, although oddly it wouldn’t have worked to just type in DefaultAppPool:</p> <p><img title="rog8" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog8" src="http://lh3.ggpht.com/-A8la0kvym8I/VAZGogW-_bI/AAAAAAAAJM4/oN8J25ifo90/rog8%25255B4%25255D.png?imgmax=800" width="473" height="255" /></p> <p>Click OK and then assign read-only permission for the account:</p> <p><img title="rog9" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="rog9" src="http://lh4.ggpht.com/-qkTGLoMhDr8/VAZGpUGw9GI/AAAAAAAAJM8/c-XgB2ZRmNE/rog9%25255B9%25255D.png?imgmax=800" width="381" height="461" /></p> <p>Click OK a couple times to close all the windows. That should be it, although I should note a few things:</p> <ul> <li>Your system might already be giving the user account write or modify permission through one of the other permissions. If this is the case you’ll need to revoke those permissions or change them to read-only. A good way to test that you truly have read-only permission on your app pool is to disable the read-only option in your gallery and then try to make a change that modifies a file (uploading a file, rotation, or deletion). If it succeeds then you still have work to do with your permissions.</li> <li>Your app pool identity needs modify permission to the directories where your thumbnails and web-optimized images are stored. Adjust as needed.</li> <li>These screenshots were made on Win 8.1. Other OS’s may look slightly different.</li> <li>If using a hosting provider, you may not be able to adjust settings to the detail shown here. Poke around their control panel to find out what settings they expose.</li> </ul> <p>When finished, you’ll have a bullet-proof gallery you can share with customers, friends and relatives. Cheers!</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-88185195497347273392014-07-17T11:56:00.001-05:002014-07-17T11:56:26.320-05:00Did you know you can change your file names?<p>This is one of those hidden gems in Gallery Server Pro that is not widely known but can be really handy. You can modify the underlying file name of any media object through the gallery UI. </p> <p>You already know you can edit several attributes of your media assets in the right pane. The common ones are title, caption, and tags, but any property can be editable. In a default gallery, the file name is visible and read only:</p> <p><img title="fn_metadata1" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="fn_metadata1" src="http://lh4.ggpht.com/-Dx1QAXpAH68/U8gAMBv_6MI/AAAAAAAAHzo/JgRgWe_CXd4/fn_metadata1%25255B4%25255D.png?imgmax=800" width="504" height="469" /></p> <p>To make the file name editable, go to the Metadata page in the site admin area. Find the row for the FileName property and check the box to make it editable. Note that there is a quirk in the jQuery grid widget that requires you to tab *out* of the cell before saving, so be sure it has the green check mark when you save.</p> <p><img title="fn_metadata2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="fn_metadata2" src="http://lh4.ggpht.com/-1rkFvcEAFNs/U8gAMrRxnCI/AAAAAAAAHzw/1HzciWoylZE/fn_metadata2%25255B4%25255D.png?imgmax=800" width="690" height="159" /></p> <p>That’s it. Notice you can now edit the file name for any asset:</p> <p><img title="fn_metadata3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="fn_metadata3" src="http://lh4.ggpht.com/-cWw3L-9bPoQ/U8gANitZBVI/AAAAAAAAHz4/AO1NPp5duoo/fn_metadata3%25255B4%25255D.png?imgmax=800" width="622" height="509" /></p> <p>Changing the file name updates it in two places – the Metadata table in the database and the file system on the server’s hard drive. This can be handy for cleaning up those ridiculous names that come out of your camera.</p> <p>A few things to note. If you pick a name that is already used by another file in the directory, Gallery Server Pro will automatically tweak it until it is unique. For example, the name MyPhoto.jpg may become MyPhoto(1).jpg.</p> <p>The names of the thumbnail and web-optimized versions are not updated. Not a big deal for the thumbnail version but the optimized file name is used when you are downloading the image:</p> <p><img title="fn_metadata4" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="fn_metadata4" src="http://lh4.ggpht.com/-LEGx6Z40wvs/U8gAOJlHPYI/AAAAAAAAH0A/UDlCR2E8NJA/fn_metadata4%25255B4%25255D.png?imgmax=800" width="704" height="625" /></p> <p>This might be a bit of a nuisance, so I plan to correct this in a future version.</p> <p>Another thing is when you are running a gallery in read-only mode (i.e. the option ‘Media files are read only’ is selected on the Media Objects – General page), the file name is not changed on the hard drive. The meta property, however, is updated, since that is just a database value. This might cause some confusion, so I’m guessing those of you with read only galleries will want to leave this property read only.</p> <p>Lastly, this trick applies only to the FileName metadata property. A related one – FileNameWithoutExtension – does not persist changes back to the server’s hard drive. It only updates the database value, just like the vast majority of the other properties.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com2tag:blogger.com,1999:blog-4541792071038273470.post-61460933604472153672014-06-19T12:03:00.001-05:002014-06-19T12:03:22.985-05:00WPI version of Gallery Server Pro released<p>Microsoft has completed their testing of 3.2.1 and published the new version to their web application gallery. A link to install it is on the <a href="http://www.galleryserverpro.com/download-gallery-server-pro">download page</a>.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-80120795527475317262014-06-02T14:40:00.001-05:002014-06-02T14:53:32.913-05:00Gallery Server Pro 3.2.1 Released<p>Today we released 3.2.1, which contains a small set of bug fixes and a couple minor behavior changes. There are no changes to web.config or the skins, so upgrading from 3.2.0 is as easy as copying the files from the upgrade package over the existing files in your gallery. Instructions for upgrading other versions are in the <a href="http://www.galleryserverpro.com/get-support">Admin Guide</a>.</p> <h4>Bug fixes</h4> <ul> <li>Left pane UI template partially updated during upgrade</li> <li>Parent nodes in the tree cannot be unchecked in certain cases</li> <li>Quotation marks in user and role names cause trouble</li> <li>Page scrolls to top when dialog auto-closes</li> </ul> <p>The first two bug fixes were added to the 3.2.0 packages as soon as they were identified (May 19 and May 23, respectively), so they may already be fixed in your installation of Gallery Server Pro.</p> <p>More details about the bug fixes are in <a title="Gallery Server Pro 3.2.1 Fixed Defect Report" href="http://www.galleryserverpro.com/support/DefectsFixed_v3_2_1.pdf">this report</a>.</p> <h4>Behavior changes</h4> <p><strong><font color="#800000">Remove confirmation message after drag and drop sorting</font></strong></p> <p>Drag and drop sorting was added in 3.2.0. When you finish dragging the thumbnail, the new position is sent to the server and a confirmation message is displayed. Some users found the confirmation message annoyingly repetitive, especially when you factor in the bug where the screen auto-scrolled to the top when the message disappeared. Although we fixed that bug in this release, we agree that the message is unnecessary, so we removed it.</p> <p><strong><font color="#800000">Prevent UI template changes to the default template</font></strong></p> <p>This is a behavior change that might catch some of you by surprise. Starting with 3.2.1, you can no longer save changes to any UI template with the name ‘Default’, except for selecting which albums the template applies to. If you want to edit a template, first make a copy and apply your changes to that. There are two reasons for this change:</p> <ol> <li>Allow reverting to the default template – By forcing you to make your changes to copies, you always have a default template to revert to.</li> <li>Allow template upgrades – Newer versions of Gallery Server Pro routinely require modifications to one or more UI templates. This is typically done through a search and replace on a particular string. However, if a user has modified the template, the search may not find a match, causing the template to not be upgraded. This can leave the user with a broken gallery and no easy way to fix things. By preserving the integrity of the default templates, we can be assured they upgrade correctly during an upgrade. And if you are using a modified template, you can refer to the default template to identify changes and merge them with your custom template.</li> </ol> <p><a title="Gallery Server Pro 3.2.1 Feature Changes" href="http://www.galleryserverpro.com/support/Features_v3_2_1.pdf">View the official feature change report for 3.2.1</a>.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-74838703034442241412014-05-29T11:50:00.001-05:002014-05-29T11:50:56.046-05:00Migrate your DNN gallery to 3.2<p>Back in March we announced there will be <a href="http://www.galleryserverpro.com/blog?title=Gallery-Server-Pro-DotNetNuke-Module-History-and-Roadmap&id=5593054765489074428">no further releases of the Gallery Server Pro DotNetNuke Module</a>. Since that time a <a href="http://forum.galleryserverpro.com/yaf_postst6032_Conversion-from-SQLserver-DNNdatbase.aspx#post15578">number of you</a> have asked about migrating your DNN gallery to a stand-alone instance of Gallery Server Pro. Some of the data in the DNN gallery is specific to DNN, so we can’t use the built-in migration path. But a few days ago a customer running <a title="Go to the Electric Clock Archive" href="http://www.clockdoc.org/">clockdoc.org</a> hired me to migrate the data, so I was able to dig into the details about what was involved. It’s actually pretty easy so I thought I’d write up the steps so you can migrate your own DNN gallery.</p> <p>As an alternative, you can hire me to do the migration. See the end for details.</p> <ol> <li> <p>Start by logging in to your DNN gallery and turning off the auto sync feature if enabled (it’s on the Albums page in the site admin area). This prevents a sync from kicking off and deleting records before your new gallery is fully set up.</p> </li> <li> <p>Go to the Backup/Restore page and make a backup of your gallery data.</p> <p>If you aren’t using the user albums feature and your gallery has only a few users, uncheck the option Export user accounts before making the backup file. This option includes DNN roles like Translator (en-US) and Unverified Users, which you really don’t need in your new gallery. However, it also includes user profile data such as the user album assigned to each user, so you’ll need this data if you want to transfer the user albums.</p> <p>NOTE: I haven’t tested a DNN migration that includes the user accounts, so there may be unforeseen obstacles or it may not work at all. Let us know what you find.</p> </li> <li> <p>Install a new instance of the latest version of Gallery Server Pro using either SQL CE or SQL Server and configure an admin account.</p> </li> <li> <p>Copy the media files from your DNN gallery to the location you want to use in your new gallery. For example, the default media location is the gs\mediaobjects directory of the web application. If you have multiple galleries, you’ll have multiple locations.</p> </li> <li> <p>Log in to your new gallery and go to the Backup/Restore page. Restore the backup file you made in step 2. Once complete, DO NOT click anything until completing the following steps.</p> </li> <li> <p>In the database of your new gallery, manually delete all records in the GalleryControlSettings table. If using SQL Server, use a tool like SQL Server Management Studio. For SQL CE, use a tool like <a href="http://sqlcetoolbox.codeplex.com/">SQL Server Compact Toolbox</a>.</p> </li> <li> <p>Manually delete all records from the GallerySettings table where SettingName=’EnableDotNetNukeSearch’ and SettingName=’PortalId’.</p> </li> <li> <p>In the GallerySettings table, look for the records where SettingName=’MediaObjectPath’. There will be at least two – one for the template gallery and one for your actual gallery. You can look in the Gallery table to figure out which gallery is the template gallery (it’s the one where IsTemplate=true).</p> <p>Update the one for the template gallery to something like ‘gs\mediaobjects’ – this is the default path that is used when you create a new gallery on the Manage galleries page. </p> <p>Update the path for your actual gallery to the place where you copied the media files earlier. If you have multiple galleries, update the path for each gallery. If you want, you can skip this step for now and instead do it on the Media Objects – General page, but you will get an application error if the gallery can’t find – or create – the path defined in the setting.</p> </li> <li> <p>Now navigate to your gallery in the browser. Because we emptied the GalleryControlSettings page, the gallery will assign the first non-template gallery to the default.aspx page. If this is incorrect, use the Manage galleries page to pick the right one. If you have multiple galleries, you can create additional pages and assign them to each gallery as needed.</p> </li> <li> <p>If you use the auto-sync feature, turn it back on.</p> </li> </ol> <p>That should complete the migration. Enjoy your new gallery and all the cool new features in v3!</p> <p>If you don’t want to hassle with it yourself, hire me to do the migration. It is priced at four hours of custom work ($320). <a href="http://www.galleryserverpro.com/get-support">Contact me</a> if you’re interested.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-29645349826734799092014-05-28T15:32:00.001-05:002014-05-28T15:32:43.261-05:00Gallery Server Pro Binary Pack Updated<p>Today we released an updated version of the Gallery Server Pro Binary Pack. It contains the latest versions of three open source utilities that give you advanced gallery functionality such as audio/video transcoding and video, PDF, TIF and EPS image generation. They are <a href="http://www.imagemagick.org/">ImageMagick 6.8.9</a>, <a href="http://ffmpeg.org/">FFmpeg 2.2.2</a>, and <a href="http://ghostscript.com/">GhostScript 9.14</a>.</p> <p>To update your gallery, <a href="http://www.galleryserverpro.com/download-gallery-server-pro">download the Binary Pack</a>, extract the contents from the zip file, and copy convert.exe and ffmpeg.exe over the existing files in the bin directory of your web application. GhostScript is updated by copying gs914w32.exe in the GhostScript directory to your web server and then running it. If you are using a web hosting company, you likely aren’t allowed to run executables on the server. In this case, the best you can do is create a support ticket to ask them to do it.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-61749054555104259652014-05-23T22:56:00.001-05:002014-05-28T11:35:29.875-05:00Tree bug fixed in latest build of 3.2.0<p>This afternoon we noticed an issue with using the jQuery jsTree widget in 3.2.0. This widget is used in several places in Gallery Server Pro – basically anywhere we need to display a tree of data we use jsTree.</p> <p>The issue is that when you select all the children of a node, the parents are automatically selected as well. For example, you might want to create a role with all edit permissions but no admin privileges. This bug caused the Admin gallery and Admin site nodes to be selected when all the children were selected, with no way to de-select them:</p> <p><img title="treebug2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="treebug2" src="http://lh3.ggpht.com/-wvt81SENYKE/U4AYZe75QSI/AAAAAAAAHHQ/ZsHipbLq-fM/treebug2%25255B9%25255D.png?imgmax=800" width="504" height="508" /></p> <p>This is actually the intended behavior of the jsTree widget, as I suppose it is the behavior you want in most cases. But not us. You need to select the children while leaving the parent unchecked if you so choose. If you want to select the parent, fine, but it should be optional.</p> <p>A couple months ago I tweaked the jsTree library to change this behavior to what we need in Gallery Server Pro. And all was well until I updated to the latest version of jsTree just before releasing 3.2.0. And I didn’t re-apply my changes. Thus a regression was born.</p> <p>It was easy enough to fix, as I just had to put the changes back in the jsTree library. Tonight I updated the 3.2.0 builds to include this fix. To apply the fix to your own gallery, download the install or upgrade package and copy <strong>gs\script\lib.min.js</strong> and <strong>gs\script\debug\lib.js</strong> over your existing versions of those files. Once the fix is in place, you are able to select child nodes while leaving the parent unchecked:</p> <p><img title="treebug1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="treebug1" src="http://lh3.ggpht.com/-L0Zqr-6_NcQ/U4AYb5FfFEI/AAAAAAAAHHY/HGXOCe7ikuA/treebug1%25255B4%25255D.png?imgmax=800" width="370" height="545" /></p> <p>This bug actually justifies a point release of 3.2.1 which I will probably get out in the next week or two, but today is the start of a holiday weekend and I wanted to get the fix out as quickly as possible so you wouldn’t have to wait.</p> <p>To sum up – if you are installing or upgrading, the fix is already in the download packages and you can ignore this post. If you updated to 3.2.0 on or before May 23, you should update the script files or apply 3.2.1 as soon as it is released.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-48222954803823997662014-05-19T22:34:00.001-05:002014-05-19T22:49:46.159-05:00Missing UI template update in 3.2.0 upgrade<p>Oops! Earlier today we noticed that the left pane template didn’t get updated when upgrading a gallery from one of the 3.X versions. Because of this, the left pane appears empty when viewed on a touchscreen device larger than 750 pixels, as seen here on a Nexus 7:</p> <p><img title="32fix0" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32fix0" src="http://lh4.ggpht.com/-DqasWqSDJEY/U3rNRDhBD_I/AAAAAAAAHGE/h0jCUftnSUE/32fix0%25255B9%25255D.png?imgmax=800" width="704" height="441" /></p> <p>This only affects users who upgraded their gallery to 3.2.0 in the last four days. In addition, regular monitors (non-touchscreen) don’t have an issue, and neither do mobile devices smaller than 750 pixels. But those of you using an iPad, Nexus 7/10, Surface, touchscreen laptops and similar devices will see an empty left pane.</p> <p>What happened is that we forgot to tell the 3.2.0 migration code to update the JavaScript portion of the left pane template to use the new, improved touchscreen features we added in 3.2. The end result is that the script continues to use the 3.0/3.1 behavior of not rendering the album treeview when a touchscreen is detected.</p> <p>The fix was easy enough, and the download files have already been updated, so any upgrades you perform from this point on include the latest templates. If you already migrated your gallery to 3.2, there is a quick edit you need to fix your UI template. Follow these steps:</p> <ol> <li> <p>In the UI Templates screen in the site admin area, select the LeftPane gallery item. Then click the JavaScript tab. Delete the script as shown here:</p> <p><img title="32fix1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32fix1" src="http://lh6.ggpht.com/-SWwYW5QATOk/U3rNR0YAzcI/AAAAAAAAHGM/dmAmUSW0Kyw/32fix1%25255B4%25255D.png?imgmax=800" width="677" height="425" /></p> </li> <li> <p>In its place paste the following text:</p> <p><font color="#400000">// Render the left pane if it exists <br />var $lp = $('#{{:Settings.LeftPaneClientId}}'); <br /> <br />if ($lp.length > 0) { <br />$lp.html( $.render [ '{{:Settings.LeftPaneTmplName}}' ]( window.{{:Settings.ClientId}}.gspData ));</font></p> <p>It will look like this when you are done:</p> <p><img title="32fix2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32fix2" src="http://lh5.ggpht.com/-sSXIXC4xbB4/U3rNSt2I7yI/AAAAAAAAHGQ/dGpBTKskcAo/32fix2%25255B4%25255D.png?imgmax=800" width="604" height="410" /></p> </li> <li>Save your changes. Repeat the process for any custom left pane templates you’ve created, if any. </li> </ol> <p>We will include this fix in the next update as well, so those of you who already upgraded to 3.2 but don’t apply the fix described here will still get the fixed template in the next release after 3.2.0.</p> <p>Sorry about any inconvenience.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-31471940072651105972014-05-15T17:29:00.001-05:002014-05-16T09:12:04.004-05:00Gallery Server Pro 3.2 Released<p>Today we released 3.2, containing a number of <a title="View 3.2 Enhancements Report" href="http://www.galleryserverpro.com/support/Features_v3_2_0.pdf">new features</a> and <a title="View 3.2 Bug Fix Report" href="http://www.galleryserverpro.com/support/DefectsFixed_v3_2_0.pdf">bug fixes</a>.</p> <ul> <li>New UI templates for tag/people trees and tag/people clouds (Enterprise edition) </li> <li>View recently added/top rated media (Enterprise edition) </li> <li>RSS/Atom support (Enterprise edition) </li> <li>Drag and drop sorting </li> <li>Faster loading of large albums </li> <li>Improved touchscreen support </li> <li>Metadata editing in virtual albums </li> <li>Improved upload page includes new thumbnail preview </li> <li>Latest version of libraries: Entity Framework 6.1, Plupload, jQuery, jQuery UI, jsTree, jsRender, Web.API, and more </li> </ul> <p>This release is a free upgrade to 3.X license holders. To upgrade, copy the files from the <a href="http://www.galleryserverpro.com/download-gallery-server-pro">upgrade package</a> over your existing web application and merge any web.config changes into the updated web.config file. More details, including help for new installations and upgrades for other scenarios are in the <a href="http://www.galleryserverpro.com/get-support">Administrator’s Guide</a>.</p> <p>The <a title="Gallery Server Pro demos" href="http://www.galleryserverpro.com/aspnet-gallery-demo">demos</a> have been updated to 3.2, so check out the new features.</p> <h4>New UI templates (Enterprise edition)</h4> <p>Enterprise license holders get a lot of love in this release. Let’s start with the new UI templates that give you a high-level view of your tags and people metadata. Two new left pane templates are automatically added when your gallery is running the Enterprise edition. One displays popular tags and people in a cloud; the other displays them in a tree.</p> <p><img title="32_01" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_01" src="http://lh4.ggpht.com/-u9Kq-4wKIN4/U3U_ug4QkTI/AAAAAAAAG8w/Grhxle3CqDA/32_01%25255B4%25255D.png?imgmax=800" width="571" height="691" /></p> <p><img title="32_02" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_02" src="http://lh5.ggpht.com/-EjuIColyNTc/U3U_vUbqgwI/AAAAAAAAG80/azBBOhuACdk/32_02%25255B4%25255D.png?imgmax=800" width="572" height="695" /></p> <p>These templates are not activated by default. To start using one of them, go to the UI Templates page, select the LeftPane gallery item, then choose one of the new templates from the dropdown list:</p> <p><img title="32_03" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_03" src="http://lh6.ggpht.com/-B3X_J_gjkRs/U3U_wt3SLuI/AAAAAAAAG9A/kmpl-_qkoaY/32_03%25255B9%25255D.png?imgmax=800" width="708" height="435" /></p> <p>Select the root album in the Target Albums tab and save. Then choose the Default template, de-select the root album, and save. Now the tags and people should appear in the left pane.</p> <p>There are a number of ways to customize the appearance of the tree and cloud widgets. Take a look at this section on the JavaScript tab of the tag and people trees template:</p> <p><img title="32_04" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_04" src="http://lh4.ggpht.com/-vC3p1J9ZF0A/U3U_xWZZa0I/AAAAAAAAG9I/eqCsCLnH_uA/32_04%25255B4%25255D.png?imgmax=800" width="695" height="617" /></p> <p>These widgets work by sending an ajax request to the server, then displaying the results. Notice the query sting parameters:</p> <p>top – Returns the top X items.</p> <p>sortBy – Specify ‘count’ to sort by the frequency and ‘value’ to sort by the tag value.</p> <p>sortAscending – Indicates the sort direction; true for ascending and false for descending.</p> <p>expanded – Indicates whether the tree is expanded by default. true or false</p> <p>Feel free to edit these values to suit your taste.</p> <h4>View recently added/top rated media (Enterprise edition)</h4> <p>This has long been a popular request. There is now support for viewing recently added and top rated media items. All left pane templates are updated to include two new links:</p> <p><a href="http://lh4.ggpht.com/-q9WEwy1YMhA/U3U_ybSJdjI/AAAAAAAAG9M/IXc_dOwlM7M/s1600-h/32_05%25255B5%25255D.png"><img title="32_05" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_05" src="http://lh5.ggpht.com/-Y2AAX66lmwo/U3U_y-CAh6I/AAAAAAAAG9Y/3fPzA1MhIYo/32_05_thumb%25255B3%25255D.png?imgmax=800" width="214" height="336" /></a></p> <p>These links take you to a virtual album you can treat as if it were a physical album. That is, you can view a slide show, sort, edit the properties, or download the media files. As with the tags, the URL can be edited to give you the exact behavior you want. For example, the recently added link looks like this: default.aspx?latest=50. Change the number to increase or decrease the quantity of media items.</p> <p>The top rated link looks like this: default.aspx?rating=highest&top=50. Edit the top parameter to change the number of matching items. The rating parameter can be any of these values: lowest, none, or a number from 0 to 5. For example, to see the first 25 items that have no rating, use this URL: default.aspx?rating=none&top=25. You can change the URL in the left pane UI template.</p> <h4>RSS/Atom support (Enterprise edition) </h4> <p>I’ve become a big fan of RSS feeds the last few years. I use Feedly to aggregate a number of RSS feeds into one convenient location that I check each day to see what’s new. Now Gallery Server Pro offers RSS and atom feeds for any album, including virtual ones.</p> <p>Every album now shows a feed link to the left of the title:</p> <p><img title="32_06" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_06" src="http://lh3.ggpht.com/-T8D4ybkR1Jk/U3U_zp6vinI/AAAAAAAAG9g/0PVWzoZjpB4/32_06%25255B4%25255D.png?imgmax=800" width="625" height="320" /></p> <p>You can subscribe to the feed using any reader you like. One practical use case for this feature is to easily keep an eye on items being uploaded to the gallery by your users. Any new items appear as unread in your feed reader, giving you a chance to review the media.</p> <h4>Drag and drop sorting</h4> <p>Version 3.0 introduced an improved sort architecture that lets you sort an album by any property such as title, date added, date picture taken, etc. Unfortunately, this replaced the previous sort feature where one can drag and drop thumbnails into the desired location. We heard from many of you that you missed this feature, so 3.2 adds it back as a new sort option.</p> <p>When you are logged in under an account with edit album permissions, a new custom sort option is available:</p> <p><img title="32_07" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_07" src="http://lh3.ggpht.com/-pVlOQi53Bnc/U3U_0krHw9I/AAAAAAAAG9k/Lj3GSFis-tw/32_07%25255B4%25255D.png?imgmax=800" width="353" height="239" /></p> <p>When an album has the custom sort option enabled, the thumbnails become draggable:</p> <p><img title="32_08" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_08" src="http://lh4.ggpht.com/-CLW3JVX_2oc/U3U_1VNZ3_I/AAAAAAAAG9w/-vbCjfABMcU/32_08%25255B4%25255D.png?imgmax=800" width="523" height="419" /></p> <p>You can even drag thumbnails on a touchscreen device. When you drop the thumbnail, its new position is instantly saved to the server.</p> <p>Note that custom sorting is not available for virtual albums such as search results and recently added items, since the contents are retrieved dynamically and are constantly changing.</p> <h4>Faster loading of large albums </h4> <p>One of the pain points for some users has been waiting for the web page to render when an album contains hundreds or thousands of media items. It takes a lot of JavaScript horsepower to build the DOM for very large albums. It’s most noticeable in browsers with slow JavaScript engines such as older versions of IE. Even when you use the paging feature to display a small number of items, that first rendering still can take a long time.</p> <p>This has been dramatically improved in 3.2. Previously, the thumbnails for the entire album were constructed in the DOM, then hidden from view except for those on the current page. Now, when album paging is turned on, only the current page is rendered in the DOM.</p> <p>Look at these test results for an album with 2000 images and page size set to 25. The time shows how long it takes from the initial page request until the page is fully rendered. They were all done on a PC running Windows 8.1.</p> <table style="text-align: center" cellspacing="0" cellpadding="2" width="500" border="1"><tbody> <tr style="font-weight: bold"> <td style="vertical-align: bottom" valign="top" width="125">Browser</td> <td style="vertical-align: bottom" valign="top" width="125">GSP 3.1</td> <td style="vertical-align: bottom" valign="top" width="125">GSP 3.2</td> <td style="vertical-align: bottom" valign="top" width="125">% improvement</td> </tr> <tr> <td valign="top" width="125">IE 11</td> <td valign="top" width="125">36 sec.</td> <td valign="top" width="125">3 sec.</td> <td valign="top" width="125">92%</td> </tr> <tr> <td valign="top" width="125">Firefox 27</td> <td valign="top" width="125">110 sec.</td> <td valign="top" width="125">2.5 sec.</td> <td valign="top" width="125">98%</td> </tr> <tr> <td valign="top" width="125">Chrome 33</td> <td valign="top" width="125">12 sec.</td> <td valign="top" width="125">2 sec.</td> <td valign="top" width="125">84%</td> </tr> <tr> <td valign="top" width="125">Safari</td> <td valign="top" width="125">1020 sec.</td> <td valign="top" width="125">2 sec.</td> <td valign="top" width="125">99.8%</td> </tr> <tr> <td valign="top" width="125">Opera</td> <td valign="top" width="125">26 sec.</td> <td valign="top" width="125">4 sec.</td> <td valign="top" width="125">85%</td> </tr> </tbody></table> <h4>Improved touchscreen support</h4> <p>Version 3 introduced the 3-pane layout, where each pane is separated by a splitter bar that can be resized or docked. Unfortunately, the splitter jQuery widget was not touch-compatible, meaning one couldn’t use a finger to move the splitter pane. Therefore, we made the decision to render the page using a single pane on all touchscreen devices.</p> <p>For 3.2, we revisited this issue and figured out a way to use touchscreen events for moving the splitter bar. That meant we could restore the 3-pane view to touchscreen devices. But 3 panes are not appropriate on small devices such as mobile phones, so the logic goes like this:</p> <ul> <li>When the device width is less than 750 pixels, hide the left pane, show the center pane full width and float the right pane to the bottom of the screen. </li> <li>When the device width is between 750 px and 1500 px, show the three panes. To make it easier to grab the splitter bar with a finger, double it’s width to 12 pixels. </li> <li>Treat touchscreens larger than 1500 px wide the same as regular monitors. That is, show the 3 panes and render the splitter bar at its normal 6 px width. </li> </ul> <p>We also worked hard to support the ability to select album thumbnails and the drag and drop sorting function with your finger.</p> <h4>Metadata editing in virtual albums</h4> <p>A virtual album is one which shows media items collected from one or more albums. For example, a virtual album is shown whenever one performs a search or looks at the recently added or highest rated items. Since permissions can be applied to individual albums, a virtual album can theoretically show some media the current user has permission to edit along with others the user can’t. Versions prior to 3.2 played it safe and didn’t let one edit the properties of any item when the user was in a virtual album.</p> <p>Version 3.2 now checks the security permission of the logged on user for each selected media object. If the user has permission to edit that item, she can edit the properties just as if she were viewing the item within its physical album.</p> <p><img title="32_09" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_09" src="http://lh6.ggpht.com/-dYohi_rqs0s/U3U_2I3A92I/AAAAAAAAG94/WTqnivgnRIw/32_09%25255B4%25255D.png?imgmax=800" width="704" height="234" /></p> <h4>Improved upload page includes new thumbnail preview </h4> <p>The add objects page incorporates an updated version of Plupload that shows thumbnails of image files you select for uploading. In addition, Plupload has been re-architected from the ground up for improved reliability and performance.</p> <p><img title="32_10" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="32_10" src="http://lh3.ggpht.com/-8jsoj9CLhZw/U3U_3OedirI/AAAAAAAAG-A/zFcVoDShGaY/32_10%25255B4%25255D.png?imgmax=800" width="648" height="596" /></p> <p>If you prefer the older-style list view, select the button near the top right.</p> <h4>Updated libraries</h4> <p>Gallery Server Pro uses a number of third party libraries. Each one was updated to the latest available version. We already mentioned Plupload. Another notable update was <a title="jsTree jQuery widget home page" href="http://www.jstree.com/">jsTree</a>, which went from a pre-release 1.0 version to 3.0.0. This was a major rewrite by its creator Ivan Bozhanov, who dramatically improved the API and performance of the tree, especially when there are a lot of nodes. His changes required substantial work on our part to get compatible with the new API, but it was worth it. We love jsTree so much that we donated another $100 to Ivan for doing such a great job.</p> <p>Below is a list of the upgraded components.</p> <table style="text-align: center" cellspacing="0" cellpadding="2" width="742" border="0"><tbody> <tr> <td style="vertical-align: bottom; text-align: left" valign="top" width="391"><strong>Name</strong></td> <td style="vertical-align: bottom" valign="top" width="103"><strong>Version in 3.1</strong></td> <td style="vertical-align: bottom" valign="top" width="246"><strong>Now updated to</strong></td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Json.Net</td> <td valign="top" width="103">5.0.6</td> <td valign="top" width="246">6.0.3</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">EntityFramework</td> <td valign="top" width="103">5.0.0</td> <td valign="top" width="246">6.1.0</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft HTTP Client Libraries  </td> <td valign="top" width="103">2.2.13</td> <td valign="top" width="246">2.2.18</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Web API 2.1 Client Libraries</td> <td valign="top" width="103">4.0.30506.0</td> <td valign="top" width="246">5.1.2</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Web API 2.1 Core Libraries</td> <td valign="top" width="103">4.0.30506.0</td> <td valign="top" width="246">5.1.2</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Web API 2.1 Web Host</td> <td valign="top" width="103">4.0.30506.0</td> <td valign="top" width="246">5.1.2</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Web API 2.1</td> <td valign="top" width="103">4.0.30506.0</td> <td valign="top" width="246">5.1.2</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft BCL Build Components</td> <td valign="top" width="103">1.0.10</td> <td valign="top" width="246">1.0.13</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft BCL Portability Pack </td> <td valign="top" width="103">1.1.3</td> <td valign="top" width="246">1.1.6</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Universal Providers Core Libraries</td> <td valign="top" width="103">1.2</td> <td valign="top" width="246">2.0.1</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Microsoft ASP.NET Universal Providers for SQL Compact Edition</td> <td valign="top" width="103">1.1</td> <td valign="top" width="246">2.0.0</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">EntityFramwork.SqlServerCompact</td> <td valign="top" width="103">4.3.6</td> <td valign="top" width="246">6.1.0</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">MSBuildTasks</td> <td valign="top" width="103">1.4.0.61</td> <td valign="top" width="246">1.4.0.65</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">ErikEJ.SqlCeBulkCopy </td> <td valign="top" width="103">2.1.6.3</td> <td valign="top" width="246">2.1.6.4</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">Plupload</td> <td valign="top" width="103">1.5.7</td> <td valign="top" width="246">2.1.2</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">jsRender</td> <td valign="top" width="103">1.0.0-beta</td> <td valign="top" width="246">pre v1.0 commit counter 53</td> </tr> <tr> <td style="text-align: left" valign="top" width="391">jsTree</td> <td valign="top" width="103">1.0-rc3</td> <td valign="top" width="246">3.0.0</td> </tr> </tbody></table> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com2tag:blogger.com,1999:blog-4541792071038273470.post-2181517310931885382014-04-10T14:57:00.001-05:002014-04-10T14:59:03.298-05:00Show high-resolution image during slideshow<p>You can view a slideshow in an album by clicking the Play slideshow button that appears above an image:</p> <p><img title="slideshow_start" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="slideshow_start" src="http://lh4.ggpht.com/-l9vGBndHNUI/U0b3pYuIjSI/AAAAAAAAGTY/KpRrA7aO92o/slideshow_start%25255B4%25255D.png?imgmax=800" width="493" height="426" /></p> <p>By default, the slideshow scales to use the entire browser window to show the web-optimized version of the image, as seen below. </p> <p><a href="http://lh4.ggpht.com/-r72-9kuOTcg/U0b3qnjrVlI/AAAAAAAAGUA/JNsvpnjdLw8/s1600-h/slideshow_opt%25255B5%25255D.png"><img title="slideshow_opt" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="slideshow_opt" src="http://lh6.ggpht.com/-SLgPcQ9ZUjY/U0b3rnIBF8I/AAAAAAAAGUI/mFwbaBR_TfU/slideshow_opt_thumb%25255B3%25255D.png?imgmax=800" width="572" height="484" /></a></p> <p>For most people, the web-optimized version is preferred over the original. It’s a much smaller amount of data sent to the browser (around 50 KB instead of 3,000-20,000 KB). This results in faster loading pages, less bandwidth requirements, and greater ability to scale.</p> <p>But some of you may prefer to see the high resolution originals. You want to see the full detail in your photographs and aren’t concerned about the larger size travelling across the wire. Well, here’s an easy edit to make it happen.</p> <ol> <li>Open gs\script\gallery.min.js in a text editor.</li> <li>Look for this text: Gsp.getView(j, Gsp.Constants.ViewSize_Optimized)</li> <li>Change it to this: Gsp.getView(j, Gsp.Constants.ViewSize_Original)</li> <li>Save and close the file.</li> </ol> <p>Hit F5 to refresh the script file in your browser and take a look at the slideshow. Notice the increased detail you can see in this example (click for a larger version):</p> <p><a href="http://lh6.ggpht.com/-vz0ZBq3X5tY/U0b3s93w6mI/AAAAAAAAGUQ/kNSHO8mrrKQ/s1600-h/slideshow_original%25255B4%25255D.png"><img title="slideshow_original" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="slideshow_original" src="http://lh6.ggpht.com/-YO9Asv9cZ_w/U0b3uI1_zlI/AAAAAAAAGUY/bJK_-Tl3Rpw/slideshow_original_thumb%25255B2%25255D.png?imgmax=800" width="572" height="484" /></a></p> <p>Keep in mind that if your original images are in a format that can’t be rendered in a browser (RAW, TIF, WMF, etc), this obviously won’t work. And if you have a slow internet connection or your files are particularly big, the slideshow may not work very well.</p> <p>Cheers!</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com2tag:blogger.com,1999:blog-4541792071038273470.post-71207257603698672932014-04-10T13:43:00.001-05:002014-04-10T13:43:58.629-05:00Gallery Server Pro not vulnerable to Heartbleed bug<p>A vulnerability in OpenSSL (<a href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160">CVE-2014-0160</a>) was disclosed a few days ago. It has been named the <a title="The Heartbleed Bug in OpenSSL" href="http://heartbleed.com/">Heartbleed bug</a>. There is a lot of concern due to its seriousness, widespread impact, and difficulty in fixing.</p> <p>I just wanted to confirm that Gallery Server Pro is not vulnerable because it cannot run on the platforms where it exists. Gallery Server Pro is based on .NET and must run on IIS on a Windows Server. A <a href="http://blogs.technet.com/b/erezs_iis_blog/archive/2014/04/09/information-about-heartbleed-and-iis.aspx">blog post from Microsoft employee Ben Ari confirms that default configurations of Windows do not include OpenSSL</a>. He writes that one *could* use OpenSSL on Windows by running the Windows version of Apache, but GSP cannot run under Apache, so this is not applicable to us.</p> <p>So, no worries about the Heartbleed bug with Gallery Server Pro.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-55930547654890744282014-03-31T14:26:00.001-05:002014-03-31T14:35:57.623-05:00Gallery Server Pro DotNetNuke Module History and Roadmap<p>Gallery Server Pro has been available as a DotNetNuke module since 2.4.0 was released in 2010. Subsequent releases of Gallery Server Pro have always had a corresponding DNN module release…until 3.0 was released in June 2013. Version 3 was a significant release, introducing—among other things—a new data layer built on Entity Framework Code First Migrations 5.0. Using EF CF Migrations greatly simplified data access, as we no longer had to maintain separate code bases for each database technology (that is, SQL Server and SQL CE).</p><p>However, EF CF Migrations had a limitation that was incompatible with DNN—one could have only one migration model per database. Since the GSP module shared its data access with a variety of other modules as well as the DNN core, it would be asking for trouble for the module to assume it could have the only allowed migration model in the database.</p><p>But there was hope, as the EF team recognized this issue and promised to support multiple models in 6.0. And so we put the 3.0 version of the GSP DNN Module on hold until EF 6 was released. Indeed, they delivered on their promise in October 2013. We eagerly upgraded to this version as we prepared to hunker down on the DNN module. Unfortunately, we immediately hit a snag. The ASP.NET Universal Provider library, which is used to provide membership and role services, didn’t work with EF6. Microsoft <a title="MS Connect: Microsoft.AspNet.Providers.Core incompatible with EF6" href="http://connect.microsoft.com/VisualStudio/feedback/details/801350/microsoft-aspnet-providers-core-incompatible-with-ef6">recognized this</a> and resolved the issue when they released Microsoft ASP.NET Universal Providers Core 2.0 in December 2013.</p><p>Finally, the pieces were in place to proceed with the GSP DNN module.</p><h4>Unfortunately, more roadblocks…</h4><p>In the last few weeks we’ve been sitting down and taking a serious look at what it’ll take to merge the GSP 3.0 code with the GSP DNN module 2.6 source code. Despite resolving the initial roadblocks, significant hurdles remained.</p><p><strong><font color="#c0504d">Lack of DNN support for EF CF Migrations</font></strong></p><p>DNN assumes that a module builder follows a specific data architecture that involves generating the required data structure as SQL script files that are executed by the DNN module installer. Then all data access is performed by executing manually-generated SQL statements against the database or invoking stored procedures.</p><p>But EF CF Migrations generates and executes the SQL for us, making integration with the DNN architecture problematic. We tried to find out if and how others were building DNN modules using EF CF Migrations but couldn’t find anyone who is doing this. At this point it is not clear to us whether it is even possible. We don’t mind being trailblazers when appropriate, but we’d rather not take on a huge amount of risk when dealing with something as mundane as accessing the database.</p><p><strong><font color="#c0504d">JavaScript and jQuery widget issues</font></strong></p><p>Version 3 dramatically increased the number of jQuery widgets. These widgets provide a lot of flexibility and work well with the jsRender-based UI template architecture. But jQuery widgets are tricky to use in an environment where others may be using the same—or similar—widgets. For example, how does one handle the situation where two modules are on the page, and each module uses a different version of <a href="http://www.jstree.com">jsTree</a>? In reality, you can’t make it work unless you jump through hoops like building a forked version of jsTree with a custom name.</p><p>There are other risks as well. The increased use of JavaScript everywhere (the GSP DNN module, other 3rd party modules, and the DNN core) has increased the risk of conflict and hard to find bugs. For example, GSP adds a trim() method to the String object when it’s missing:</p><pre style="font-size: 80%; max-width: 780px; font-family: consolas, 'Courier New', courier, monospace; overflow-x: scroll; color: #61002b">if (!String.prototype.trim) {
   // Add trim() function for browsers that don't implement it (IE 1-8).
   String.prototype.trim = function () {
     return this.replace(/^\s+|\s+$/g, '');
   };
}</pre><p>What if another module beats us to it and defines its own implementation? We get unexpected behavior and you think there’s a bug in GSP. As you can imagine, this type of issue is pretty much impossible to test for or prevent with any degree of certainty.</p><p><strong><font color="#c0504d">web.config changes</font></strong></p><p>All ASP.NET applications share a web.config file in the root that defines certain behaviors. GSP has this as well, where we define things such as the EF version, the membership provider, and Web.API configuration. The DNN module version of GSP also requires most of these things in the web.config file. But since this file affects the entire application, including other modules, there is a substantial risk that the configuration required for GSP conflicts with someone else’s configuration requirements.</p><p>Furthermore, Web.API requires setting up routes so that ajax requests get sent to the correct controller. GSP defines what it needs, but these may conflict with routes defined in other modules or the DNN core.</p><p><strong><font color="#c0504d">Object qualifier and database owner</font></strong></p><p>DNN recommends that tables be created with support for a custom object qualifier and database owner. That means the SQL scripts that create the tables look something like this:</p><pre style="font-size: 80%; max-width: 780px; font-family: consolas, 'Courier New', courier, monospace; overflow-x: scroll; color: #61002b">CREATE TABLE {databaseOwner}[{objectQualifier}gs_Album](...)</pre><p>Since EF CF Migrations generates tables by reverse engineering the code first model, support for this kind of customization is difficult or possibly impossible. Skipping support for this leads to the possibility of a module installation damaging the database if a user attempts to install the module on two different installations hosted inside the same database. Not cool.</p><p><strong><font color="#c0504d">Decline of DNN</font></strong></p><p>Perhaps the most significant issue for us is the signs that the DNN ecosystem is dying. Take a look at this chart generated from <a href="http://www.google.com/trends/">Google Trends</a>:</p><p><img title="dnn_trend" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="dnn_trend" src="http://lh5.ggpht.com/-lLHBFdSsi6Q/UznBWpx1yfI/AAAAAAAAGKo/NRZF0FpdTNY/dnn_trend%25255B4%25255D.png?imgmax=800" width="648" height="255" /></p><p>Searches for the term DotNetNuke peaked in 2006 and have dropped to almost nothing since then. Much of this, of course, is the name change from DotNetNuke to DNN. But even the term DNN peaked between 2006 and 2009 and is down by about 50% since then.</p><p>There are other signs, too. Go to any job site and compare the jobs for DNN with those of other CMS’s. DNN is dwarfed by jobs for WordPress, Drupal and Joomla. Even among .NET CMS’s, Umbraco has overtaken DNN as the go-to CMS.</p><p>Sales of the GSP DNN module have never been great. We have yet to recover the resources we have put into it over the years.</p><p><strong><font color="#c0504d">The unknown</font></strong></p><p>Developing the GSP DNN module in 2010 took far longer than we expected due to surprises we encountered along the way. For example, DNN disables the native .NET localization services GSP used to provide language support. We spent a ridiculous amount of time trying to figure out how to get DNN to serve text from GSP’s resx file. We fear more such issues as we ponder the 3.0 migration.</p><h4>Moving forward</h4><p>The issues described above have been heavily weighing on our minds, and we had to make a decision about how to move forward. If we poured resources into supporting DNN, it takes away from adding cool new features to the core GSP product. More importantly, we're not sure it's even possible for GSP 3 to run as a DNN module. At the very least, it would be significant undertaking.</p><p>Ultimately, we have decided to no longer support DNN. That’s a painful sentence to write, as it’s like abandoning one of our children. Plus, we know there are many of you who have been looking forward to continued DNN support. But we need to do what serves the greatest good for the most customers, while allowing us to keep paying the bills.</p><p>If you currently use GSP DNN Module 2.6, be assured it will continue to work indefinitely. And remember that you can always install the latest version of GSP as a stand-alone instance and link to it from your DNN site.</p><p>As for us, we are putting the finishing touches on a 3.2 release. This will be a free update to all 3.X license holders. Details will be shared soon. After that, we’ll be hunkering down on version 4.0, where we plan several significant features you’re just going to love.</p><p>The future of GSP is bright, and we love that you’re coming along with us for the ride. Great things to come!</p>Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-1623077746152771462014-01-15T14:24:00.001-06:002014-01-15T14:25:02.567-06:00Eliminate startup delay in your galleries using Application Initialization<p>It is well known that ASP.NET applications have a startup delay after they’ve been idle for a while. Every once in a while someone posts in the forum that the gallery is slow to load at first and then is quite fast. That’s because IIS is doing a lot of stuff when that first HTTP request comes in:</p> <ul> <li>Spins up an application pool </li> <li>JIT-compiles the code </li> <li>Performs view generation of the EF model </li> <li>Loads HTTP modules </li> <li>Runs initialization code in GSP, which connects to the database and loads application settings and other lookup data. </li> </ul> <p>All that takes a few seconds, which isn’t terrible, but first impressions are important. Wouldn’t it be better if IIS handled this before that first HTTP request comes in?</p> <p>Well, it can. It’s called Application Initialization and is available in Windows Server 2008 R2 and higher. Once configured, the gallery application is always warmed up and ready to instantly serve HTTP requests, even after periods of inactivity that would normally shut down the application pool. Sweet!</p> <p>It’s a little tricky to set up, so let’s run through the details.</p> <p> </p> <h4>Application Initialization in Windows Server 2008 R2 (IIS 7.5)</h4> <p>In Windows Server 2008 R2, use the Microsoft Web Platform Installer to <a href="http://www.iis.net/downloads/microsoft/application-initialization">install Application Initialization</a>. Once installed, configure it by editing applicationHost.config, which is at %WINDIR%\system32\inetsrv\config.</p> <ol> <li>Open applicationHost.config in Notepad, being sure to run it with the "Run as Administrator" option. </li> <li> <p>Find the <applicationPools> configuration section, and then look for the application pool running your gallery. If you don’t know the pool name, look it up in IIS Manager by right-clicking the application node in the left pane and choosing Manage Application > Advanced Settings. Add startMode="AlwaysRunning" so that it looks like this:</p> <p><font color="#800000"><add name=".NET v4.5" startMode="AlwaysRunning" managedRuntimeVersion="v4.0" /></font></p> </li> <li> <p>Scroll down a little more in applicationHost.config to the <sites> configuration element. Find the entry for the gallery application and add preloadEnabled="true", like this:</p> <p><font color="#800000"><application path="/gallery" preloadEnabled="true" applicationPool=".NET v4.5"></font></p> </li> <li>Restart IIS by executing iisreset in a command prompt running as an administrator. </li> </ol> <p>That’s it. Your gallery is now always running in a warmed up state and ready to instantly serve users. You can test it out by temporarily changing the application pool timeout to one minute, then waiting a couple minutes and browsing to your gallery.</p> <p> </p> <h4>Application Initialization in Windows Server 2012 and higher (IIS 8+)</h4> <p>In Windows Server 2012 and higher, Application Initialization is included in the OS but it must be enabled in the Add Roles and Feature Wizard:</p> <p><img title="app_init" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="app_init" src="http://lh3.ggpht.com/-ctNl3zR9AtY/UtbucOqARtI/AAAAAAAAFQ4/qgsRjdHpYdg/app_init%25255B9%25255D.png?imgmax=800" width="561" height="401" /></p> <p>One installed, you can now configure it with IIS Manager – no need to edit applicationHost.config.</p> <ol> <li> <p>Open IIS Manager and navigate to the application pool the gallery is running under. Right click it and choose Advanced Settings. Verify the Start Automatically setting is set to True and the Start Mode is set to AlwaysRunning. Click OK.</p> <p><img title="app_init2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="app_init2" src="http://lh3.ggpht.com/-8LWdgrQz8kQ/Utbuc_q9rDI/AAAAAAAAFQ8/G1aKrLs3TyU/app_init2%25255B4%25255D.png?imgmax=800" width="451" height="497" /></p> </li> <li> <p>In the left pane of IIS Manager, navigate to the gallery web application. Right click the application node and select Manage Application > Advanced Settings. Set Preload Enabled to True.</p> <p><img title="app_init3" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="app_init3" src="http://lh5.ggpht.com/-2TLt7HtVqmA/UtbudWFxQcI/AAAAAAAAFRE/JemWF4Pd6gE/app_init3%25255B4%25255D.png?imgmax=800" width="452" height="494" /></p> </li> <li> <p>Restart IIS by executing iisreset in a command prompt running as an administrator.</p> </li> </ol> <p>That’s it. Your gallery is now in an always-on state.</p> <p> </p> <h4>Common mistakes</h4> <p>The web is filled with people talking about how they can’t get this feature to work. I’m guessing it’s because they missed one or more of the four critical steps. If you’re having trouble getting things going, make sure you did these steps:</p> <ol> <li>Installed Application Initialization (either through Web PI for IIS 7.5 or through the Add Roles and Features Wizard for IIS 8+).</li> <li>Application pool has Start Automatically = True.</li> <li>Application pool has Start Mode = AlwaysRunning.</li> <li>Application has Preload Enabled = True.</li> </ol> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com4tag:blogger.com,1999:blog-4541792071038273470.post-9148488683151739882013-12-16T11:03:00.001-06:002013-12-16T11:03:20.150-06:00Save time editing media properties with multiple select<p>This is a great trick that lets you spend less time managing your gallery and more time sharing it with others. You probably already know you can easily edit the property of an album or media object using the right pane. For example, here I’m tagging a photo with the word ‘Bird’:</p> <p><img title="meta1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="meta1" src="http://lh5.ggpht.com/-FjuV4JCa0nc/Uq8yTVuM-qI/AAAAAAAAExs/3fhDveYhty0/meta1%25255B9%25255D.png?imgmax=800" width="674" height="577" /></p> <p>Notice as I type I get a drop down showing tags that have been applied to other gallery objects. This makes it easy to reuse tags and prevent misspellings.</p> <p>We can also tag media objects from the album thumbnail view by selecting the media object and applying the tag:</p> <p><img title="meta4" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="meta4" src="http://lh4.ggpht.com/-e3_10_-EZYE/Uq8yVJlEHbI/AAAAAAAAExw/dQBLswE9f2s/meta4%25255B5%25255D.png?imgmax=800" width="677" height="345" /></p> <p>TIP: When selecting the thumbnail, be sure to click in the border area <em>outside</em> the image. If you click the image, the gallery takes you to a page showing the full size version of the media object.</p> <p>Okay, updating one media object at a time is easy enough. But what if you want to apply a tag to a bunch of items at once? For example, what if you want to tag every photo in an album with the word ‘Bird’? The answer lies in the multi-select feature built into Gallery Server Pro. Select the desired items and then update the property. When you exit the field, your changes are applied to all selected items.</p> <p>There are two ways to select thumbnails: drag-select and control-click. Drag-select means using the mouse to drag a rectangle around the desired thumbnails. Control-click involves holding the Ctrl key down and left-clicking thumbnails. When a tag has been applied to more than one item, it displays the quantity in parentheses. Here I’ve drag-selected the thumbnails and applied the ‘Bird’ tag to all 25 photos in the album:</p> <p><img title="meta5" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="meta5" src="http://lh5.ggpht.com/-wEZVTZ011zg/Uq8yVsErl-I/AAAAAAAAEx8/aPjMJFkQSPI/meta5%25255B5%25255D.png?imgmax=800" width="678" height="351" /></p> <p>Deleting tags from multiple items is just as easy. Select the thumbnails and then click the ‘X’ on the tag you want to delete.</p> <p>This trick works for any of the properties in the right pane. For example, you can change the title of all items and then edit individual ones as desired. Or control-click your favorites and give them a five-star rating with a single click.</p> <p>Note that some properties are not editable by default. For example, the width and height of images are read only. To make them editable, go to the Media Objects – Metadata page in the Site Admin area and select the Editable attribute for the desired properties.</p> <p>Editing the properties of multiple items at once is a big time-saver. Enjoy your gallery!</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com2tag:blogger.com,1999:blog-4541792071038273470.post-71800760800757640122013-12-11T17:04:00.001-06:002013-12-11T17:04:00.697-06:00Gallery Server Pro 3.1 API Documentation Released<p>Today we released the <a href="http://www.galleryserverpro.com/help/">Gallery Server Pro API Documentation</a>, freshly updated for 3.1. This is primarily a resource for developers who want to better understand  the namespaces and classes used in Gallery Server Pro.</p> <p>This documentation can be accessed any time from the <a href="http://www.galleryserverpro.com/get-support">support page</a>.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-31909889209097106372013-12-09T15:48:00.001-06:002013-12-09T15:48:50.276-06:00Gallery Server Pro Binary Pack Updated<p>Today we released an updated version of the Gallery Server Pro Binary Pack. It contains the latest versions of three open source utilities that give you advanced gallery functionality such as audio/video transcoding and video, PDF, TIF and EPS image generation. They are <a href="http://www.imagemagick.org/">ImageMagick 6.8.7</a>, <a href="http://ffmpeg.org/">FFmpeg 2.1.1</a>, and <a href="http://ghostscript.com/">GhostScript 9.10</a>.</p> <p>To update your gallery, <a href="http://www.galleryserverpro.com/download-gallery-server-pro">download the Binary Pack</a>, extract the contents from the zip file, and copy convert.exe and ffmpeg.exe over the existing files in the bin directory of your web application. GhostScript is updated by copying gs910w32.exe in the GhostScript directory to your web server and then running it. If you are using a web hosting company, you likely aren’t allowed to run executables on the server. In this case, the best you can do is create a support ticket to ask them to do it.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-51462645750144620412013-12-03T11:11:00.001-06:002013-12-03T14:49:59.272-06:00Beware the ultra cheap web host<p>There are a ton of hosting companies out there with a wide variety of prices and service levels. I work with many of them when installing Gallery Server Pro, and I thought I should share a few things I’ve learned.</p> <h4>1and1.com</h4> <p>You’ve seen the ads—they’re everywhere and they offer some of the lowest prices available. However, I spent several hours yesterday working with a customer and we were ultimately unsuccessful in getting GSP working. He has since moved to <a href="http://www.galleryserverpro.com/web-hosting">Arvixe</a> where things are running smoothly. There were two main issues:</p> <p><strong><font color="#800000">CREATE DATABASE permission denied in database 'master'.</font></strong> When you modify the connection string in web.config to point to an existing SQL Server database, Entity Framework Code First Migrations (triggered from GSP startup code) is supposed to detect the existing database and ensure its tables are updated to the current version. In our case, EF didn’t think the database existed and tried to create it. Since 1and1.com wisely prevents code from creating databases, we get the error.</p> <p>EF should have detected the existing database, and I still don’t know whether it’s a bug in EF or some kind of configuration issue with 1and1.com. I also don’t know whether this is limited to a particular web server at 1and1.com or whether they all behave this way. I found a forum thread where the <a href="http://stackoverflow.com/questions/11814762/create-database-permission-denied-in-database-master-entity-framework-migratio">same issue is happening with a couple other web hosting companies</a>.</p> <p><strong><font color="#800000">Web.API calls failing.</font></strong> GSP uses AJAX callbacks to provide a responsive user experience, and these are done using the Web.API library. These calls were also failing at 1and1.com with a 404 File Not Found. For example, when I tried to sync, I saw this error:</p> <p><img title="sync404" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="sync404" src="http://lh4.ggpht.com/-NXrtolgkdH4/Up4Qtnv7rDI/AAAAAAAAEmw/1dte7abjFBk/sync404%25255B4%25255D.png?imgmax=800" width="654" height="368" /></p> <p>This issue can sometimes be fixed by adding runAllManagedModulesForAllRequests="true" to the modules element in web.config, but at best that is a performance-sapping fix and at worst doesn’t even work. In our case, it didn’t work. Ultimately, this is caused by some kind of server configuration that I haven’t yet figured out. As with the create database error, I don’t know if the issue applies to all 1and1.com servers or just particular ones.</p> <p>Finally, I found the 1and1.com control panel to be slow, counter-intuitive, and limited in terms of features. Because of these issues, I cannot recommend this company.</p> <h4>GoDaddy</h4> <p>This is another 800 pound gorilla in the web hosting space, and I know of several galleries successfully being hosted there, although I’m not sure any of them are running 3.0 or higher. I am a little concerned about them because the forum thread I previously mentioned called out GoDaddy as also causing the create database error, but I haven’t confirmed it for myself.</p> <p>I have found their web tools to be difficult to use and limited, but they get the job done. I don’t have an official recommendation on whether or not to use GoDaddy, but it’s fair to say I like others better.</p> <p>If you are successfully using GoDaddy with SQL Server and GSP 3.0 or higher, let us know so we at least know it’s an option.</p> <h4>Arvixe</h4> <p><a href="http://www.galleryserverpro.com/web-hosting">Arvixe</a> is a large and fast growing company that offers a range of plans starting as low as $5/month. In my experience, they offer an excellent balance of low prices and good service, so I do recommend them as an option. A few years ago, I teamed up with them to create a <a href="http://www.galleryserverpro.com/web-hosting">referral relationship</a>, so take my advice with the proper skepticism and do your own research.</p> <p>There are a few important things to note about Arvixe:</p> <ul> <li><strong><font color="#800000">Their cheapest plan is best for small galleries.</font></strong> The PersonalClass ASP plan, at $5/month, is limited to 250 MB of shared RAM. Any time the app goes over this, it recycles. This is a frequent cause of synchronization failures in GSP, as the process of iterating through media files and building thumbnail and optimized images eats up a lot of memory very quickly. If you only have a few thousand items in your gallery and your images are fairly small (<5MB each), you are probably OK. Anything else and you should consider a BusinessClass plan or higher. </li> <li><strong><font color="#800000">Must disable 32-bit application pool compatibility.</font></strong> By default Arvixe configures the application pool so that the option “Enable 32-Bit Applications” is set to true. When you install the GSP Binary Pack, FFmpeg is used to create web-optimized versions of video and audio files. However, the 32-bit setting causes the transcoding process to intermittently fail after a few seconds, creating corrupted files. The solution is to create a support ticket and ask that this option be disabled (set to false) for the website. </li> <li><strong><font color="#800000">GhostScript support.</font></strong> GhostScript is one of the utilities included in the Binary Pack that provides support for EPS and PDF thumbnail generation, but it can only be installed by running the setup program on the server. Many web hosting companies won’t let you do this or refuse to do it for you when asked, but Arvixe will do it if you ask them. So, if you discover that you don’t get thumbnail images from your PDF or EPS files, even after you’ve installed the Binary Pack in your gallery, you probably don’t have GhostScript installed on the server. Create a support ticket and ask them to install the 32-bit and 64-bit versions of GhostScript. Yes, both. Even though the servers are all 64-bit, in some cases the 32-bit version is required. If they give you any pushback, search for GhostScript in their forums and point them to those discussions where it’s been done before. </li> </ul> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com1tag:blogger.com,1999:blog-4541792071038273470.post-67781967039467425352013-11-19T15:05:00.000-06:002013-11-19T17:29:19.881-06:00Gallery Server Pro 3.1.0 Released<p>Today we released 3.1.0, containing a number of significant new features along with a few bug fixes. The features are:</p> <ul> <li>Improved quality of web-optimized videos </li> <li>Images generated up to 3 times faster </li> <li>Auto-rotation of images and videos </li> <li>Synchronization up to 300% faster and uses less server memory </li> <li>Easier Active Directory setup and integration </li> <li>Improved performance for large numbers of user accounts </li> <li>On-demand rotation of videos </li> <li>Support for 3GP videos </li> </ul> <p>This release is a free upgrade to 3.0 license holders. Upgrading is easy – just copy the files from the <a href="http://www.galleryserverpro.com/download-gallery-server-pro">upgrade package</a> over your existing web application. Installations and upgrades for other scenarios are in the <a href="http://www.galleryserverpro.com/download-gallery-server-pro">Administrator’s Guide</a>.</p> <h4>Video Improvements</h4> <p>When the <a href="http://www.galleryserverpro.com/download-gallery-server-pro">Gallery Server Pro Binary Pack</a> is installed, web-optimized versions of video files are created when you upload a file or the synchronization determines that an optimized video is needed. GSP 3.0.X created H.264 MP4 files that were highly compressed, resulting in small files that played quickly in all modern browsers.</p> <p>However, I have come to believe they are *too* optimized and the loss in video quality was too much of a tradeoff. Version 3.1 changes this by creating videos with a higher quality, albeit with slightly higher file sizes as a result.</p> <p>Specifically, what we changed in 3.1 was the FFmpeg arguments for the All video => .MP4 conversion process. You can manage these settings on the Video & Audio page in the site admin area.</p> <p>In 3.0.X, the FFmpeg arguments were this:</p> <p style="font-size: 80%; font-family: consolas, 'Courier New', courier, monospace; color: #61002b">-y -i "{SourceFilePath}" -vf "scale=min(iw*min(640/iw\,480/ih)\,iw):min(ih*min(640/iw\,480/ih)\,ih)" -b:v 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}"</p> <p>In 3.1, it is now this:</p> <p style="font-size: 80%; font-family: consolas, 'Courier New', courier, monospace; color: #61002b">-y -i "{SourceFilePath}" -vf "scale=min(iw*min(640/iw\,480/ih)\,iw):min(ih*min(640/iw\,480/ih)\,ih){AutoRotateFilter}" -vcodec libx264 -movflags +faststart -metadata:s:v:0 rotate=0 "{DestinationFilePath}"</p> <p>Notice that a lot of the optimization settings have been removed, allowing FFmpeg to use default settings in many areas. There are also two other changes:</p> <ul> <li><strong>New {AutoRotateFilter} replacement parameter</strong>—This string is replaced with a rotation filter that automatically rotates the video to the correct orientation based on the orientation flag that may be present in the original video file. This feature requires a recent version of FFmpeg so if you haven’t updated the binary pack lately, be sure to do so. </li> <li><strong>Removal of orientation flag</strong>—The string “-metadata:s:v:0 rotate=0” tells FFmpeg not to include the orientation flag in the web-optimized video. Without this, the file would have the same rotation flag as the original file even though it is now rotated. </li> </ul> <p>To generate a new set of web-optimized videos based on the new setting, run a synchronization with the option Rebuild optimized versions selected.</p> <p>If you want to continue generating the highly compressed videos like it was done in 3.0.X, change the FFmpeg arguments for the All video => .MP4 setting back to its original value, except with the new settings included, like this:</p> <p style="font-size: 80%; font-family: consolas, 'Courier New', courier, monospace; color: #61002b">-y -i "{SourceFilePath}" -vf "scale=min(iw*min(640/iw\,480/ih)\,iw):min(ih*min(640/iw\,480/ih)\,ih){AutoRotateFilter}" -b:v 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 -metadata:s:v:0 rotate=0 "{DestinationFilePath}"</p> <h4>Up to 3X faster image generation</h4> <p>Versions of GSP prior to 3.1 used the GDI+ library in the .NET Framework to generate the thumbnail and optimized images for most image types. (TIFF being one exception where ImageMagick is used instead.) This has worked reliably but the algorithms are pretty slow.</p> <p>Starting with this release, GSP now uses the WPF classes in the .NET Framework. They are much faster and provide the same or better quality as the old technique.</p> <p>The WPF classes require a higher level of permissions than the old GDI+ classes. The code automatically detects the current trust level of the application. When the app is running in full trust, the WPF classes are used. Anything less and it falls back to the GDI+ classes. Thus those users who are running in full trust get the benefits while we still support those of you running in reduced trust scenarios.</p> <h4>Auto-rotation of images and video</h4> <p>A frequent request has been the detection of orientation in photos and videos and then auto-rotating them as need to make them right side up. It’s been discussed in the forums <a href="http://forum.galleryserverpro.com/yaf_postst3186_Exif-Orientation-in-GP3.aspx">here</a> and <a href="http://forum.galleryserverpro.com/yaf_postst3433_Auto-Rotate-images.aspx">here</a> and <a href="http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/">on the internet here</a>. Initially I was hesitant to add this feature due to the terribly inconsistent way it’s been implemented in applications. My biggest worry was adding a feature that ended up rotating files that shouldn’t be rotated, essentially corrupting the media library. However, I got a good reminder of how useful this feature would be when I started uploading images and videos from my Samsung Galaxy S4 and discovered I had to tilt my head to see half the items.</p> <p>As a result, we spent some time deliberating how best to implement this feature, and I think we’ve come up with a robust solution. For starters, when you upload or synchronize a photo or video that has orientation metadata embedded in it, the gallery extracts that information and stores it in the metadata table. You can see it in the new orientation meta item:</p> <p><img title="image_orientation" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image_orientation" src="http://lh3.ggpht.com/-V-X6ycluMLE/UovSXDwXHsI/AAAAAAAAEb8/UAdoDjk8i-I/image_orientation%25255B4%25255D.png?imgmax=800" width="668" height="641" /></p> <p>Second, when the gallery creates the thumbnail and optimized files, it uses the orientation flag to determine if a rotated version of the original should be created. The original file is not rotated or modified in any way during this process.</p> <p>In the above example, the original photo is rotated 90 degrees counter clockwise, as seen here in Paint.NET:</p> <p><img title="rotated_image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="rotated_image" src="http://lh3.ggpht.com/-Am1oaisrL6c/UovSYw_cZPI/AAAAAAAAEcE/QOqyxGxtJ3s/rotated_image%25255B4%25255D.png?imgmax=800" width="649" height="526" /></p> <p>But when we add it to the gallery, GSP detects the orientation flag in the metadata and uses it to create the thumbnail and optimized images rotated 90 degrees clockwise. Again, the original file is unchanged, which you can see if you use the Download/Share button to download the original image from the gallery.</p> <p>But what happens if you rotate a photo or video from within GSP? This is a case where the original file *is* modified. For example, if we go to the rotate page for the above photo, leave the default selected ‘UP’ icon at the top of the image, and then click rotate, guess what happens?</p> <p><img title="rotate1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="rotate1" src="http://lh4.ggpht.com/-mRZdQLkYcTo/UovSaBqkOWI/AAAAAAAAEcM/BXU_5SN6WNo/rotate1%25255B9%25255D.png?imgmax=800" width="542" height="708" /></p> <p>Since the original image is rotated 90 degrees CCW, GSP will rotate it 90 degrees CW so that it is oriented the same way as the thumbnail and optimized image. Also, to prevent issues in the future, the orientation flag in the original file is removed. If we left it in, we would experience potentially confusing behavior in other apps and in GSP, since we’d have a right side up photo whose metadata indicates it’s rotated to the left.</p> <p>After the rotation, the image still appears right side up. But notice the orientation meta item is no longer present:</p> <p><img title="rotate2" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="rotate2" src="http://lh3.ggpht.com/-KHiGvn5wRts/UovSbksxO8I/AAAAAAAAEcU/i81k2qNv5Hw/rotate2%25255B4%25255D.png?imgmax=800" width="645" height="670" /></p> <p>If we open the original file in Paint.NET, we see it is rotated 90 degrees clockwise from its original orientation:</p> <p><img title="rotate3" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="rotate3" src="http://lh5.ggpht.com/-ed9uWqu1kxw/UovSc132CRI/AAAAAAAAEcc/xOYRS0cI1TA/rotate3%25255B4%25255D.png?imgmax=800" width="409" height="526" /></p> <p>We used a photo as our example here, but videos behave the same way. When the binary pack is installed, GSP uses FFmpeg to detect the orientation and then creates the thumbnail and optimized files with the required amount of rotation. Earlier in this post we looked at the new {AutoRotateFilter} parameter in the FFmpeg arguments setting. That is key to this feature. The original video is unmodified until you manually invoke a rotation, in which case the original is recreated with the desired rotation and any embedded orientation flag is removed.</p> <p>What if you don’t want auto-rotation? For videos, all you need to do is remove the {AutoRotateFilter} parameter from the encoder settings. For images, the behavior is hard-coded and cannot be turned off. I considered adding a setting to disable the feature, but decided to wait to see if it’s really necessary. If you are affected by this and don’t want the auto-rotation feature, contact me and describe your situation.</p> <p><strong>Applying auto-rotate to your existing media objects</strong></p> <p>If you upgraded to 3.1 and want your existing media objects to be auto-rotated, follow a two-step process:</p> <p>1. On the Metadata page, click the rebuild button next to the orientation meta item:</p> <p><img title="rotate4" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="rotate4" src="http://lh6.ggpht.com/-cs9wZ0ygXR8/UovSeIo-fhI/AAAAAAAAEcg/mBMji5ezYaw/rotate4%25255B5%25255D.png?imgmax=800" width="426" height="352" /></p> <p>2. Run a synchronize with the ‘Overwrite thumbnail images’ and ‘Overwrite optimized versions’ options selected.</p> <p>You may want to do a test in one album before recursively regenerating items for all your objects. If any existing images or videos have actual orientations that conflict with the orientation meta item, you will end up with files created with the wrong rotation. If you discover this to be the case, I recommend cleaning up your original files by rotating them with a 3rd party app or using a tool to remove the orientation meta item.</p> <h4>Synchronization up to 300% faster and uses less server memory</h4> <p>The synchronization algorithm was modified to be faster and use less server memory. The primary change that caused it be faster is the switch to using WPF to create thumbnail and optimized images as we described earlier, but the other important change is that the synchronization no longer loads all media objects into memory at the beginning of a sync. Instead, media objects are loaded on an as-needed basis as each album is processed.</p> <p>In a test with photos that averaged 18 MB each, the synchronization process finished 300% faster in 3.1.0 than in 3.0.3! That was the best case scenario, as the performance benefits are greatest for large images. In another test where the images averaged 2.9 MB, the speed increase was a still respectable 43%.</p> <p>SQL CE users will notice a smaller performance benefit since much of a synchronization is spent on database access, but the speed increase should still be noticeable.</p> <p>Some web hosting providers automatically recycle the application pool when certain memory limits are reached. In some cases the limits are—in my opinion—ridiculously low (ahem...Arvixe Personal Class has a 250 MB limit).</p> <p>These changes to the sync process should help reduce app recycling due to hitting memory limits. However, be aware that the sync process is inherently a memory-intensive operation and if you have trouble running the gallery on a cheap plan, you may need to upgrade.</p> <p><strong>Removed feature: Support for preserving media object record when original file has been moved to another directory</strong></p> <p>To support the performance and memory improvements of the synchronization process, one feature that has existed since the beginning of time had to be removed. Prior to 3.1, if you used Windows Explorer or some other tool to move an original media file from one directory to another, the synchronization process was able to detect the move and update the original media object record to indicate its new album location. It was able to do this by creating a hash key of each file and storing it in the HashKey column of the MediaObject table.</p> <p>However, this technique had two problems. One, it required loading the hash keys of all media objects in memory at the start of each sync. For large galleries, this came at a performance cost and sometimes triggered an app recycle even before the sync could get underway. Two, the hash algorithm was imperfect because it was based on the file name and its creation timestamp, two values that might be duplicated in other media files. This caused an issue during synchronization for some users.</p> <p>Because of these two issues, this feature was removed in 3.1.0, along with the HashKey column in the MediaObject table. Now if you manually move a file to another directory, the synchronization process will delete the old record in the MediaObject table and then create a new one. Any titles, captions, tags, or other data associated with the original record is lost.</p> <h4>Easier Active Directory setup and integration</h4> <p>One of the pain points in GSP has been the hoops one must jump through to integrate the gallery’s membership with Active Directory. With 3.1.0, the process has been greatly simplified. Now you no longer have to trick the gallery into running under .NET 2.0 just so you can use IIS Manager’s .NET Users applet to set up the admin account. Instead, you choose one of your AD accounts and specify the username and password in the install.txt file in the App_Data directory:</p> <p><img title="ad" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="ad" src="http://lh6.ggpht.com/-AiWttnuHRA4/UovSfUBp8kI/AAAAAAAAEcs/tNgu6UPCiBA/ad%25255B4%25255D.png?imgmax=800" width="381" height="200" /></p> <p>During installation, GSP detects the account info and automatically configures it as an administrator in the gallery.</p> <p>You also no longer have to specify an AD account in web.config with update permission to Active Directory. Instead, the gallery need only be running under an identity with read permission to AD.</p> <p>More information about AD integration is in the <a href="http://www.galleryserverpro.com/get-support">Administrator’s Guide</a>.</p> <h4>Improved performance for large numbers of user accounts</h4> <p>The Manage Users page has been modified to perform better when there are large numbers of user accounts. This is especially helpful for Active Directory integrations where there are often tens of thousands of users. Notice a new textbox at the top that lets you search for a user:</p> <p><img title="mu" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="mu" src="http://lh4.ggpht.com/-zei8FjvPrcU/UovSgM8E-DI/AAAAAAAAEc0/boanbF2QLYI/mu%25255B4%25255D.png?imgmax=800" width="326" height="478" /></p> <p>The textbox has auto-complete functionality so when you type a few characters, a list of matching accounts appears.</p> <p>When the gallery contains more than 1,000 accounts, the Manage Users page no longer renders all those accounts to the screen. Now they are hidden and you use the find user textbox to find the account you want to manage:</p> <p><img title="mu2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="mu2" src="http://lh4.ggpht.com/-Mhqb3GGCXfc/UovShX5PtcI/AAAAAAAAEc8/k2Bv-O7iFdg/mu2%25255B4%25255D.png?imgmax=800" width="365" height="238" /></p> <h4>Support for 3GP videos</h4> <p>This was an easy feature to add but one that should help anyone with 3GP videos. These are treated the same as MP4 videos by the gallery, meaning that they are rendered in an HTML5 video element in browsers that support it and with Flash in the rest of the browsers.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-35472051544211564612013-11-12T11:37:00.000-06:002013-11-12T10:14:57.368-06:00E-commerce integration: Part 6 - Adding e-commerce integration without the Enterprise Edition<p>This is a series of blog posts covering the e-commerce features of Gallery Server Pro.</p> <p><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-1---Add-%E2%80%98Add-to-cart%E2%80%99-and-%E2%80%98View-cart%E2%80%99-buttons-to-your-gallery&id=1845238849559686205">Part 1: Add ‘Add to cart’ and ‘View cart’ buttons to your gallery</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-2---Dealing-with-the-PayPal-nested-form-problem&id=8264388054446048550">Part 2: Dealing with the PayPal nested form problem</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-3---Working-with-multiple-prices-and-options&id=4470003318949421735">Part 3: Working with multiple prices and options</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-4--Using-multiple-%E2%80%98Add-to-cart%E2%80%99-buttons-on-a-page&id=896528807878721695">Part 4: Using multiple ‘Add to cart’ buttons on a page</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-5---Selling-access-to-media-content&id=701601161421811069">Part 5: Selling access to media content</a> <br />Part 6: Adding e-commerce integration without the Enterprise Edition</p> <h4>E-commerce integration without the Enterprise Edition</h4> <p>The Enterprise Edition makes it easy to monetize your gallery by providing ready-to-use PayPal templates. But the GPL Free and GPL Pro editions fully support changes to the UI templates, so with a little bit of work you can have the same level of e-commerce integration provided in the templates.</p> <p>Everything you need to add a shopping cart to your site, including several advanced scenarios, has been covered in this series of blog posts. Even if you don’t have the Enterprise Edition, the screenshots and sample code can be copied into your own templates.</p> <p>So curl up with your tablet on the couch and dig into the blog posts, check out the <a href="http://www.galleryserverpro.com/get-support">Admin Guide</a>, study up on <a href="https://github.com/BorisMoore/jsrender">jsRender syntax</a>, and scan the <a href="https://developer.paypal.com/">PayPal documentation</a>.</p> Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-7016011614218110692013-11-11T11:34:00.000-06:002013-11-12T10:16:54.201-06:00E-commerce integration: Part 5 - Selling access to media content<p>This is a series of blog posts covering the e-commerce features of Gallery Server Pro.<br />
<a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-1---Add-%E2%80%98Add-to-cart%E2%80%99-and-%E2%80%98View-cart%E2%80%99-buttons-to-your-gallery&id=1845238849559686205">Part 1: Add ‘Add to cart’ and ‘View cart’ buttons to your gallery</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-2---Dealing-with-the-PayPal-nested-form-problem&id=8264388054446048550">Part 2: Dealing with the PayPal nested form problem</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-3---Working-with-multiple-prices-and-options&id=4470003318949421735">Part 3: Working with multiple prices and options</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-4--Using-multiple-%E2%80%98Add-to-cart%E2%80%99-buttons-on-a-page&id=896528807878721695">Part 4: Using multiple ‘Add to cart’ buttons on a page</a> <br />Part 5: Selling access to media content <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-6---Adding-e-commerce-integration-without-the-Enterprise-Edition&id=3547205154421156461">Part 6: Adding e-commerce integration without the Enterprise Edition</a><br />
<h4>
Selling access to media content</h4>
<p>So far we’ve looked at setting up an e-commerce gallery to sell physical objects like tee shirts and coffee mugs. In this post we’ll look at configuring a gallery to sell access to media content like video or audio files.<p>
There are a number of ways to do this. Which one is best depends on your business requirements and skills set. We’ll look at two approaches.
<p>
<b>Technique #1: Duplicate the library</b></p>
<p>In this technique we create two sets of media objects—one that allows customers to browse the thumbnails and select items for purchase and another that lets paying customers view their purchases. We’ll keep things simple and create an example where we are selling access to a single video.<br />
<ol>
<li> <p>Create two albums in the gallery. In each one upload the video you want to sell access to.<p>
<a href="http://lh5.ggpht.com/-PjO_WBY1pHA/Un1AxSZ-otI/AAAAAAAAEUk/kULz4byFKxA/s1600-h/sc2242.png"><img alt="sc224" border="0" height="280" src="http://lh6.ggpht.com/-NOHtcdEmAZ4/Un1Ax95pxjI/AAAAAAAAEUs/7ieTevFP2Zw/sc224_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc224" width="546" /></a>
</li>
<li> <p>Open the album named Video and make it private by clicking the lock icon in the top left. This hides the album from anonymous users. Only customers who purchased access to the video will be able to access it—more on that later.
</li>
<li> <p>Go to the UI Templates page, create a copy of the default media object template, and name it Video Store. Assign it to the album named Video Store and copy the following HTML into the HTML tab:
<pre style="color: #61002b; font-family: consolas, 'Courier New', courier, monospace; font-size: 80%;max-width:780px;overflow-x: scroll;"><div class="gsp_mvMediaView"><div class='gsp_mvMediaHeader'>
<div class='gsp_mvMediaHeaderRow'>
{{if Settings.ShowMediaObjectNavigation}}
<div class='gsp_mvMediaHeaderCell gsp_mvPrevCell' style='width:100%;'>
<a href='{{: ~prevUrl() }}'><img src='{{:App.SkinPath}}/images/arrow-left-l.png' class='gsp_mvPrevBtn' alt='{{:Resource.MoPrev}}' title='{{:Resource.MoPrev}}' /></a>
</div>
{{/if}}
{{if Settings.ShowMediaObjectNavigation}}
<div class='gsp_mvMediaHeaderCell gsp_mvNextCell'>
<a href='{{: ~nextUrl() }}'><img src='{{:App.SkinPath}}/images/arrow-right-l.png' class='gsp_mvNextBtn' alt='{{:Resource.MoNext}}' title='{{:Resource.MoNext}}' /></a>
</div>
{{/if}}
</div>
</div>
<div class='gsp_moContainer'>
{{:MediaItem.Views[0].HtmlOutput}}</div>
{{if Settings.ShowMediaObjectTitle}}
<div class='gsp_mediaObjectTitle'>{{:MediaItem.Title}}</div>
{{/if}}
</div>
</div></pre>
<p><a href="http://lh3.ggpht.com/-vDLZiwspGNc/Un1Ayd0ABMI/AAAAAAAAEUw/T33pw2ijdoA/s1600-h/sc2342.png"><img alt="sc234" border="0" height="505" src="http://lh6.ggpht.com/-uLBlfb3v8Ok/Un1AzLi8mZI/AAAAAAAAEU8/pACMKaTDeL8/sc234_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc234" width="585" /></a></li>
<li><p> Update the right pane and header templates to include the add to cart button and view cart button <a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-1---Add-%E2%80%98Add-to-cart%E2%80%99-and-%E2%80%98View-cart%E2%80%99-buttons-to-your-gallery&id=1845238849559686205">as described in this post</a>. Make sure the templates are applied only to the Video Store album. When you are done the Video Store album will have full e-commerce functionality. Users won’t be able to watch the videos, but they will be able to add them to their shopping cart and complete the checkout process.<p><a href="http://lh3.ggpht.com/-CSs_2X0WHu0/Un1AzkHLcOI/AAAAAAAAEVE/fwvaQttFXEA/s1600-h/sc2442.png"><img alt="sc244" border="0" height="256" src="http://lh4.ggpht.com/-3AG8isjexqU/Un1Az9snvsI/AAAAAAAAEVI/8xU5u7Bm7RA/sc244_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc244" width="423" /></a> </li>
<li><p>When a user completes a purchase, PayPal sends you a notification with the details of the purchase. Your job is to give the customer access to the second copy of the video hidden in the album named Video. Create a role that has view permission to this album and configure a user to have access to it. Then give your customer the username and password for this account. When they log in they can now view the video:
<p> <a href="http://lh4.ggpht.com/-0EdcPUxSRjc/Un1A0oCAhKI/AAAAAAAAEVQ/IHV916ZDJ2E/s1600-h/sc2542.png"><img alt="sc254" border="0" height="498" src="http://lh3.ggpht.com/-E2Aa8O60Mkw/Un1A1bKsNQI/AAAAAAAAEVc/bnf-attw76k/sc254_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc254" width="704" /></a> </li>
</ol>
<p>
<b>Technique #2: Authentication sniffing in template</b></p>
<p>
This technique uses a single set of media objects and controls access to them by checking whether the current user is logged on. Anonymous users see the thumbnail image while logged on users can view and play video and audio files. This technique works well when customers pay a set fee for access to all the media content in the gallery.
<ol>
<li><p>Add a ‘Buy Now’ button somewhere in the gallery or in a companion website. The idea is that you will give users access to the media content when they complete the checkout process. </li>
<li><p>Go to the UI Templates page, make a copy of the media object template, name it Video Store, and look for this text:
<pre style="color: #61002b; font-family: consolas, 'Courier New', courier, monospace; font-size: 80%;"><div class='gsp_moContainer'>
{{:MediaItem.Views[MediaItem.ViewIndex].HtmlOutput}}</div></pre></li>
<li><p>Replace it with this:
<pre style="color: #61002b; font-family: consolas, 'Courier New', courier, monospace; font-size: 80%;"><div class='gsp_moContainer'>
{{if User.IsAuthenticated}}
{{:MediaItem.Views[MediaItem.ViewIndex].HtmlOutput}}
{{else}}
{{:MediaItem.Views[0].HtmlOutput}}
{{/if}}
</div></pre>
</li>
<li><p>When a customer purchases access to the gallery, provide them a logon account with view permission to the gallery. They will be able to view the media objects but anonymous users can see only the thumbnail image. </li>
</ol>
<h5>
TIPS</h5>
<ul>
<li><p>To prevent users from downloading media files, be sure to disable the download/share button on the Gallery Control Settings page. </li>
<li><p>Remember that Gallery Server Pro does not offer full Digital Rights Management (DRM) protection. If users have the ability to view a video or audio file, they can also download it. Disabling the download button is only a minor deterrence to a motivated individual. </li>
<li><p>The first technique favors ease of implementation over security. For a more secure solution, upload screenshots of the video files in the Video Store album rather than the actual videos. </li>
<p>
<li><p>If the thumbnail images are too small, change their size on the Media Objects – General page. Be sure to synchronize the gallery with the ‘Overwrite thumbnails’ option selected to force the creation of new thumbnail images. </li>
</ul>Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0tag:blogger.com,1999:blog-4541792071038273470.post-8965288078787216952013-11-08T13:50:00.002-06:002013-11-12T10:17:12.946-06:00E-commerce integration: Part 4 -Using multiple ‘Add to cart’ buttons on a page<p>This is a series of blog posts covering the e-commerce features of Gallery Server Pro.<p>
<a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-1---Add-%E2%80%98Add-to-cart%E2%80%99-and-%E2%80%98View-cart%E2%80%99-buttons-to-your-gallery&id=1845238849559686205">Part 1: Add ‘Add to cart’ and ‘View cart’ buttons to your gallery</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-2---Dealing-with-the-PayPal-nested-form-problem&id=8264388054446048550">Part 2: Dealing with the PayPal nested form problem</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-3---Working-with-multiple-prices-and-options&id=4470003318949421735">Part 3: Working with multiple prices and options</a> <br />Part 4: Using multiple ‘Add to cart’ buttons on a page <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-5---Selling-access-to-media-content&id=701601161421811069">Part 5: Selling access to media content</a> <br /><a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-6---Adding-e-commerce-integration-without-the-Enterprise-Edition&id=3547205154421156461">Part 6: Adding e-commerce integration without the Enterprise Edition</a><br />
<h4>
Working with multiple ‘Add to cart’ buttons on a page</h4>
<p>As we move toward more complicated scenarios, you may find you want multiple ‘add to cart’ buttons in your gallery. The <a href="http://demo.galleryserverpro.com/e-commerce/">Gallery Server Pro E-Commerce demo</a> shows this scenario:<p>
<a href="http://lh6.ggpht.com/-1WKqDxuhNpc/Un0__p26_gI/AAAAAAAAEUE/TXACXxxU4mg/s1600-h/sc2052.png"><img alt="sc205" border="0" height="470" src="http://lh3.ggpht.com/-617GWlXb9-8/Un1AAQD8rSI/AAAAAAAAEUI/xF0h-nBN8AY/sc205_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc205" width="404" /></a><p>
This requires setting up two buttons in PayPal, each with the desired prices and options. Then you copy the embed code for each button into the UI template, tweaking it to work around the <a href="http://www.galleryserverpro.com/blog?title=E-commerce-integration%3A-Part-2---Dealing-with-the-PayPal-nested-form-problem&id=8264388054446048550">forms issue</a> we discussed earlier and assigning the title and description:<p>
<a href="http://lh5.ggpht.com/-e6wHpelcJc0/Un1ABMif5LI/AAAAAAAAEUQ/5eBE5LzuOYk/s1600-h/sc2142.png"><img alt="sc214" border="0" height="1036" src="http://lh5.ggpht.com/-leCXbKAMXnY/Un1ABrOdn8I/AAAAAAAAEUc/c718k_U18PE/sc214_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="sc214" width="611" /></a><p>
Like with the other solutions, we need some JavaScript to handle the form submission when the user clicks one of the add to cart buttons. However, we have the added complication of two sets of form elements—one for each button. If we just submit the form, PayPal will receive data for two buttons and won’t know which one is the real one. So our script removes unnecessary form elements before submitted it to PayPal:
<pre style="color: #61002b; font-family: consolas, 'Courier New', courier, monospace; font-size: 80%;">var bindAddToCartEvent = function() {
$('.btnAddToCart').click(function(e) {
$('#viewcart input[type=hidden]').remove();
var $el;
if (this.id == 'addPrintToCart')
$el = $('#framedPrintContainer');
else
$el = $('#printContainer');
$el.css({
"width": $el.css('width'),
"height": $el.css('height')
})
.find('*').remove().end().addClass('gsp_wait_center');
$(e.target).after("<span class="gsp_wait_center" style="display: inline-block; height: 11px; width: 70px;"></span>");
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() {
bindAddToCartEvent();
});
bindAddToCartEvent();</pre>
<p>
There is also a bit of CSS work to prevent the UI from jumping around when the form elements are removed. The end result is that when one of the add to cart buttons is clicked, only the relevant data is sent to PayPal.<p>
We need a similar solution for handling the view cart button in the header. The HTML is unchanged from our earlier examples, but the JavaScript removes the form tags for both add to cart buttons in the click event handler:
<pre style="color: #61002b; font-family: consolas, 'Courier New', courier, monospace; font-size: 80%;">$('#{{:Settings.ClientId}}_viewCart').click(function() {
var f = $('form')[0];
var $el = $('#framedPrintContainer, #printContainer');
$el.css({
"width": $el.css('width'),
"height": $el.css('height')
})
.find('*').remove().end().addClass('gsp_wait_center');
f.action = 'https://www.paypal.com/cgi-bin/webscr';
f.submit();
return false;
});</pre>
<p>
And there we have it. An e-commerce gallery with multiple ‘add to cart’ buttons on the page.Roger Martinhttp://www.blogger.com/profile/11987442537480095724noreply@blogger.com0