Topic: Multiple galleries in subfolders

hi there,

there is probably an answer to this somewhere but I gave up after half an hour of searching high and low.

my file hierarchy is;

section folder
>>section.html
>>images folder
>>>>gallery folder
>>>>>>gallery.xml
>>>>>>images folder
>>>>>>svcore folder
>>>>>>thumbs folder


in which files, where in those files and in what way do I need to change paths to make my galleries work? I will have several galleries under one 'section' so I want to separate them and in general learn how to have 'section.html' and gallery folders anywhere in my folder tree.

I'm using svBuilder to make the galleries and so can I set the relative location of the 'index.html' on the publish page of svb and all paths will be correct?

thanks

Peter

update: added my sv files in the folder tree above to make it clear what paths this example would need.

very greatful for an answer as soon as possible, stuck with this for now.

Last edited by mpdqx (2010-10-26 15:14:30)

Re: Multiple galleries in subfolders

If you have multiple galleries and use svBuilder to create them, then the easiest option would be to keep each gallery as a self-contained folder and display the galleries by loading them into iframes (by pointing the 'src' attribute of the iframe to the index page of the gallery in question).
See here for details: http://simpleviewer.net/simpleviewer/su … l#external

Steven Speirs
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

I'll start by better explaining my page setup.

I run a booking agency and want to use 2 different galleries on each artist's page. First one is a slideshow as a 'header' of each artist's opening page and the second is a sub page named 'gallery' with photos from gigs etc.

The artist pages load in the main content iframe which is why I want to embed the galleries. I wouldn't mind for simplicity to upload both galleries in the artist root folder but neither the xml file or the folder have a unique name so that makes it hard.

Does changing all the paths mean loads of complicated work? I would really prefer to know how to do that if possible for you to explain which files, where in those and how to change them.

Also could you post a link to an explanation of all the features in svBuilder? I found one on the site but it was a dead end.

thanks

Re: Multiple galleries in subfolders

Take the following embedding code as an example:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery1/gallery1.xml";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

In this example, you need to specify the path to the simpleviewer.js JavaScript file.
The above example is fine if the svcore folder is located in the gallery folder.  If it is not, then you need to define a variable 'svCoreURL' pointing to the svcore folder and make sure the path to simpleviewer.js is correct.  See here: http://simpleviewer.net/simpleviewer/su … tml#svcore

You might also need to point towards the XML file for the gallery to be embedded.  (Do this via a Flash variable as above.)
The XML files can be called anything you want so you could, in theory, have multiple XML files in the same folder named, for example, gallery1.xml, gallery2.xml etc.

Next, you have to ensure that the paths to the thumbs and images (thumbURL and imageURL) within the XML file are correct.  Relative paths to the thumbs and images are relative to the HTML file containing the swf file, not the XML file.

The svBuilder-Pro user guide can be found here:
http://simpleviewer.net/simpleviewer/pr … uilderpro/

A description of all the possible options can be found here:
http://simpleviewer.net/simpleviewer/pr … tions.html

Steven Speirs
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

I have tried doing the whole procedure as you recommended but it is not working so there must be more changes needed.

I dropped putting the gallery on the page I wanted it and I have used the 'index.html' generated by svBuilder to try changing folder. First I made sure the index.html displayed correctly in default location. Then I moved 'index.html' one step up, added the strings defining 'gallery.xml' location to the embed code and lastly i changed the image paths in the 'gallery.xml'. Didn't work. Then tried adding 'gallery/' to 'svcore....js' in the embed code but no luck on that either.

On the note of changing name on the xml files to 1, 2, 3 etc did not work when keeping the 'index.html' in the gallery folder. I assume I was supposed to define the new name of the xml file in the embed code using the same string as above?

flashvars.galleryURL = "gallery1.xml"


Here is my folder / files tree so could you from this structure tell me exactly what I need to change to make it work?

artist folder
>>index.html
>>gallery 1 folder
>>>>gallery.xml
>>>>images folder
>>>>svcore folder
>>>>thumbs folder


thank you

Peter

Re: Multiple galleries in subfolders

If you are moving index.html outside of the gallery folder, then the embedding code in your index.html page (with your folder structure in mind) should look something like:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL = 'gallery 1/svcore/';
</script>
<script type="text/javascript" src="gallery 1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery 1/gallery.xml";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

Super! Works! Now I understand the path structure.

thanks a lot

Peter

Re: Multiple galleries in subfolders

Ok.. I followed all these directions also, and my first gallery works fine, but the second one on a different page does not.. Here is the html I have on the first page that works:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "450", "400", "#FFFFFF" , true);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

