Hello,
For a project I'm doing I'm using the jQuery Galleria slideshow. All is well except standard themes that come with Galleria don't support IE6. It would be really hard to explain the exact problem I'm having only by posting code since I can't really say where the problem is coming from, but I'll try. I was wondering if anyone has had any success making IE6 and galleria play along nicely.
For those of you familiar with Galleria, I'm using the classic theme. In the beginning IE6 simply displayed the images one below the other. After reading a bit I found out that the way css was handled to IE6 from the javascript was problematic for IE6 so after a few changes to the galleria js file and moving the css reference to the html file on which the gallery appears I managed to get the IE6 display the page correctly with the correct layout. However all is not well yet...
The changes I did to make IE6 display the layout correctly:
1. Comment out the reference to the css file from the classic js theme like this: //css: 'galleria.[THEMENAME].css',
2. Link directly to the css file like this:
< link rel="stylesheet" type="text/css" href="[PATH_TO_GALLERIA]/themes/[THEMENAME]/galleria.[THEMENAME].css" />
3. In the galleria.js file (I'm using version 1.1.95) at about line 1952 find this code:
if (obj.css) {
var css;
proto.loop(proto.getElements('script'), function(el) {
var reg = new RegExp('galleria.' + obj.name.toLowerCase() + '.js');
if(reg.test(el.src)) {
css = el.src.replace(/[^\/]*$/, "") + obj.css;
proto.loadCSS(css, function() {
G.theme = theme;
jQuery(document).trigger( G.THEMELOAD );
});
}
});
if (!css) {
G.raise('No theme CSS loaded');
}
}
return theme;
and change it to this code:
if (obj.css) {
var css;
proto.loop(proto.getElements('script'), function(el) {
var reg = new RegExp('galleria.' + obj.name.toLowerCase() + '.js');
if(reg.test(el.src)) {
css = el.src.replace(/[^\/]*$/, "") + obj.css;
proto.loadCSS(css, function() {
G.theme = theme;
jQuery(document).trigger( G.THEMELOAD );
});
}
});
if (!css) {
G.raise('No theme CSS loaded');
}
} else { //########### EDIT HERE ###########
G.theme = theme;
jQuery(document).trigger( G.THEMELOAD );
}
return theme;
Now the gallery loads, page displays with correct layout, external buttons (play, pause, next, etc) work, the only problem is that images within the gallery are invisible.
How do I know that the gallery loads and works and only images are invisible? I've also added the option to galleria to display descriptions and titles from images (built in option in the script I just enabled it). If image has a title or description an "i" (png file) appears in the upper left corner of the image which you can click to see description. I can click this png file and I see the description. I've added a title and description only to one image out of 5, and if I press play, after a 5 sec (default slide play time) that "i" disappears and after 25 sec when galleria loops back it reappears.
What I'm trying to say is maybe all that's left to fix is a simple css hack for ie6 to make it display the images however, so far I've been unable to fix that.
I'd greatly appreciate if anyone could take a look at the galleria classic theme css file and see if there's something to change to make it work with IE6.
Thank you in advance,
Goran