Hi Markus,
Got some trouble figuring out how to get it working the way I want it.
I've got a gallery, using Views with the Fluid Grid option.
Can't get it working in a grid, with every option I try the thumbnails are only showing below each other in one column (centering, left-alignment, spacing etc. works OK as far as I can see).
Thanks in advance,
Maarten

Comments

maartenr’s picture

After some researching I maybe found out what's causing the trouble.

When I choose the Theme link of the particular view in Views and choose the "display output"- link, I get the following message:

warning: file_get_contents(./sites/all/modules/image/contrib/image_gallery/views-view.tpl.php) [function.file-get-contents]: failed to open stream: No such file or directory in /home/balisup/domains/mydomain.com/public_html/sites/all/modules/views/plugins/views_plugin_display.inc on line 1240.

I have no clue how to correct this, however. By the way, I m using the Image module with the Image gallery enabled. Trying to control the output of the gallery with Views and the Views Fluid Grid plugin...

markus_petrux’s picture

Status: Active » Postponed (maintainer needs more info)

Please, try using a Page display, not a Gallery page display. Works?

markus_petrux’s picture

Title: No grid? » Error loading image_gallery/views-view.tpl.php from views_plugin_display.inc on line 1240

Better title

markus_petrux’s picture

I think the issue described in #1 is a bug in Image gallery. Using a Gallery page display, try this change to image_gallery.views.inc

       'image_gallery' => array(
         'title' => t('Gallery page'),
         'help' => t('Display the view as a gallery of images, with a URL and menu links.'),
         'parent' => 'page',
         'handler' => 'image_gallery_plugin_display_image_gallery',
         'theme' => 'views_view',
+        'theme path' => drupal_get_path('module', 'views') . '/theme',
         'uses hook menu' => TRUE,
         'use ajax' => TRUE,
         'use pager' => TRUE,
         'accept attachments' => TRUE,
         'admin' => t('Page'),
         'help topic' => 'display-page', // TODO ??
         'path' => drupal_get_path('module', 'image_gallery') . '/views',
       ),

Anyway, the issue described first might not be related to this. Could you please try Fluid Grid using a Page display, not a Gallery page display? Works? If not, it could be a browser problem. Have you tried with different browsers?

maartenr’s picture

I deleted the gallery page view and changed it to a page view with the same settings.
Unfortunately: no difference: the same results.

By the way, the warning I described above when looking at the "theme - display output" links has indeed disappeared.

I've tested this with Mozilla Firefox and yes you are right, the grid view is working fine then. However, I would like this to work for IE (my standard browser and I think I am not the only one...) too?

markus_petrux’s picture

Have you tried with different browsers?

Maybe you could create a view and send me the URL from my contact form?

markus_petrux’s picture

Title: Error loading image_gallery/views-view.tpl.php from views_plugin_display.inc on line 1240 » IE issue - Thumbnails are only showing below each other in one column

Re: "By the way, the warning I described above when looking at the "theme - display output" links has indeed disappeared."

Maybe you could open a separate issue in the Image module queue about that.

Re: "I've tested this with Mozilla Firefox and yes you are right, the grid view is working fine then. However, I would like this to work for IE (my standard browser and I think I am not the only one...) too?"

Version of IE?

I've visited the URL you've given to me from the contact form in IE6, and it showed the gallery ok. The only thing I know it doesn't work in IE6 is the CSS3 stuff.

I'll check with IE8 later, but my previous tests while working on the Fluid Grid worked in IE8 as well as in Firefox 3.x and Opera 9.x and 10.x.

So maybe it is a problem with IE7?
Or is it about a particular option that doesn't seem to work in IE6, IE7 and/or IE8? Which version, please, because Microsoft has given us here more headaches than necessary.

maartenr’s picture

Well, tested it here on IE8 now and indeed it's working correctly.
Checked it and yes, it is IE7 that is showing it incorrectly...
(Haven't found another machine with IE7 yet to test it also with)

So, can you make it work for IE7?

maartenr’s picture

Status: Postponed (maintainer needs more info) » Active
markus_petrux’s picture

Category: support » bug
Status: Active » Needs review

I'm tempted to say won't fix because everyone running IE7 should be able to upgrade to IE8.

However, this is kind of a challenge to make it work in all browsers that are still in the wild. The problem with IE7 is that it is not easy to find a CSS selector that targets this browser, but I believe I've found one. So, please could you edit the file css/views_fluid_grid.base.css and append the following?

html > body li.views-fluid-grid-inline {
  *display: inline;
  *zoom: 1;
}

The selector "html > body" works in all modern browser, except IE6 and lower, but the * hack is still present in IE7 and IE8 running in IE7 compatibility mode. So, I guess this could do the trick.

One problem remains in IE7, it is that margins do not seem to be applied to the elements in the grid, so the result is not very nice. The real solution to this is upgrade to IE8. :)

maartenr’s picture

Status: Needs review » Fixed

Great!

The result in IE7 is OK in my opinion.
But you are right of course, the best solution is to upgrade to IE8.
However, for the IE7 users it might be an idea to add this standard to your code?

Anyway, thank you very much for the helpful and very quick reactions!
I have set the status of this topic as fixed, but I'll leave it to you to change that or not.

markus_petrux’s picture

Title: IE issue - Thumbnails are only showing below each other in one column » IE7 issue - Thumbnails are only showing below each other in one column

I have committed this to CVS along with a description of each CSS Hack used.

http://drupal.org/cvs?commit=274602

Themers can still override the base stylesheets provided here and move the fixes for IE6 and IE7 to external stylesheets included in the page using conditional comments. For example:

<!--[if lte IE 7]>
<style type="text/css">
/* Enforce hasLayout for IE7 and lower to emulate LI using inline-block display. */
li.views-fluid-grid-inline {
  display: inline;
  zoom: 1;
}
</style>
<![endif]-->

or

<!--[if lte IE 7]>
<link type="text/css" rel="stylesheet" media="all" href="fixie.css" />
<![endif]-->

where fixie.css contains:

/* Enforce hasLayout for IE7 and lower to emulate LI using inline-block display. */
li.views-fluid-grid-inline {
  display: inline;
  zoom: 1;
}

I haven't used conditional comments in the default implementation because it seems to me these are not easy to override from the theme.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.