Pages (2):    1 2
Member
Member
dpeterson   15-07-2008, 01:39
#21

I've created a ticket via trac, and hopefully the slideshow.php file is attached for review (I ?think? my submission worked - very new at this stuff). Anyway, good luck, hopefully someone can make use of the revisions.

Administrator
Administrator
acrylian   15-07-2008, 07:41
#22

You did everything correctly. We surely will make use of it!

Administrator
Administrator
acrylian   17-07-2008, 20:00
#23

jackdaw, dpeterson's fix is in the svn, so it will be in tonight's nightly.

Member
Member
jackdaw   19-07-2008, 08:25
#24

Downloaded and tried the new slideshow.php and it works very nicely and fast!
The only thing that took me a little work (just a little ), is that at first I couldn't get the filename/title beneath the images instead of above.
At first I did it by moving

echo "".$image->getTitle()." (".$count."/".$numberofimages.")";

to the end of the if/else statements (movie or mp3 or image) like I did in the 'old' slideshow.php file. This resulted in a correct presentation of that filename for two slides, but with the third slide this filename moved to a position above the image. This is because from then on this title/filename is created somewhat differently ('htmlblock +=' etc.), so I had to change it there to.

Thanks dpeterson and acrylian! This will limit the data transfer immensily for large albums .

Administrator
Administrator
acrylian   19-07-2008, 08:43
#25

The credit for this goes to dpeterson who figured it out. Now we are working on it to get it working with dynamic albums, too..

Junior Member
Junior Member
pipalia   04-11-2008, 16:47
#26

Here's how we got around the issue of preloading images:

We used setInterval to call a function iteratively every 1 second to check if all the images have loaded (note: startingSlide attribute is required to restart cycle after it has been stopped):

var vCycleImages = setInterval("setImgCycleStatus()", 1000);

$(function() {
$('#fadeCenter').cycle();
$('#fadeCenter').cycle('stop');
});

function setImgCycleStatus() {

if ($.preloadImages("pic1", "pic2", "pic3", "pic4")){
$('#fadeCenter').cycle({
speed: 500,
timeout: 8000,
delay: -5000,
startingSlide: 0
});
clearInterval(vCycleImages);
}
}

jQuery.preloadImages = function() {
var bImgLoaded = true;

for(var i = 0; i < arguments.length; i++){
if (document.getElementById(arguments[i]).complete == false) {
bImgLoaded = false;
}
}
return bImgLoaded;
}

Hope this helps.

Samir Pipalia
Pipalia Software House
http://www.pipalia.co.uk

Pages (2):    1 2
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.