I have listed images from a folder with the code below, but somehow there is also added a number to the first image ....IMG_0122.jpg?1321977528221, which cause the image from displaying.
I wonder if maybe your slideshow javascript is adding the querystring to the image to prevent it from being cached. What plugin are you using? Maybe check the documentation to see if it does something like that and if you can disable it. Also try removing the javascript and seeing if the images display to narrow down the problem.
You're right, when I remove the javascript from the xslt file it's not adding ?1321977528221 to the first image.. I have used the plugin before for a slideshow on this site on the homepage: http://oldengaard.dk/ But the slides was created of child nodes and their properties..
This time I have a gallerySlideshow property on the homepage doc type, which is a mediapicker to pick a folder from the media section either the top folder containing the galleries or a specific child node folder with a gallery to loop images from.
You might need to modify the source as I don't see any documented options to disable that. The reason it's failing is probably because you are using ImageGen which adds it's own querystring, then it's trying to add another one on top of that.
I think you can modify this easily though:
// gets image src, with cache buster var img = control.find('img:eq(' + start + ')').attr('src') + '?' + (new Date()).getTime();
change to:
// gets image src, with cache buster var img = control.find('img:eq(' + start + ')').attr('src');
The .min.js file is just the minified version. To make things easier I would just modify it in the regular .js file and update your code to reference that instead. Or you could modify it in the .min.js version but it might be trickier to find :)
Ahh okay :) .. so the code is just compressed in some way in that file?
I have just used the slides.jquery.js file and changed that codeline.. and it seems to fix it.. :) http://sub.ak-security.dk (the slideshow on bottom right)
Get images from folder
Hi..
I have listed images from a folder with the code below, but somehow there is also added a number to the first image ....IMG_0122.jpg?1321977528221, which cause the image from displaying.
Bjarne
I wonder if maybe your slideshow javascript is adding the querystring to the image to prevent it from being cached. What plugin are you using? Maybe check the documentation to see if it does something like that and if you can disable it. Also try removing the javascript and seeing if the images display to narrow down the problem.
Hope this helps,
Tom
Hi Tom..
I am using this plugin: http://slidesjs.com/
You're right, when I remove the javascript from the xslt file it's not adding ?1321977528221 to the first image..
I have used the plugin before for a slideshow on this site on the homepage: http://oldengaard.dk/
But the slides was created of child nodes and their properties..
This time I have a gallerySlideshow property on the homepage doc type, which is a mediapicker to pick a folder from the media section either the top folder containing the galleries or a specific child node folder with a gallery to loop images from.
Bjarne
Hi Bjarne,
You might need to modify the source as I don't see any documented options to disable that. The reason it's failing is probably because you are using ImageGen which adds it's own querystring, then it's trying to add another one on top of that.
I think you can modify this easily though:
change to:
-Tom
Okay, you have modified slides.jquery.js file?
I am using slides.min.jquery.js file which is the one used in the simple version: http://slidesjs.com/examples/simple/
I'm not sure where the slides.jquery.js is used ... it's included in the download, but the examples projects all use the slides.min.jquery.js file..
Bjarne
The .min.js file is just the minified version. To make things easier I would just modify it in the regular .js file and update your code to reference that instead. Or you could modify it in the .min.js version but it might be trickier to find :)
Ahh okay :) .. so the code is just compressed in some way in that file?
I have just used the slides.jquery.js file and changed that codeline.. and it seems to fix it.. :)
http://sub.ak-security.dk (the slideshow on bottom right)
Thanks for your help Tom..
Bjarne
is working on a reply...