I can't view slideshow in my gallery I can't view slideshow in my gallery
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

I can't view slideshow in my gallery

Started by IrI, April 09, 2006, 10:54:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IrI

I can't view slideshow in my gallery ( http://www.jessica-simpson-fan.net/gallery/index.php ). What kind of error is that. How can I solve this problem? ??? ??? ???

Nibbler

Open include/slideshow.inc.php, find


var t
var j = <?php echo "$j\n" ?>
var p = Pic.length
var pos = j

var preLoad = new Array()

function preLoadPic(index)
{
        if (Pic[index] != ''){
                window.status='Loading : '+Pic[index]
                preLoad[index] = new Image()
                preLoad[index].src = Pic[index]
                Pic[index] = ''
                window.status=''
        }
}

function runSlideShow(){
   if (xIE4Up){
            document.images.SlideShow.style.filter="blendTrans(duration=2)"
                document.images.SlideShow.style.filter= "blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()
        }
        document.images.SlideShow.src = preLoad[j].src
        if (xIE4Up){
           document.images.SlideShow.filters.blendTrans.Play()
        }

        pos = j

        j = j + 1
        if (j > (p-1)) j=0
        t = setTimeout('runSlideShow()', slideShowSpeed)
        preLoadPic(j)
}

function endSlideShow(){
        self.document.location = 'displayimage.php?album=<?php echo isset($_GET['album']) ? $_GET['album'] : '';
echo isset(
$_GET['cat']) ? '&cat=' $_GET['cat'] : '' ?>
&pos='+pos
}

preLoadPic(j)


change to


var t
var cpgj = <?php echo "$j\n" ?>
var p = Pic.length
var pos = cpgj

var preLoad = new Array()

function preLoadPic(index)
{
        if (Pic[index] != ''){
                window.status='Loading : '+Pic[index]
                preLoad[index] = new Image()
                preLoad[index].src = Pic[index]
                Pic[index] = ''
                window.status=''
        }
}

function runSlideShow(){
   if (xIE4Up){
            document.images.SlideShow.style.filter="blendTrans(duration=2)"
                document.images.SlideShow.style.filter= "blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()
        }
        document.images.SlideShow.src = preLoad[cpgj].src
        if (xIE4Up){
           document.images.SlideShow.filters.blendTrans.Play()
        }

        pos = cpgj

        cpgj = cpgj + 1
        if (cpgj > (p-1)) cpgj=0
        t = setTimeout('runSlideShow()', slideShowSpeed)
        preLoadPic(cpgj)
}

function endSlideShow(){
        self.document.location = 'displayimage.php?album=<?php echo isset($_GET['album']) ? $_GET['album'] : '';
echo isset(
$_GET['cat']) ? '&cat=' $_GET['cat'] : '' ?>
&pos='+pos
}

preLoadPic(cpgj)


ie. replace all j with cpgj. The stats counter at the bottom of your page interferes with the slideshow script.