Topic: Creating Multiple Flickr Sets or Tags galleries on one page

I purchased the pro version and am trying to customize it so I can have multiple flickr galleries (could be a mix of sets or tags) displayed on one page. The galleries won't have thumbnails, i'm using the compact version and would just display the image and I plan to have probably two rows with three columns.

I've looked through the documentation and it said to create a unique sv-container id for each gallery and read here to give each gallery it's own folder (http://www.simpleviewer.net/forum/viewt … p?id=11132).

It seems that the gallery.xml file needs to be duplicated or an instance of it created since it has config options that are specific to one flickr set. Just wondering how I'd duplicate the gallery (which I haven't been successful with) or do I create a new gallery.xml file, give it a new name and somehow reference that?

A bit confused... Any help would be appreciated.

Thanks!
Ken

Re: Creating Multiple Flickr Sets or Tags galleries on one page

For each gallery, create a unique xml file. You could call them gallery1.xml, gallery2.xml etc. You can then refer to the xml file for each gallery using the galleryURL flash variable, eg.

<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery1.xml";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
Steven Speirs
SimpleViewer Support Team.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

Use galleryURL parameter to tell the swf which XML to load.

<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "thefilename.xml";
var params = {};
var attributes = {};
attributes.id = "svInstance";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars, params, attributes);
});
</script>

http://www.simpleviewer.net/simpleviewe … tml#params

Mike Richards
SimpleViewer Support Team.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

Thanks guys, I've created two xml files with two different flickr set ID's. Then in the index.html file, this is what I have but when I preview, it'ss only showing the first gallery.

<!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    var flashvars = {};
    flashvars.galleryURL = "advertisements.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('advertisements', '284', '142', 'FFFFFF',true, flashvars);
    });
    </script>
    <script type="text/javascript">
    var flashvars = {};
    flashvars.galleryURL = "petitiondeliveries.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('petitiondeliveries', '284', '142', 'FFFFFF',true, flashvars);
    });
    </script>   
    <div id="advertisements"></div>
    <div id="petitiondeliveries"></div>
    <!--END SIMPLEVIEWER EMBED -->

For some reason, that's not working.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

I've actually got two galleries showing, but for some reason it's only showing the same one twice. Here's the code for that.

<!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    var flashvars = {};
    var params = {};
    var attributes = {};
    attributes.id = "svInstance";
    flashvars.galleryURL = "advertisements.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('advertisements', '284', '142', 'FFFFFF',true, flashvars, params, attributes);
    });
    </script>
    <script type="text/javascript">
    var flashvars = {};
    var params = {};
    var attributes = {};
    attributes.id = "svInstance";
    flashvars.galleryURL = "petitiondeliveries.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('petitiondeliveries', '284', '142', 'FFFFFF',true, flashvars, params, attributes);
    });
    </script>   
    <div id="advertisements"></div>
    <div id="petitiondeliveries"></div>
    <!--END SIMPLEVIEWER EMBED -->

Definitely getting closer. If anyone could point me in the right direction, it would be so very appreciated. Thanks!

Re: Creating Multiple Flickr Sets or Tags galleries on one page

There is, indeed, a problem with v2.1 when embedding multiple galleries on one HTML page.
This bug has been reported. Thanks.

Steven Speirs
SimpleViewer Support Team.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

Thanks Steven,
Do you know of any workarounds? I read something about using iFrames?

Re: Creating Multiple Flickr Sets or Tags galleries on one page

Until a bugfix version is released, you could, indeed, use iframes.

Each gallery should be self-contained in a separate folder (like the 'web' folder in the download package).
You can then load the index.html file from each gallery into a separate iframe like so:

<iframe src="mygalleryfolder/index.html" width="800" height="600" frameborder="0" scrolling="no"></iframe>
Steven Speirs
SimpleViewer Support Team.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

Thanks Steven and Mike for the help on this. I'm a bit bummed that this functionality isn't available, but look forward to seeing it in future releases. The iFrame method, although a bit clunky did work. Having so many directories of the same files doesn't seem like the best solution, but it works.

Re: Creating Multiple Flickr Sets or Tags galleries on one page

yippa,
I believe this functionality is supported, you just need to make the flashvars parameter unique to the page.

    <script type="text/javascript">
    var flashvars_advertisements = {};
    flashvars_advertisements.galleryURL = "advertisements.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('advertisements', '284', '142', 'FFFFFF',true, flashvars_advertisements);
    });
    </script>

    <script type="text/javascript">
    var flashvars_petitiondeliveries = {};
    flashvars_petitiondeliveries.galleryURL = "petitiondeliveries.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('petitiondeliveries', '284', '142', 'FFFFFF',true, flashvars_petitiondeliveries);
    });
    </script>

Re: Creating Multiple Flickr Sets or Tags galleries on one page

vojtechm wrote:

yippa,
I believe this functionality is supported, you just need to make the flashvars parameter unique to the page.

    <script type="text/javascript">
    var flashvars_advertisements = {};
    flashvars_advertisements.galleryURL = "advertisements.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('advertisements', '284', '142', 'FFFFFF',true, flashvars_advertisements);
    });
    </script>

    <script type="text/javascript">
    var flashvars_petitiondeliveries = {};
    flashvars_petitiondeliveries.galleryURL = "petitiondeliveries.xml";
    $(document).ready(function () {
        SV.simpleviewer.load('petitiondeliveries', '284', '142', 'FFFFFF',true, flashvars_petitiondeliveries);
    });
    </script>

Thanks SOOO much!  This works!  I was scratching my head on this one. smile