Topic: Global gallery settings option

Global gallery settings option

It would be very convenient to be able to specify gallery configuration separate from image specification.

If a website that may grow to include 100’s of small galleries over time, were to pull their configuration settings from one global file, instead of one for each,  it would serve at least 2 purposes.

1.    Obviously, you would only need to set up the configuration 1  time. (currently, this can kind of be done with SV-Builder presets).

2.    More importantly, if all the galleries were using a global file, it would be dead simple to change the values on all galleries at once. (Did someone say “Cascading Configuration Settings”?)

Thanks

Re: Global gallery settings option

@Dave Pitman

As well as using Presets in svBuilder-Pro, you can have many galleries use common layout settings by pointing each of your galleries to the same preset XML file via the Pro Option presetURL. Image data for each gallery will still be handled by the gallery's own 'gallery.xml' file though the layout settings in each 'gallery.xml' file will be ignored and those in the 'preset.xml' file will be used instead.
Please see here for further details.

Steven Speirs
SimpleViewer Support Team.

Re: Global gallery settings option

Perfect. I looked through the docs, but not comprehensively enough.

I am having difficulty implementing though.

I have added to embedding code:

flashvars.presetURL = "/galleries/global/preset.xml";

And added the file "preset.xml" that I fetched out of "C:\Users\AppData\Roaming\svBuilder-Pro\Local Store\2.3.0\presets" to the location specified in path above. (I didn't see any way to get the file out of SV-Builder in the documentation.)

Reload the gallery, and get the error "preset gallery xml not found"

I can type the path to preset.xml  directly and navigate to the file.

Re: Global gallery settings option

Please post the URL to your gallery so that I can take a look.

Steven Speirs
SimpleViewer Support Team.

Re: Global gallery settings option

Hi Steven,

I tried an absolute url in place of the relative url, and sv found the file.

What is curious to me about this is that the baseURL flashvars uses a similar relative url:

flashvars.baseURL = "/galleries/2012-02-26/";

and works just fine.

Using basically the same relative path does not work for:

flashvars.presetURL = "/galleries/global/preset.xml";

and must be changed to:

flashvars.presetURL = "http://www.domain.com/galleries/global/preset.xml";

I left the test page up, with the non-working relative url in case you want to have a look. If you have a guess why one works and the other does not, I would be interested in hearing it. The only difference I can see, is that one is pointing to a file, and one to a folder.

[link removed, no longer exists]

And, as always, thank you for your attention.

Last edited by Dave Pitman (2012-04-10 03:04:12)

Re: Global gallery settings option

When using a baseURL, all other relative URLs (such as the presetURL) will be relative to the baseURL.
It looks like because your presetURL is not absolute, SimpleViewer treats it as a relative URL, tagging it onto the end of the baseURL (resulting in the error).
Using the following should work:

flashvars.baseURL = "/galleries/2012-02-26/";
flashvars.presetURL = "../global/preset.xml";

It would appear that a galleryURL or presetURL starting with a '/' (to denote the root of your web domain) does not work in conjunction with a baseURL. I will log a bug report. Thank you for bringing this to my attention.

[Thread moved.]

Steven Speirs
SimpleViewer Support Team.

Re: Global gallery settings option

Thanks,

Using an absolute path is ok; understanding why it is necessary is good.

As an aside, I wanted to mention that using the presetURL for setting options in combination with Paul van Roekel's gallery.php works equally well, and eliminates the need to rewrite the options in the format within the gallery.php file; Win-win.