Advertising sustains the DA. Ads are hidden for members. Join today

Views Gallery enhancements - and "Reviving" in Drupal 7

Last updated on
30 April 2025

Update: Views Gallery was very nice in Drupal 6, but then became abandonware, not ported to Drupal 7.
Bummer! I thought, and one reason it took me a long time to upgrade/migrate to D7.

Having done so, I checked, and indeed Views Gallery not working; nothing to be seen of the galleries or images.
But I figured the images are still in folder[s] where they've been uploaded, and Drupal has info on them - so maybe could be able to do something to partly revive the galleries I'd created; after all, had uploaded a few thousand photos and added keywords, some information etc, and didn't want to do all this again.

Seemed that "migrate fields" was some help; but led to getting Content: Image, apparently without these images being seen by the regular Image software. Which meant that could readily output image titles/names - rather than images being visible - and then had to click on these for browser to display images in isolation. Not much use!
Juicebox Reviving Views Gallery - well, almost...

Looking at info on galleries for Dupal 7, I found these seem a bit sparse (as Drupal 6), but Juicebox interesting.
I installed Juicebox; and with not much hope, tried this.

Found it worked, after a bit of tweaking. For Views set up as main gallery, worked really well. Free version only allows 50 images per album; but I have also set up filters to choose from keywords, so overall there's potential for people to browse many more than 50 images.

Individual images seemed harder. But here, I found that if edited the Gallery Image content type, could select display, then find the Image - and change the "formatter" Drupal uses, from something like the regular file [ie just showing image file name], to becoming like a one-image Juicebox gallery. Could choose image sizes, and size of the "gallery". Also worked for Teasers.

Well, not ideal, and I likely won't use for adding fresh images to the sites; but at least all that image uploading and information entering has not gone down the drain!

back to the old info:

I had long thought Drupal's Views module could help power a photo gallery, but was daunted by the prospect of actually creating one. Happily, though, KarenS has created the Views Gallery module - which makes it relatively easy to start a gallery; and to move towards creating more of a catalogue of images. There's plenty within Drupal's contributed projects to move way beyond bog standard galleries with grids of thumbnails linked to larger images.

Note that Views Gallery requires other modules, too: maybe you should install these first, and Views Gallery once all is ok.
- also note: Please revise this where you think it useful to do so.

Once you have Views Gallery up and running, it's relatively simple to create image galleries. These seem fairly basic, but open to customisation, and helping visitors with navigation.
Here are a few ideas re what you can do; hopefully others will add to this - seems to me Views Gallery could be the basis of a cracking Drupal powered gallery. (So too Node Gallery?? - which on face of it looks similar.)
Gallery using several of these ideas:
http://www.drmartinwilliams.com/photo-gallery

Image sizes

Check the default image sizes - see if they're ok for you.

Default for full images - around 600x400 I think - maybe small. To change this, head to administration - content types - image.

As photos are uploaded, imagecache also creates smaller versions. To check if these are ok, administor - site configuration - imagecache. Also see if you want images cropped to size, scaled, or maybe scaled along one axis, then cropped on the other. Maybe experiment.

Taxonomy: keywords

In Taxonomy, you can choose to have existing vocabularies apply to images. Also, you could add a new vocabulary - like Photo Keywords, with free tagging. These in turn become terms that Views can make use of.

Sections module helps give Galleries and Image pages different look

While I prefer black on white for pages where text is key - as easier to read, I find photos look best against dark, even black, backgrounds.

Changing page appearances evidently requires loading different themes for them. I found the Section module is ideal for this; with it, can select a different theme for galleries and images. In turn, easier if have consistent, unique components in their URLs, which is possible via Taxonomy and Path Auto.

The FIrebug plugin for FIrefox, or Dragonfly in Opera, are extremely useful in helping change a theme's css, so background, text colors etc, suit a photo gallery.

Fivestar Module for voting

The Fivestar module allows people to vote for photos.

Views Module for navigation and much more

The Views module can do a whole lot of nifty things with photos, plus their titles and keywords. But it's also one of the scariest modules in Drupal.

Here's a little of what I found, and some of ways I created a block and page with tiny thumbnails, which users can browse through using gallery names, and keywords.

