Posts [ 6 ]

Topic: Another multiple galleries question

I have a site that will have multiple gallery sections, each being a different type of job. The plan is for each grouping of jobs to open in a _blank window which will then list links to galleries of individual jobs. Each time the user clicks a gallery, a SV instance should open in another _blank.

Is there any way I can have each gallery access the same .swf (because it will be the same setup for each gallery) so that I don't have to upload tons of .swfs?

So far I have it set up similar to what is posted in FAQ #16 which I think will work (its hard to test because all the images have not been chosen yet), but if someone has an idea of how to set this up more efficiently I am open to suggestions.

OK so the explanation goes a bit like this... The root dir html has a directory in it called galleries (amongst others not listed)In the galleries directory there are several subdirectories for each simpleviewer gallery that I want, there are also some files, but I will get to those in a minute. Each Simpleviewer Gallery directory has an images and a thumbs subdirectory and it also has an index.php and a gallery.xml.The files in the galleries directory are an index.php, which contains a list of all the galleries, the swobject.js being the simpleviewer javascript file, the view.swf being the flash object that you don't want to have 300 copies of on your website, and finally the viewer-code.php.

Because I'm using php you can do nice simple file includes and if you are paying attention you can do the file includes from anywhere in your web structure.

I am essentially a fairly lazy person and avoid work where I can. :) I wanted to ba able to edit things in one place as much as I possibly can so I use file includes all over my websites for things like footers and headers and stuff, but I digress. In each simple viewer gallery index.php I call the viewer-code.php which references the js and the flash objects. Works very nicely. I have done the same thing on two websites already and there will be many more I am sure.

That's pretty much what I have done, minus the php (I think). I've not worked with php... ever, haha. Thats a pretty nice concept you've got there, and the central editing sounds like a great idea. Maybe I'll look back at this sometime when I've done a bit of playing with php.

The main difference with mine I guess is the fact that I used _blanks to separate the galleries, but I think it turned out pretty well.

Re: Another multiple galleries question

Nice site.Why didn't you keep the galleries within the rest of the site? I mean opening them up in the right hand side of the page to me seems cleaner.The main reason that I used php was so that I could do file includesto make consistent changes across the whole site. standard headers and footers etc.I wsa very scared about using php at first cause I thought that it would be very very complicated and a completely new language to learn, but that is really only required when you start to do tricky active / dynamic content, like pulling info form databases etc.

If I was you I'd get firefox and the firefox addon called firebug and have a look at my sites. you will see that it is very easy to use. (umm actually cannot see the php calls from here, but if you like I can send you some of the code so that you can see how easy it is). There are also heaps of good reference sites on the www to help you work things out.