View Full Version : Cannot find this script...

06-22-2008, 07:34 PM
Hello guys, new here, I am trying to find a specific script, and it is probably
so easy to make thats why nobody has it readily available, or I am not looking
for the right name of it.

I am working on a site for a friend, a non-nude model site, and was looking
for a script that could automatically create a 3 column table, and for the
content of each cell it would be pulled from an xml file.

Basically so it would be easier to list the most recent set release thumbnails
first... She likes to have like 60-something up there, so manually shifting
60 images into new cells 2 times a week would be a lot of work.

And I can usually install, but I dunno how to program javascript yet.

Any help, pointing me in the right direction would be greatly appreciated.

Been trying different scripts the last 2 days and nothing is working how I
would like yet... Spending to much time on this project for mostly static site.

06-22-2008, 08:20 PM

Does any one of those help you?

06-26-2008, 06:46 PM
I tried those, but I think, in combination with another script I was using, reflex, there were errors displaying the images correctly.

And I couldn't get the php one to run on a home server... So gave up on that.

06-26-2008, 08:26 PM
actually, I dont think I fully thought it through, the non-php one might work for me, I will try it again....

06-27-2008, 02:26 AM
Nope, I remember now....

Because you define myvacation[0]= and ect through your number of photos,
you would inevitably have to change 0-60 on every line in order to get said
newest photo to appear at the top.

06-27-2008, 02:42 AM
Javascript arrays don't have to be in order, they just (generally, in practical use, such as in this script) cannot have any missing entries.

So, though I'm not sure exactly what you are objecting to, it makes no difference (other than the order in which the entries will be used, which will always start at 0 and go to the highest number) if you have:

var myvacation=new Array()
myvacation[0]=["../photo1.jpg", "", "photo1-large.jpg"]
myvacation[1]=["photo2.jpg", "Our car", ""]
myvacation[2]=["photo3.jpg", "Our dog", "photo3-large.jpg"]
myvacation[3]=["photo4.jpg", "Our hotel", "http://www.gohawaii.com/"]
myvacation[4]=["photo5.jpg", "Our Computer", "http://www.google.com", "_new"]
myvacation[5]=["photo6.jpg", "Our house", "photo6-large.jpg"]
myvacation[6]=["photo7.jpg", "Our Friends", "http://www.ask.com"]


var myvacation=new Array()
myvacation[6]=["../photo1.jpg", "", "photo1-large.jpg"]
myvacation[5]=["photo2.jpg", "Our car", ""]
myvacation[4]=["photo3.jpg", "Our dog", "photo3-large.jpg"]
myvacation[3]=["photo4.jpg", "Our hotel", "http://www.gohawaii.com/"]
myvacation[2]=["photo5.jpg", "Our Computer", "http://www.google.com", "_new"]
myvacation[1]=["photo6.jpg", "Our house", "photo6-large.jpg"]
myvacation[0]=["photo7.jpg", "Our Friends", "http://www.ask.com"]

or even:

var myvacation=new Array()
myvacation[6]=["../photo1.jpg", "", "photo1-large.jpg"]
myvacation[1]=["photo2.jpg", "Our car", ""]
myvacation[3]=["photo3.jpg", "Our dog", "photo3-large.jpg"]
myvacation[5]=["photo4.jpg", "Our hotel", "http://www.gohawaii.com/"]
myvacation[0]=["photo5.jpg", "Our Computer", "http://www.google.com", "_new"]
myvacation[2]=["photo6.jpg", "Our house", "photo6-large.jpg"]
myvacation[4]=["photo7.jpg", "Our Friends", "http://www.ask.com"]

Just as long as the numbers all make up an uninterrupted sequence starting at 0.

06-27-2008, 03:19 AM
To answer your first post, to my knowledge you cannot read an XML file from javascript.

Second, I would like to suggest a method for updating photo galleries that has always been very easy to maintain for me. Rather than changing the file or the script, just change the images out.

Let's say that you have 60 images all named like this:


When you need to change out the images, all you need to do is rename your images and upload them to the site overwriting the old ones. No need to change the script or an XML file. You have to upload the new images anyway so that step can't be avoided, Why not make it the only step?

Also, you can rename the image in windows xp very quickly if you put them all into a folder, select them all and click rename. Then type in image.jpg for the first image, they will all be named sequentially.

Next comment, when you test a script be sure that you only test a small part at a time. This will make it easier to find errors, since there will be less code to dig through that might potentially haver problems. Then once you get a small part working add on the next bit and test again until you finally have added all of the code and it all works.

"It's broken" is not really a very clever way of describing an error. It's a lot more helpful to say something like, line 68 error outs.

**Download and install Firebug.

06-27-2008, 05:17 PM
Just as long as the numbers all make up an uninterrupted sequence starting at 0.

Hah, shows how much I know about jscript.... I will try that out.

06-27-2008, 07:50 PM
I got it pretty much working, though it displays myvaction=[0] first no matter what, I thought the way you described it you ment that it would display them in the order I put them, as long as the sequence wasn't broken.

But I guess you ment if type in the sequence 5, 2, 3, 4, 1, 0 it would still come out 0, 1, 2, 3, 4, 5....

And also not being able to define the width/height manually is a problem.

Back to endless googling...

06-28-2008, 05:55 AM
By being able to number your entries however you like, you control the order, as 0 will always be first, 1 will be second, and so on. This allows you to reorder the entries without actually moving them around, all you need do is to change the numbering.

This is getting to be a rather long thread, so forgive me if you already mentioned it, what width/height exactly do you want control over?

06-30-2008, 06:52 PM
Dont worry about it guys, I found something I liked, a flash jscript combo that utilizes xml.