Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Creates very simple image galleries based on files uploaded by FTP. This module is designed for a photographer's Web site where they need to upload 100's images into a gallery and don't want to deal with file upload limitations often placed on lower budget hosting.

By design, there is zero CSS styling that comes built-into this module -- that's up to you as a themer. The markup is minimual as well: just a <div>, a <ul>, and a lot of <li> elements. If you set different Imagecache presets for the thumbnail and full size images, it builds a links between the two making it easy to integrate a third-party image overlay module such as Shadowbox, Lightbox, or similar.

Drupal 7.x version

There is now a Drupal 7.x version of this module. Just checkout the 7.x-1.x branch.

Integration with Shadowbox (Drupal 6.x)

(Note: Something similar should work with Lightbox or Thickbox, but I haven't done it personally...)

  • Download and enable the Shadowbox module. Follow the instructions in that module to download the Shadobox Javascript code.
  • Go to Site configuration -> Shadowbox -> Global.
  • Under Page specific activation settings select the Enable on only the listed pages. Under Pages remove the default pages and replace with gallery/*, replacing gallery with what you set URL for galleries on the FTP Gallery settings page. Click the Save configuration button.
  • Go to Site configuration -> Shadowbox -> Auto image handling.
  • Tick both the Enable for all image links and Group images as a shadowbox gallery and click the Save configuration button.
  • Clear all caches and navigate to one of your galleries. When you click on a thumbnail, it should open the full sized version (scaled to fit your screen) in a Shadowbox overlay.

Adding some basic CSS

Add the following CSS to your theme for some basic styling of FTP galleries.

ul.ftp_gallery li {
  float: left;
  border: 1px dotted #666;
  /* -1px margin prevent double borders between cells */
  margin-left: -1px;
  text-align: center;
  width: 125px;
  height: 125px;
  line-height: 125px;
  list-style: none;
  display: table-cell;
}
ul.ftp_gallery li a {
  display: block;
}
ul.ftp_gallery li img {
  vertical-align: middle;
}

Note: this assumes a thumbnail that's bounded by a 125px box. You can build this with the following Imagecache settings:

  • Action: Scale
  • Width: 125
  • Height: 125

Project information

  • Created by mikeker on , updated