The conveyor script writes out one invisible element for the purpose of measuring the length of the image train. It also creates two visible elements so that the effect can be continuous. 3*11 = 33 - so, it makes perfect sense to me. You might want to find where lightbox calculates the number of images and the image number and add in some math to make things work out to be intuitively correct, not mathematically correct.
Where lightbox calculates the total, just put that over 3:
Where it sets which number it is, grab that variable before it is finally used and do:
Code:
count_var=count_var>22? count_var-22 : count_var>11? count_var-11 : count_var;
In other words replace (from lightbox.js):
Code:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}
with:
Code:
// if image is part of set display 'Image x of x' - modified for Conveyor
if(imageArray.length > 1){
Element.show('numberDisplay');
var f=imageArray.length/3;
var c=eval(activeImage + 1);
c=c>f*2? c-f*2 : c>f? c-f : c;
Element.setInnerHTML( 'numberDisplay', "Image " + c + " of " + f);
}
Your lightbox isn't working in FF or Opera though. You need to find this in motiongallery.js and add the red part:
Code:
function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}
crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
initLightbox();
}
window.onload=fillup;
Bookmarks