hi guys..first of all..thanks a lot for making such a cool gallery..i set up the gallery in my site. I was wondering if there is an autoplay feature.If its there where do i set it.I want the gallery to slideshow the images upon loading..
slideshow/Autoplay feature in gallery
(8 posts) (4 voices)-
Posted 1 year ago #
-
This version does not have a slideshow. I am coming out with a new photo gallery which will have it.
Posted 1 year ago # -
This is a great product. If it could do a slideshow and start automatically, while still looking the same and resting inside the page, it would be awesome.
Any ETA on the next version? A mailing list so we can follow it? Any way to submit patches should I hack something together?
Thanks.Posted 1 year ago # -
I'm working on it now and hope to have a video demonstration with a way to put your name on a mailing list soon.
Posted 1 year ago # -
So in the meantime I did a crude hack to get a 'slideshow' working with e2_gallery.
In e2photo.js add:
var autodelay=5; //For time of pictures to appear. Set in seconds. (e.g.: 5 == 5 Seconds)
var auto=true; //set to true or false, if true it will run this as a slideshow
var total=tempgallery.length-1;
In e2Photo2.js replace function nextimage with:
function nextimage(current_imgid){newimgid = Number(current_imgid)+1;
if (newimgid>total){
newimgid = 0;
}
newwidth =imggallery[newimgid][1]
newheight =imggallery[newimgid][2]
newimgindex =imggallery[newimgid][8]
newimgid = imggallery[newimgid][8]
cwidth=imggallery[current_imgid][1]
cheight=imggallery[current_imgid][2]
checknext(newimgid);
nextorprev=1;
getstarted(Number(newwidth), Number(newheight), 'imgloader',Number(newimgindex) ,Number(newimgid) , Number(current_imgid), Number(cwidth), Number(cheight))
}
Finally in e2photo2.js replace loadfirstimage() with:
function loadfirstimage(currentwidth,currentheight){
var fadefirst = new Fx.Style('imgloader','opacity', {duration:fadespeed });
fadefirst.set(0);
var firsttitlefade = new Fx.Style('imgtitle','opacity', {duration:transspeed });
firsttitlefade.set(0);
function setfirstimage(){
var newHTML = "";
$('imgloader').setHTML(newHTML);var firsttitle=document.getElementById('imgtitle');
firsttitle.innerHTML=""+tempgallery[0][4]+" "+tempgallery[0][7];
fadefirst.start(0,1);
//firsttitlefade.start(0,1);
currentheight=imggallery[0][2];
currentwidth=imggallery[0][1];
}
new Asset.image(imggallery[0][0], {onload: setfirstimage});
test=self.setInterval("nextimage(current_imgid)",autodelay*1000);
}
This turns what is there into slideshow, it does not currently offer an option of slideshow or standard gallery, it is slideshow only. Really, there is just 4 new lines of code. But it seemed easier to quote the entire function so you could see it. Also, if you click on an image it does not reset the interval. Not yet anyways.
Any thoughts or suggestions?
Posted 1 year ago # -
Quick Solution (2 Steps)
Step-1:
Add the following Javascript just before the ending head tag (</head>)
<script type="text/javascript"> function slideshow(){ if(current_imgid == tempgallery.length-1){ current_imgid = 0; } nextimage(current_imgid); setTimeout('slideshow()',slidespeed); } </script>Step-2:
Add the following to your body tag (<body>)...
onLoad="setTimeout('slideshow()',slidespeed)"Now your body tag should look like...
<body onLoad="setTimeout('slideshow()',slidespeed)">Refresh the gallery page in the browser!
Enjoy!Hope it helps
Regards,
~Akash
akashkhairate@gmail.comPosted 1 year ago # -
slidespeed
You can set the slidespeed in the body tag above to the delay between frame change. Please remember the value should be in milliseconds.
E.g..
<body onLoad="setTimeout('slideshow()',3000)">will change frames every 3 seconds.Posted 1 year ago # -
You could also look at the (E)2 Gallery Pro which has the slideshow built in.
Posted 1 year ago #
Reply
You must log in to post.