And here is the code I have entered for the page that isn't working (the svcore folder is inside another folder):
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL = 'Print Gallery/svcore';
</script>
<script type="text/javascript" src="Print Gallery/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL ="PrintGallery/gallery.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "450", "400", "#FFFFFF" , true);
});
        </script>
            <div id="sv-container"></div>
            <!-- END SIMPLEVIEWER EMBED -->

My hierarchy is as such:

I:\Mysite(my defined site folder)\svcore - I removed the sub folder for the first gallery and transferred the inages from it to the main Images folder)

The second web gallery is located in:
I:\Mysite\PrintGallery\svcore

Can you PLEASE help me? I'm SO confused right now and going buggy... yikes

Re: Multiple galleries in subfolders

var svCoreURL = 'Print Gallery/svcore';

It looks like you should remove the space in your svCoreURL line.

var svCoreURL = 'PrintGallery/svcore';
Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

Ok.. so now I have the NONE of the galleries working *pulling hair out*
I have tried all the options posted in these forums and am at my wit's end because I need to get this site up and running so I can upload it...

This is what I have entered on a test page for the first gallery and I am getting a Gallery XML not found error..

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="WebGallery/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL="WebGallery/gallery.xml";
simpleviewer.ready(function () {
SV.simpleviewer.load("sv-container", "450", "450", "#FFFFFF" , true);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

Here's my order:
[img]http://img859.imageshack.us/img859/3959/folderic.jpg[/img]

Mysite>WebGallery>images
                              >svcore - css folder - img folder - js folder - swf folder- full.html
                              >thumbs
                              >gallery.xml
                              >index.html

Mysite>PrintGallery>images
                              >svcore - css folder - img folder - js folder - swf folder- full.html
                              >thumbs
                              >gallery.xml
                              >index.html

Can you please help? I'm REALLY confused.

Re: Multiple galleries in subfolders

Right, so the first gallery is now working again with this code:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL = 'WebGallery/svcore/';
</script>
<script type="text/javascript" src="WebGallery/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "WebGallery/gallery.xml";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "450", "400", "#FFFFFF" , true , flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

BUT the second gallery on another page is NOT working with this code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript">
var svCoreURL = 'PrintGallery/svcore/';
</script>
<script type="text/javascript" src="PrintGallery/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "PrintGallery/gallery.xml";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "450", "400", "#FFFFFF" , true , flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED --></td>


What am I not doing correctly here? My brain is spinning... hmm

Forgot to add that the second gallery is functioning, just not finding pictures, I get Xs where the pictures should be:

[img]http://img28.imageshack.us/img28/9287/printgal.jpg[/img]

Last edited by cherchmouse (2011-05-13 16:04:33)

Re: Multiple galleries in subfolders

Is the gallery online so I can take a look? If you look at the index.html in the PrintGallery folder does it work?

Mike Richards
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

No, it's not online. I wanted to make sure everything was working before I upload it to a server..
Is there some other way for me to show it to you?

When I open the index.html in PrintGallery it does work. Don't know why it's not working in the webpage...

Re: Multiple galleries in subfolders

Now I'm home and on my computer, and although the first gallery worked earlier in school, NEITHER are finding the pictures.. I've got all white Xs on both galleries, but BOTH index.html files work fine if I click on them...

???????????????????????

Clearly I have something missing in that code if it's not finding the images.. But I have NO CLUE what it is sad

Re: Multiple galleries in subfolders

It would certainly be much easier for us to determine the exact cause of your problem if you were to upload the gallery and post a URL so that we can take a look.
One of us could probably see what's going on very quickly and suggest a fix for you.
However, this FAQ might help: http://simpleviewer.net/simpleviewer/su … #trouble_2

Steven Speirs
SimpleViewer Support Team.

Re: Multiple galleries in subfolders

so I went into the gallery.xml and tried this:

<image imageURL="WebGallery/images/FS-200x200.jpg"
    thumbURL="thumbs/FS-200x200.jpg"
    linkURL="images/FS-200x200.jpg"
    linkTarget="_blank">
    <caption><![CDATA[]]></caption>
  </image>
  <image imageURL="images/FS-250x250.jpg"
    thumbURL="thumbs/FS-250x250.jpg"
    linkURL="images/FS-250x250.jpg"
    linkTarget="_blank">
    <caption><![CDATA[]]></caption>
  </image>
 
NOW the first picture shows up.. Is there a way to put that change into the xml without having to change each individual picture?

Re: Multiple galleries in subfolders

Open the XML in a text editor and use find and replace.

Find: "images/
Replace: "WebGallery/images/

Find: "thumbs/
Replace: "WebGallery/thumbs/

Mike Richards
SimpleViewer Support Team.