Topic: Can't get SimpleViewer Gallery to embed in website page

I am trying to embed SimpleViewer Gallery (v 2.3.1) into a web page (building my website with Mrsite.co.uk) I followed the instructions in SimpleViewer help about how to embed the gallery into a HTML page - in SVBuilder I went to the publish panel and copied the provided embed code. I then pasted this into my web page. Nothing happened! The only thing that I can think went wrong was not understanding the first line of the embed instructions - it told me to copy the entire contents of my SimpleViewer Gallery into the folder containing my HTML page. I didn't do this as I don't understand how to do it - apologies for the incompetence, but this is all new to me...
If anyone can help I would greatly appreciate it. Many thanks in advance.

Re: Can't get SimpleViewer Gallery to embed in website page

In order to embed a SimpleViewer gallery in a web page you will need to be able to do the following:
(1) Upload your gallery files to a web server.
(2) Insert embedding code into your web page.

Uploading your gallery files to a web server is usually done with a FTP program such as Filezilla.
Please see the folowing MrSite help page for further details:
What is FTP and how do I use it?

I would recommend uploading your entire gallery folder (not just the contents) to your web server and following the baseURL method of embedding documented here. In doing so, it does not matter where the gallery folder is uploaded to on your web server as long as you know where it is.

In order to embed the gallery in your web page, copy and paste the baseURL embedding code (changing the two paths within it as appropriate) following the instructions in the following MrSite help page:
Putting HTML code onto my website

Steven Speirs
SimpleViewer Support Team.

Re: Can't get SimpleViewer Gallery to embed in website page

Hi Steven,

Many thanks for your help.
I did everything that you instructed but the message "gallery xml not found" came up when I copied the code into my web page.
I successfully used FTP & transferred my entire gallery folder (called Haygrove) into the root folder of my website.
I then went to my web page at MrSite and copied the code below into the page.

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http://www.rupertmardon.co.uk/Haygrove/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">// <![CDATA[
var flashvars = {};
flashvars.baseURL = "http://www.158069.root.com/Haygrove/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
// ]]></script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->


After I had done this, the "gallery xml not found" came up on the screen. As you can see, the 2 paths have been changed - the first one to www.rupertmardon.co.uk/Haygrove & the second one to www.158069.root.com/Haygrove

Maybe this is where the problems lies - these are the 2 paths that the helpline at MrSite told me to use.

Sorry to ask for your help once again - hopefully you can help me to resolve this problem.

Many thanks,

Rupert

Re: Can't get SimpleViewer Gallery to embed in website page

Try replacing:

flashvars.baseURL = "http://www.158069.root.com/Haygrove/";

... with:

flashvars.baseURL = "http://www.rupertmardon.co.uk/Haygrove/";
Steven Speirs
SimpleViewer Support Team.

Re: Can't get SimpleViewer Gallery to embed in website page

Hi Steven,

Thanks for your reply.

I just tried this and it almost seemed to work.

Hard to describe - there is now a very thin black strip going across the page and and you briefly see a loading bar going from left to right in the middle of this (when the web page first opens) as though a gallery was trying to open. You can just make out the white simpleviewer text in the top right of the thin black strip - if you click on it it takes you to the simpleviewer website. (if you go to www.rupertmardon.co.uk and then click on the "schools" page on the menu bar you will see what I mean)

Do you think there is a problem with the file transfer - maybe I didn't transfer the correct folder so it can't find it?

Sorry that this is going on a bit.

Many thanks,

Rupert

Last edited by Mardon (2012-12-19 12:12:49)

Re: Can't get SimpleViewer Gallery to embed in website page

It look like your gallery files have been uploaded successfully.
As your gallery's height has been defined as a percentage, make sure that all parent containers of the gallery (up to and including the 'body' and 'html' tags) have been given heights via CSS. (When using a percentage height, SimpleViewer needs to know what it is a percentage of.) Also, please see the Using Percentage Heights note in the 'Embedding into a HTML Page' section.

Alternatively, a quick fix might be to define your gallery's height as an absolute pixel value instead of as a percentage, e.g.:

simpleviewer.load("sv-container", "100%", "600", "222222", true, flashvars);
Steven Speirs
SimpleViewer Support Team.

Re: Can't get SimpleViewer Gallery to embed in website page

Hi Steven,

Success! Can't thank you enough for all your help.

One last thing though (sorry!) - I have created 2 galleries so far and they were made with the photos being viewed on a white background. What I don't understand is that they have appeared on my web pages with a black background. Is this something to do with me not ticking the "transparent" box when customizing the galleries? It would be great if you can solve this problem too as the rest of my website is very white and minimal looking and the black doesn't look right!
(I have just sorted one problem out having read the help section - I swapped the "222222" for "transparent" and that has made the background white when you open the web page. I still have a problem when I click the full screen icon - the background reverts back to black once again - is it possible to still have a transparent background?)

Sorry to ask for your help again!

Many thanks,

Rupert

P.S. I have just purchased the latest pro version of simpleviewer - I am assuming that whatever advice you give me will be the same for this.

Last edited by Mardon (2012-12-20 15:58:27)

Re: Can't get SimpleViewer Gallery to embed in website page

It is not possible to have a transparent background in fullscreen mode (as the gallery covers more than just the browser window).
You can have a white background in both normal and fullscreen modes by choosing a background color of #ffffff (white) and deselecting the 'Background Transparent' checkbox. The simpleviewer.load() line in your embedding code would look like this:

simpleviewer.load('sv-container', '100%', '100%', 'ffffff', true);

Alternatively, you could have a transparent background in normal mode and a white background in fullscreen mode by selecting the 'Background Transparent' checkbox and then manually introducing the bgcolor Flash param as an Embed Code Parameter as follows:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var params={};
params.bgcolor="#ffffff";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "transparent", true, null, params);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

P.S. I have just purchased the latest pro version of simpleviewer - I am assuming that whatever advice you give me will be the same for this.

Yes. Everything above applies equally to both SimpleViewer-Standard (the free version) and SimpleViewer-Pro.

Steven Speirs
SimpleViewer Support Team.

Re: Can't get SimpleViewer Gallery to embed in website page

Brilliant - it has all come together now!

I am very grateful for all your help Steven.

Many thanks and have a good Christmas.

Rupert.