1 (edited by douginsb 2015-01-15 21:53:30)

Topic: Embedding the stage in a php wrapper

Hi--I am trying to use the embed code I generated for SV Pro 2 in a PHP page but there is something off with the height/width in such a way that all i get is a blank page.

I generated the code in fixed width/height values using the application but in the actual embed code it generated the size is set to 100% height and 100% width, so I am wondering if I should set it to something else.

The page is here: missionbluedesign.com/projects2

The older version simple viewer works fine on this page: www.missionbluedesign/com/projects

Thanks for your help with this as I broke the first projects gallery and am scrambling to get this going.

Doug Ellis

Re: Embedding the stage in a php wrapper

Your problem is almost certainly with setting your gallery's height to 100%.
The following FAQ explains the problem. (Your gallery displays fine in IE11 but not in Firefox 35.0.)
My gallery does not show in Firefox or gets cropped to a small height. Why?

When you set a gallery's height as a percentage, you must ensure that all the gallery's parent containers have heights specified via CSS, otherwise SimpleViewer will not be able to calculate its actual height. For example, when setting a gallery's height as 100%, SimpleViewer needs to know what its height should be 100% of.

Please see the note regarding 'Using Percentage Heights' in the Embedding into a HTML Page support section.

A quick fix would be to set your gallery's height to be a fixed pixel value rather than a percentage (changing the height Embed Code Parameter value).

Try changing your gallery's simpleviewer.load() line from:

simpleviewer.load("sv-container", "100%", "100%", "FFFFFF", true, null, null, null, false);

... to something like the following:

simpleviewer.load("sv-container", "100%", "600px", "FFFFFF", true, null, null, null, false);

This should solve your problem.

If you set the gallery's height in svBuilder-Pro (in the 'Customize -> Embed Options' section) to something like '600' or '600px' (either will work fine), then this height should be used in the Embed Code on the 'Publish' tab and in the embedding code within the gallery's 'index.html' file.

Steven Speirs
SimpleViewer Support Team

Re: Embedding the stage in a php wrapper

Thanks Steven--this helped a lot..it is getting closer. When I preview the HTML version after generating the gallery it looks great...but when I publish it to the site in the php page, some of the image links are breaking..

Not sure why--do I need to edit something in the gallery.xml manually?

This is what I have so far: www.missionbluedesign.com/projects3

Definitely progress..and very close!

Doug E

Re: Embedding the stage in a php wrapper

It looks like you may already have solved your problem.
I have just viewed your gallery and all your thumbnails and main images seem to display OK.
If you do not see this, then please try clearing your browser's cache to ensure that your browser is fetching and using the most recent versions of your gallery files.

For reference (and others experiencing similar symptoms), this FAQ may help:
My images show locally, but not when I upload them to my webserver. What are possible problems?

Also, please double-check the permissions of your gallery files and folders on your web server. Default permissions of 644 for files and 755 for folders should work fine.

Steven Speirs
SimpleViewer Support Team