views:

218

answers:

1

hello everyone. i am using slideshow2 by Aeron Glemann in a website.Does in generate the thumbnails or do i have to provide them?the images iam showing are coming from a cloud, and are passed to the slideshow in an array.the thumbs exist in the cloud. how can i pass them in the array if the show cannot create them? i have used the replace parameter with regex but it shows as thumbnails the full image and nothing happens when i alter the css properties for the thumbnails. the images are displayed.

here is the line for the show creation: var myShow = new Slideshow('show', eval(res.value), { controller: true, height: 350,overlap: false, resize: false, hu: '',replace:[/^\S+.(gif|jpg|jpeg|png)$/,'t$1'],thumbnails: true, width: 600});

the value object contains the images from the cloud in format shown below: ['xx.jpg','yy.png',....]

thank you very much for your time.

A: 

I'd say your regular expression is broken. To add a 't' to the end of the filename? Try:

replace:[/^(\S+)\.(gif|jpg|jpeg|png)$/,'$1t.$2']

Best to play with the regular expression using an online tester to get it right.

Ajw
i took the expression from the faq of the site of the author.it is supposed to create a file name for the thumb by adding a 't' at the end of the file name, that the thumb comes from.
ioannis
i can't see how that regex is meant to work. it only captures the file extension. i've updated my answer to perform the file name conversion: 'xx.jpg' => 'xxt.jpg'
Ajw