First, I think it's useful to have a look at the gallery view, which is created on installing Views Gallery. You can see much of the key choices via Edit; note too that it's a node content view - so Full gallery is attached to nodes of a certain type (gallery). Notice some of the settings - Grid for the layout; Gallery for both relationship and arguments (hahaha; wish I knew what that meant! - but perhaps to do with pulling images belonging to gallery of a specific name), the Fields - what will be displayed, Sort criteria - for order of display; and Filters - to keep out unwanted stuff.
Close the gallery view, and onward, to create one or more new views!

These new views can do a wide variety of things. Perhaps have slideshow with images (something I've tried; ok w thumbnails but in pages full size images greatly trimmed for some reason; working in block), create lists of keywords for photos, create blocks and pages for browsing tiny thumbnails.
It's possible to do a variety of things within one view - simply by adding displays like pages and blocks, and making changes to settings for these.
But, best to create a view, and make displays that are simple variants of the default.

For a tiny image browser page/block:

Create the view. Give it a name that will be useful to you, when you see it in lists - like tinyphotosbrowserview, say. Make it node type.
For defaults, choose grid as display;
Relationships - maybe choose gallery (based on gallery view);
Content - choose image, and there's a heap to select from, with tiny thumbnail linked to node (= linked to page with the image) the one you perhaps want;
Sort criteria - up to you, tho Global random maybe useful;
Filters: Gallery term is one possibility. You can choose to Expose the filter, so visitors can use this to choose to view tiny thumbnails from a certain gallery. Taxonomy term is another possibility: in my case, I have free tagging for Photo Keywords, so use these in the filter. Again, you can Expose the filter, maybe allow people to select more than one term.

Now would seem a good time to save the view.

It's pretty straightforward to create a page and a block from the view. (Via "Add Display"). For each, best to head to grid, and assign specific setting to number of rows, as well as specify number of photos to display. More rows, more photos, possible in a full page.

Imageflow - and Keywords

If you create an image browser view like this, you should find it pretty straightforward to create some more views: mabye for blocks with grids of images chosen from certain galleries (without exposed filters) - these can be decorative, enhancing your site, as well as linked to image nodes.

I've just tried Imageflow, and think it makes for a great way of flipping through thumbnails - as in Mac OS X, or iPhones. A page with imageflow plus exposed filters looks, to me, excellent for helping people quickly browse through photos.

Image carousel is also worth checking out; though may need revised css files to suit your photos.

Maybe also worthwhile to create a views page that lists your keywords - serving rather like an index/map for photos. As well as benefiting users directly, could be some help for enabling search engines to discover your images.

Once you have more than one gallery, it might be worth creating an entry page for the overall gallery.

Here's a way I've done this - likely clumsy, but result seems ok.

First, created custom "teasers" for each gallery.
I wanted selection of images for each gallery, with only one title. The way I figured for this is long-winded: created view with set of blocks for each gallery, with just the title linked to gallery; chose table as display (only one line in table, but a bit more interesting looking than unformatted). Also created view with set of blocks for each gallery, displaying four thumbnails (linked to image nodes) in row.

Then, used Panels to make a panel page. In this, just put column of gallery titles and thumbnail blocks: title of each gallery above its block. Makes scant use of Panels' potential, but result is a page with the custom gallery teasers.

Quicktabs

The Quicktabs module can also augment Views Gallery. To me, useful for displaying blocks that are same or similar in size, with different content, only one of which is visible at a time. For instance, you can show selections of thumbnails from individual galleries (displayed by views), with tabs for the galleries.

Imagecache Actions

This module looks impressive; features include watermarking. You can add simple watermarks using text: possible to choose font, size, colour and transparency.

FUpload for multiple uploads

This works very well for multiple image uploading. No need for Image module. Odd way to enable - via editing fields for Image (of type for gallery), then change widget that will be used for the uploads. Also, select upload of one image per node.

Gmap and Location

With these, you can create maps showing locations of photos. You might, say, opt for clicking on a map marker leading to a photo title and thumbnail, which in turn then lead to full view of image (on node).
I've started map like this at:
http://www.hkoutdoors.com/photos-gmap

Well, that's as far as I've got so far. Plenty more is possible with Drupal - including plenty without the need to do any code, or even mess about with those darn Argument things, even more if you can code and you speak Drupalese.
Hope this proves helpful; more ideas welcome.
I may update this page (assuming it's rated worth keeping in the documentation); likewise a near identical article I've done, at:
http://www.drmartinwilliams.com/websites/drupal-views-gallery-w-customis...

Help improve this page

Page status: Not set

You can: