Drupal Galleria Photo Gallery Tips

The Drupal Galleria module works well out of the box, but like most things, can require some attention to get it to work under certain conditions. Here are a few workarounds and some basic CSS I’ve used on the module.

HTML Captions

Out of the box, Galleria doesn’t support html markup in captions. Here’s my solution:

In jquery.galleria.js go to line 311 and change .text to .html.

This is what you’re looking for:

  <div class="bg_screen"><em>// insert the caption
  _wrapper.siblings('.caption')<strong>.text</strong>(_thumb.attr('title'));</em></div>

To get more space for code entry, I also added the following to settings.php:

  <div class="bg_screen"><em>$conf['filefield_description_length'] = 1024;
  $conf['filefield_description_type'] = 'textarea';</em></div>

jCarousel

With the jCarousel plugin enabled, Galleria can behave erratically in some browsers (Chrome for Mac among them) unless the Galleria container height is defined. Here’s what worked for me:

  <div class="bg_screen"><em>#galleria-content .galleria_container {
    height: 555px;
    min-height: 555px;
  }</em></div>

CSS

To center everything:

  <div class="bg_screen"><em>#galleria-content{
  	text-align: center
  }</em></div>