Support Forums

Support Online : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Making Image Rotator Slideshow 'Continuous'

Featured Lock Resolved
Hello,

Does anyone know how to make the SP Image slideshow show the images 'continuously' and not reverse at the end of slides?

Thanks for any help offered.

2 Answers

Chris Jones

More than a month ago #Permalink
Hi,

I'd also like to do this. Is everyone sure that this isn't an option somewhere?

Functionality wise, it should be quite easy: add the first image on at the end of the image array, then, instead of sliding back to the beginning, switch instantaneously to the beginning (all imperceptible to the visitor).

Does anyone know whereabouts in the code such an edit would go?

Thank you,
Chris

ps url very much under construction

Chris Jones

More than a month ago #Permalink
woo hoo! I've done it (just about).

In the helper file, I've added the first image in at the end of the array to repeat again (lines 30 and 31)...

helper.php:

foreach ($files as $file) {
$lists[$i]->title = JFile::stripExt($file);
$lists[$i]->image = JURI::base().str_replace(DS,'/',substr($path,1)).'/'.$file;
$i++;
}
$lists[$i]->title = JFile::stripExt($files[0]); // line 30: $i is left as the next increment and $files[0] is the first image in the slideshow
$lists[$i]->image = JURI::base().str_replace(DS,'/',substr($path,1)).'/'.$files[0]; // line 31
return $lists;
}


and then turned the sliding effects off by passing 1 to the noFx parameter (third parameter of the walk method) when the slider was at the end (lines 130 and 134)...

_class.noobSlide.js:

previous: function(manual){
this.walk((this.currentIndex>0 ? this.currentIndex-1 : this.items.length-1),manual,(this.currentIndex>0 ? 0 : 1)); // line 130
},

next: function(manual){
this.walk((this.currentIndex<this.items.length-1 ? this.currentIndex+1 : 0),manual,(this.currentIndex<this.items.length-1 ? 0 : 1)); // line 134
},


Now all I have to do is set the duration to zero on the repeated image - as it is, that first slide appears for twice as long. I don't think this is very elegant - I'd like to change the code to allow "continuity" as an option. I've only tested this in autoplay mode with the images going from right to left.


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 103
Sifat

Sifat

Total Accepted Answers: 97
Toufiq

Toufiq

Total Accepted Answers: 36
Pavel

Pavel

Total Accepted Answers: 4
J

johnny

Total Accepted Answers: 3

100+

Templates

200,000+

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us