Topic: Add gallery with embed code to local html page

I have just downloaded simpleviewer and created my first gallery which works with the index file.

I tried adding the embed code to a local html page I use, so I can use this gallery on that page but there is no output/gallery displaying on the page with this!

This may possibly be a file folder location issue?

Can you please give me simple directions to use the embed code so it will work?

Look forward to helpful replies,thanks


**MY EDIT**

I have edited the path in the embed code to folder with svcore but now get message" Gallery XML not found"

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

I look forward to some help..

***MY NEXT EDIT..***

I have copied gallery xml to the folder I have my local html page in but the image links now do not work (large X's show instead...I have a screenshot but cannot see how to add images to this post!).

I will keep trying to get embed paths correct and am still looking forward to help....

****MY FURTHER NEXT EDIT****

I added images and thumbs folder to the directory with the local html file and now the embed is working except the sv-container is too small (height too small). See code below height 205px

<div id="sv-container" style="width: 100%; height: 100%;">
<div id="svcp-0-sv-mobile-flash" class="cls-mobile-flash" style="height: 205px; width: 1000px;">
<object id="svcp-0-sv-mobile-flash-swf" width="100%" height="100%" type="application/x-shockwave-flash" data="file:///C:/RHD/RHD%20General/RHD%20Photography/simpleviwer1/svcore/swf/simpleviewer.swf" style="visibility: visible; width: 1000px; height: 205px;">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="bgcolor" value="222222">
<param name="flashvars" value="embedurl=file:///C:/RHD/RHD%20General/RHD%20Photography/rpdG15CanonPowershotPhotography.html">
</object>
</div>
</div>

How has the embed set this height at 205px?
I want to increase the height of the container..how?

Again I'm grateful for advice....

*****MY UPDATED (FINAL?) EDIT*****

Well I finally found the embedding instructions at http://www.simpleviewer.net/simpleviewe … html#embed

I placed sv-container div inside a parent div at the height I want (650px) and simpleviewer is displaying..

<div id="sv-parent" style="height:650px;">
<div id="sv-container"></div>
</div>

I hope this is done (thanks for all the helpful replies..Oh-there were none..actually no replies to date.. nevermind! I hope this post may help anyone else embedding into local html files..).

Last edited by richardpd (2014-03-05 12:28:38)

Re: Add gallery with embed code to local html page

You may already have realised this but using the <object> code you posted above, the gallery will not benefit from Universal Playback (ie. the gallery will not be displayed on mobile devices or in browsers which do not have Adobe Flash Player installed and enabled).
It is necessary to use the recommended embedding code found here.

Also, if you want to set the height of the gallery to 650px, there should be no need to place the gallery inside a parent container.
Just set the height using the height Embed Code Parameter in the simpleviewer.load() line, e.g.:

simpleviewer.load("sv-container", "100%", "650px", "222222", true);

For reference, the troubleshooting FAQs can be found here.

I have edited the path in the embed code to folder with svcore but now get message" Gallery XML not found"

FAQ: When I view my gallery I see the message 'Gallery XML Not Found'. How do I fix this?

I have copied gallery xml to the folder I have my local html page in but the image links now do not work (large X's show instead.

Please see this FAQ which deals with seeing crosses where images should be.

I have a screenshot but cannot see how to add images to this post!

The forum software does not allow images to be attached to posts. If you want to show a screenshot, please upload it to a web server or file sharing service and post a link to it.

It sounds like you have solved your problem but if you continue to experience difficulties, please post the URL to your gallery so that I can take a look and help.

Steven Speirs
SimpleViewer Support Team.

Re: Add gallery with embed code to local html page

Many thanks Steven for your helpful reply. If I get further problems I'll let you know otherwise it is really just a case of using the viewer to get experience with it (I did want to move the position of the caption text but found that too tough to do!).
Best wishes... :-)

Re: Add gallery with embed code to local html page

I did want to move the position of the caption text but found that too tough to do!

I hope you have found the Caption Options which would allow you to position captions using settings such as captionPosition, captionTextAlignment, captionWidth, captionHeight and floatCaption.
If you are not able to position your captions exactly where you would like them to be using the preconfigured options, then you might like to consider using a Fixed Layout where you can give absolute fixed positions to stage elements.
For reference, you might find the SimpleViewer-Pro Layout Guide useful.

Steven Speirs
SimpleViewer Support Team.

Re: Add gallery with embed code to local html page

Hi Steven
I have tried changing the caption position myself but with no success.

I notice that with the thumbs at the left (modern theme) the caption is under the thumbs, yet with thumbs under the main image the caption is bottom overlay on the selected main image. Yet when I compare the embed codes they are the same.

I tried using captionPosition="OVERLAY_BOTTOM" in gallery.xml to change from left to overlay caption position but with no effect!
I tried adding to the embed code var params {captionPosition}; but with no success.

Can you post clear examples of gallery.xml code or index.html embed code showing the use of captionPosition, to try and make this obvious to me!? Most grateful..many thanks :-)

Last edited by richardpd (2014-03-07 09:37:17)

Re: Add gallery with embed code to local html page

Yet when I compare the embed codes they are the same.

Do you mean 'configuration options' rather than 'embed codes'? If two galleries have the same configuration options, then they should look identical.
If you find this is not the case, then please post the URLs to the galleries so that I can take a look for myself.

The captionPosition is relative to the main image.
If thumbnails and captions are both positioned in the same place (e.g. both LEFT or both TOP), then the thumbnails will appear above the captions.
Please note that when changing certain options within svBuilder-Pro, it may be necessary to click the 'Refresh' button to see an accurate portrayal of the gallery's new layout.

I tried using captionPosition="OVERLAY_BOTTOM" in gallery.xml to change from left to overlay caption position but with no effect!

When setting captionPosition="OVERLAY_BOTTOM", the caption will be visible only when the user hovers over the main image unless showOverlay="ALWAYS" (in which case the caption will always be visible) or showOverlay="NEVER" (in which case the caption will never be visible).

If there is a specific layout you are trying to achieve, please let me know and I will try to help you out.

Steven Speirs
SimpleViewer Support Team.

Re: Add gallery with embed code to local html page

It seems to me, that using captionPosition="Overlay_BOTTOM" does not work in svbuilder (it may work in svbuilderpro?) as it does not work for me using svbuilder.

Presently the nearest I can get to a design I want is with thumbs under and then I can get a caption overlay! (I do not understand why I can't get caption overlay with the thumbs to the side but that is how it is!). With this I now need to adjust the size of the main image to fit the page better...(hopefully that shouldn't be too hard..I will let you know!).

(When I said above the embed codes that did mean the configuration the embed code contained...).
Thanks again :-)

Re: Add gallery with embed code to local html page

(it may work in svbuilderpro?)

The Caption Options are available to SimpleViewer-Pro only and not to SimpleViewer-Standard, the free version.
I should have made this clear but overlooked the fact that you had posted in the SimpleViewer v2 forum. Sorry. My mistake.

With SimpleViewer-Standard and galleryStyle="MODERN", the captions will be underneath the thumbnails if thumbPosition="LEFT" or "RIGHT". If thumbPosition="TOP" or "BOTTOM", the captions will be displayed on the image overlay.
This behavior can be changed only with SimpleViewer-Pro (using either Caption Options or a Fixed Layout).

I hope this clarifies things.
Sorry for the confusion and any inconvenience caused.

Steven Speirs
SimpleViewer Support Team.