Difference between revisions of "Free Geek Vancouver/Gallery"

From FreekiWiki
Jump to navigation Jump to search
m (+ cat)
 
Line 72: Line 72:
  
 
* Figure out why Scott's OGG got uploaded as an UnknownItem instead of a MovieItem.
 
* Figure out why Scott's OGG got uploaded as an UnknownItem instead of a MovieItem.
 +
 +
[[category: FG Vancouver]]

Latest revision as of 20:41, 30 September 2007

Today Scott Nelson and I updated the Gallery 2 installation on the freegeekvancouver.org web site.

New Version

The site was previously running an old version of Gallery, 2.1. We updated to the Gallery Subversion trunk, r16601, which includes several fixes not yet released. 2.2.2 is due any day now and the Subversion trunk is quite stable. https://gallery.svn.sourceforge.net/svnroot/gallery/trunk/gallery2

Next we switched to the DEV_2_3 branch of the WebDAV module which includes several improvements that haven't yet made it into trunk. This meens the WebDAV translations are actually outdated, but we figured this was OK. https://gallery.svn.sourceforge.net/svnroot/gallery/branches/DEV_2_3/gallery2/modules/webdav

We switched to the Silk icon pack, which is the default in Gallery 2.2 and other icon packs lack icons for some new Gallery features.

Upgrade

We reused the old Gallery data directory, config.php and database. Because we installed with sudo, all files are owned by root, which is secure, except for g2data, config.php and .htaccess which are owned by www-data. This is because Gallery needs to write to these locations.

Toolkits

We ensured imagemagick, gs and ffmpeg were installed on the web server, then activated the Gallery imagemagick and ffmpeg toolkits. We uninstalled all other toolkits. Imagemagick is probably the most powerful toolkit and it supports PDFs. By disabling the other toolkits, we hope to simplify and reduce errors.

Once we did this and ran the Gallery rebuild thumbnails maintenance task, thumbnails appeared correctly, including thumbnails for PDFs.

In the future, we might enable the jpegtran toolkit, after installing the libjpeg-progs package.

Random Image Block

PDFs were appearing in the random image block. The random image block supports restricting random images to a particular album and we think the best solution is for Gallery to eventually support creating dynamic albums: Albums whose contents is dynamically generated from a search query, like all photos with a particular keyword. This would let us give photos we want to appear in the random image block a particular keyword. Meanwhile we disabled the random image block.

Another temporary solution would be to organize the Gallery in terms of photos, documents and videos. This would not only let us restrict the random image block to photos only, but avoid other Free Geeks being confused by documents in our Gallery. Ifny suggested this reorganization of our Gallery.

Rotation

Gallery is sensitive to the EXIF orientation tag created by cameras when you take a photo sideways. However if the photo is already correctly oriented by another program and the EXIF orientation tag not removed, Gallery will apply the orientation tag to the correctly oriented photo and it will appear rotated. In this case the user must rotate the photo back manually, either in the original program or in Gallery.

Permissions

We agreed all registered or authenticated users should be able to add items to the Gallery. To enable this, we needed to grant the [core] add sub items permission to the 'authenticated user' group in all existing albums and the [core] add sub albums permission in the root album. It's not clear whether we'll need to manually grant the [core] add sub items permission on all newly created albums from now on, or whether they'll inherit this permission.

Other Modules

We uninstalled the shutterfly module because we didn't see any use for commerce on the Free Geek site. We installed the zip package and the Gallery zipcart module to enable downloading zipped archives of photos.

We installed the Gallery dynamic album plugins like the keyword album plugin.

We installed the WebDAV module and the HTTP Auth module on which it depends. These let users mount Gallery on the desktop and drag and drop photos into Gallery.

WebDAV

We enabled Apache mod_headers to support the Gallery WebDAV module. It is accessible at both the URLs:

One URL corresponds to Gallery in Drupal embedded mode and the other to Gallery direct. Hopefully both work identically?

When your WebDAV client requests a username and password, it's naturally your freegeekvancouver.org site username and password.

The WebDAV interface is tested with cadaver, fusedav, GNOME and Konqueror. It should also work with Windows Explorer. There seems to be an issue adding items with Mac OS X. Jack needs to sit down for an hour with a Mac OS X machine to figure out and fix what's wrong.

URL Rewrite

Apache mod_rewrite is enabled on the web server so we installed the URL Rewrite module for clean URLs. It writes a block of mod_rewrite directives to the Gallery .htaccess file so URLs of the form gallery2/short_url work. We disabled the site admin rewrite rule because it conflicts with the Drupal site admin URL.

By accessing the Gallery URL Rewrite admin option through the Drupal embedded mode, we enabled URL rewrite in embedded mode. This writes a block of mod_rewrite directives to the Drupal .htaccess so short URLs work in embedded mode. To do so, we changed the owner of the Drupal .htaccess file to www-data. I hope it's not possible for these rules to conflict with Drupal clean URL rules. To setup Gallery URL Rewrite in embedded mode, we needed to enter the absolute path to the Drupal .htaccess file and the Drubal rewrite base. The rewrite base field is a bit confusing, it lead me to think I should enter the whole http://freegeekvancouver.org/ URL, which broke mod_rewrite. Instead it requires just the absolute web path of to the Drupal installation, which in our case is '/'. I think the URL Rewrite module should be clearer and use parse_url to remove any host portion if it's accidentally entered. I will probably file a bug with Gallery about this.

200706250

Disabled most URL rewrite rules to avoid conflicts with Drupal clean URLs. HTTP auth rule is not required with mod_php.

200706251

Installed the g2image TinyMCE plugin, according to the Gallery Drupal module INSTALL.txt

TODO

  • Figure out why Scott's OGG got uploaded as an UnknownItem instead of a MovieItem.