This was bothering me because it has come up before. So I looked into it a bit more.
It turns out that lightbox v2.04 does not require that the lightbox onclick event be added to the code for Conveyor (or virtually any other script lightbox is used with), in fact it should not be added if using v2.04. However, the v2.04 lightbox code also relies upon prototype.js for creating an array of images with no duplicates via prototype's uniq() function. This function does not handle multidimensional arrays though (the lightbox image array is multidimensional), so fails to produce the desired result.
This latter issue can be resolved by adding this code at the very beginning of the v2.04 lightbox.js file:
Code:
;(function(){
var b = [[0, 1], [0, 1]];
if (b.uniq && b.length == b.uniq().length || !b.uniq)
Array.prototype.uniq = function (sorted, deep) {
deep = deep || 0;
var a = [], i, j;
for(i = 0; i < this.length; ++i)
a[i] = this[i];
for(i = 0; i < a.length; ++i){
for(j = a.length-1; j > i; --j){
if((a[i][deep] || a[i]) == (a[j][deep] || a[j])){
a.splice(j,1);
};
};
};
if(sorted){
a.sort();
};
return a;
};
})();
Bookmarks