PDA

View Full Version : Resolved Simple control gallery - adding more than 4 photos



mini one
05-29-2009, 09:26 PM
Hello,

Regarding the updated Simple Controls Gallery, I have been able to insert the scripts and css and everything is working properly (I love it when this happens)! The question that I have is how can I add additional image files? I have about 40 images that I want to add to this slideshow and I can not for the life of me figure out how to include additional photos and update the the numbers at the bottom of the navigation panel. Any help on this is greatly appreciated. I have used the fadein slideshow and that allowed me to add additional photos, don't know why I can't figure this out.

Thanks.

Jill

Nile
05-29-2009, 11:08 PM
To and new photos, find on your page, something that should look like this:


var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "http://en.wikipedia.org/wiki/Swimming_pool", "_new", "There's nothing like a nice swim in the Summer."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "", ""],
["http://i30.tinypic.com/531q3n.jpg", "", "", "Eat your fruits, it's good for you!"],
["http://i31.tinypic.com/119w28m.jpg", "", "", ""],
],
autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})


(Highlighted)
To add in a new one, add a comma, then brackets, then put in your image url, for example:

BEFORE

imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "http://en.wikipedia.org/wiki/Swimming_pool", "_new", "There's nothing like a nice swim in the Summer."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "", ""],
["http://i30.tinypic.com/531q3n.jpg", "", "", "Eat your fruits, it's good for you!"],
["http://i31.tinypic.com/119w28m.jpg", "", "", ""]
],

AFTER

imagearray: [
["http://i26.tinypic.com/11l7ls0.jpg", "http://en.wikipedia.org/wiki/Swimming_pool", "_new", "There's nothing like a nice swim in the Summer."],
["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "", ""],
["http://i30.tinypic.com/531q3n.jpg", "", "", "Eat your fruits, it's good for you!"],
["http://i31.tinypic.com/119w28m.jpg", "", "", ""],
["IMAGEURL"],

mini one
05-30-2009, 12:28 AM
Niles,

Thanks for the advice but when I add the image to the array, upload to server, the show completely disappears and the numbers do not increase. It still says 1/4. I am dumfounded... Shall I cut and paste code for review or you can check out the source at this link. [URL="http://www.i-pockets.com"] link: swsa

Nile
05-30-2009, 12:30 AM
In the code, I only see 4 images... Mind updating it?

mini one
05-30-2009, 12:37 AM
Just uploaded the index page
Thanks.

mini one

Nile
05-30-2009, 12:39 AM
I don't want the index page uploaded, I want this page uploaded:
http://www.i-pockets.com/swsa/swsa_index.html

Thanks!

mini one
05-30-2009, 12:45 AM
yes that is the one I updated. When I veiwed it in IE8 it does not show the new picture I added.

mini

mini one
05-30-2009, 12:48 AM
Actually the gallery does not show up either! What a mess.

Nile
05-30-2009, 12:50 AM
Works for me...
http://localhostr.com/files/1ccfa8/capture.png

mini one
05-30-2009, 01:00 AM
Hmm,

I can see that it works so what am I doing that it does not display when I preview in IE. It does work in firefox. If there are only four pictures in IE it works just fine. It is when I add another image that it stops working in IE.

You are a patient soul.

Thanks. Mini one

mini one
05-30-2009, 01:38 AM
Niles,

the problem with IE was just to remove the last comma on the last image entered. How I figured that out was looking at the code from before I did all this and realized that the original code did not have a comma after the last image url. Huh, never would have thought..
anyways I just wanted to let you know in case anyone else happens to run into this. Both work fine in IE and Mozilla now. And the numbers increased also.

THANK YOU

Mini One

mini one
05-30-2009, 05:26 PM
Many thanks to Niles.

Nile
05-31-2009, 02:09 AM
I'm glad to help you! IE gets problems a lot.

It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"