The front page of my site stops loading, or only loads partially, when I have the Galleria running. I've tried removing images with spaces in the title, but that didn't help.

The site is here [http://www.laplandaccommodation.com/] and I added a 'contact' link in the footer. My analytics and full content can be seen in the source, but no scroll bar.

Any guesses?

Views Slideshow: Galleria 6.x-1.x-dev (2010-Jul-13)
Views Slideshow 6.x-2.2
Views 6.x-2.11

CommentFileSizeAuthor
#1 galleria-skin.jpg168.5 KBAdam S
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Adam S’s picture

FileSize
168.5 KB

EDIT: I just realized why your photos where so big. You are using the 'fullscreen' template in such a small area. I don't know how you did that because that should render thumbnails and then when you click on the thumbnail you should get the entire screen with nothing else as an image gallery.

It might be because your images are so big. Create an imagecache preset.

This modules success is what I think Drupal needs more than anything else and if I was Dries it would be a priority to get it working. Lots of people are begging for excellent and easy (for nubes like myself) image gallery support for Drupal.

Nonetheless, all you need to get this module working is a view that outputs this HTML structure below.

<div id="gallery">
    <a href="/img/large1.jpg"><img src="/img/thumb1.jpg" alt="My description" title="My title"></a>
    <a href="/img/large2.jpg"><img src="/img/thumb2.jpg" alt="Another text" title="Another title"></a>
    <a href="/img/large3.jpg"><img src="/img/thumb3.jpg" alt="My description" title="My title"></a>
    <a href="/img/large4.jpg"><img src="/img/thumb4.jpg" alt="Another text" title="Another title"></a>
    <a href="/img/large5.jpg"><img src="/img/thumb5.jpg" alt="My description" title="My title"></a>
    <a href="/img/large6.jpg"><img src="/img/thumb6.jpg" alt="Another text" title="Another title"></a>
</div>

1. Create an imagecache preset.
2. Create View called Gallery.
3. Add field of whatever your image is and use the imagecache preset linked to image.

Create three tpl.php files and put them in your theme template folder.

1. views-view--gallery.tpl.php

  <?php if ($rows): ?>
    <div id="galleria">
      <?php print $rows; ?>
    </div>
  <?php elseif ($empty): ?>
    <div class="view-empty">
      <?php print $empty; ?>
    </div>
  <?php endif; ?>

2. views-view-fields--gallery.tpl.php

<?php foreach ($fields as $id => $field): ?>
  <?php print $field->content; ?>
<?php endforeach; ?>

3. views-view-unformatted--gallery.tpl.php

<?php foreach ($rows as $id => $row): ?>
    <?php print $row; ?>
<?php endforeach; ?>

This cleans out all the extraneous crap from the view output html. Make sure by checking the View's theme section that the tpl.php files are overriding the defaults.

Include the galleria.js file in the theme.info file.

Include this code either at the bottom of page.tpl.php before the closing body tag at the end or in a separate js file. Make sure that the theme that ships with galleria is in the path of loadTheme() and the selector #galleria is the same as in the views-view--gallery.tpl.php file. All the preload and image_crop stuff is optional. All the options can be found at http://github.com/aino/galleria/blob/master/docs/options.rst

Galleria.loadTheme('/sites/all/themes/framework/js/dot/galleria.dot.js');
$('#galleria').galleria({
	preload: 3,
	transition: 'fade',
	image_crop: true
});	

The biggest problem with the module is that it doesn't preload the thumbnails if you use them and then use ahah to load large image. With <a href="/img/large1.jpg"><img src="/img/thumb1.jpg" alt="My description" title="My title"></a> structure the galleria uses the img src to load the thumb but will only preload the /img/large.jpg as defined using the preload: option.

Once the view creates the structure it's only 5 or 6 lines of simple code to activate the gallery. You really need to downsize those images. I included my implementation of this simple code and View. What do you think?

coloryan’s picture

Status: Active » Postponed

Thanks! I'll be working on this later in the week and report back then.