Topic: Embedding Simpleviewer

I purchased sv pro over a year ago and I've tried to make sense of it a few times, without any success. I'm gritting my teeth again and trying to stay sane as I give it another stab.
All I want to do is embed it on an existing page on my website and now I'm even not too bothered about customising it.  Every time I try, I copy the entire contents of the gallery to my web folder and the html script to where I want it placed, and upload it to my server. Every time I get the same message "SimpleViewer requires JavaScript and the Flash Player. Get Flash." I've got flash -what am I doing wrong?
sad

Re: Embedding Simpleviewer

Please post a URL to your site in order for someone to help you further.

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

I'm gritting my teeth again and trying to stay sane as I give it another stab.

come on - it's not that bad is it? wink

Did you check here: http://www.simpleviewer.net/simpleviewe … /embedded/ ?

Felix Turner
SimpleViewer Support Team.

Re: Embedding Simpleviewer

It's called exaggeration

Re: Embedding Simpleviewer

I've followed the procedure and created a new page http://www.racing-images.co.uk/homepage.asp. I'm obviously missing something but I still can't see what I'm doing wrong - any help would be appreciated  neutral

Re: Embedding Simpleviewer

The line:

<script type="text/javascript" src="swfobject.js"></script>

... should be in the <head> section rather than the <body> section.  This implies that the file should be located at http://www.racing-images.co.uk/swfojbect.js but the file does not exist there.
The embed code is looking for the viewer.swf at http://www.racing-images.co.uk/viewer.swf but it does not exists there.
There is no xmlDataPath specified so SimpleViewer will default to looking for 'gallery.xml' in the current directory but http://www.racing-images.co.uk/gallery.xml does not exist either.
I've tried looking for these files in various subfolders ('web', 'simpleviewer', 'gallery') but cannot find any of them.
Where are all your files?

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

I copied and pasted the contents of my gallery folder, called best_sellers,  into the root folder of my website - then created the new page and copied the html script in there. I then uploaded this to the server.

Re: Embedding Simpleviewer

OK, then in http://www.racing-images.co.uk/homepage.asp you'll need to add:

fo.addVariable("xmlDataPath", "best_sellers/gallery.xml");

Also, change:

var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#181818");

... to:

var fo = new SWFObject("best_sellers/viewer.swf", "viewer", "800", "600", "8", "#181818");

I still can't find swfobject.js anywhere.  Upload it to the root folder and the existing code will work (as long as you have moved the reference from the <body> to the <head> as in my last post).
The thumb and image paths will need to be changed in http://www.racing-images.co.uk/best_sellers/gallery.xml to:

thumbPath="best_sellers/thumbnails/" imagePath="best_sellers/images/"
Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

If I add the script in the head section it just appears above the logo at the very top of the page. I want it embedded within the page.
I've scrapped the original gallery and created another one from scratch and added all its contents to my root folder. Can you just tell me what I have to amend in the script to point it to the new gallery and how I can get the gallery to appear on the page itself?

Re: Embedding Simpleviewer

dessie1 wrote:

If I add the script in the head section it just appears above the logo at the very top of the page.

It sounds like you moved the <div id="flashcontent"></div> along with the script.  Leaving the <div> in the place you wanted the gallery to appear and changing the path names as in my post above would have worked.

Now that you are onto Plan B...
If viewer.swf, gallery.xml and swfobject.js are all in the root alongside homepage.asp, then:

<script type="text/javascript" src="swfobject.js"></script>

... and:

var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#181818");

... both point to the files in their correct locations.

fo.addVariable("xmlDataPath", "gallery.xml");

... is not necessary as gallery.xml is the default for xmlDataPath if this line is not included.
You'll still need to check the imagePath and thumbPath in the 'gallery.xml' file.

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

It says :-

Copy and paste this code block where you want SimpleViewer to appear:
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");   
</script>

Are you now saying I don't copy and paste this whole block onto the homepage.asp?

Re: Embedding Simpleviewer

It's safe enough to keep the whole thing together.
Traditionally, I put all JavaScript references, such as:

<script type="text/javascript" src="swfobject.js"></script>

... in the <head> section.

The important part is to place the <div>:

<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player.
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>

... correctly in the HTML file where you want the gallery to appear.

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

I realise you're still working on your gallery but I've noticed that you have a standalone gallery in .../best_sellers/ which would work fine if you made a change to your .../best_sellers/gallery.xml file.
Change:

thumbPath="best_sellers/thumbnails/" imagePath="best_sellers/images/"" imagePath=""

... to

thumbPath="thumbnails/" imagePath="images/"

... ie. remove the extra " and the empty imagePath reference and rename the thumbPath and imagePath so that the paths are relative to the HTML file, in this case http://www.racing-images.co.uk/best_sellers/index.html
Make the change, click on the link above and your best_sellers gallery should work.  It won't be integrated into your homepage yet but at least you'll have a working gallery.  It's a start!

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

I can now view my new rough test gallery http://racing-images.co.uk/sandown/viewer.swf but could you please run through how I can display this on the homepage.asp so it stands alone under the text? I have added the code block to homepage.asp, but still all I get is the same message

Re: Embedding Simpleviewer

In http://www.racing-images.co.uk/homepage.asp change:

<script type="text/javascript" src="swfobject.js"></script>

.. to:

<script type="text/javascript" src="sandown/swfobject.js"></script>

Your embed script should be:

<script type="text/javascript">
var fo = new SWFObject("sandown/viewer.swf", "viewer", "800", "600", "8", "#181818");
fo.addVariable("xmlDataPath", "sandown/gallery.xml");
fo.write("flashcontent");    
</script>

The paths in http://www.racing-images.co.uk/sandown/gallery.xml should be:

thumbPath="sandown/thumbnails/" imagePath="sandown/images"

Edit:
An alternative solution, being that you already have a working gallery, would be to load the gallery into an iframe.
For this, you could remove:

<script type="text/javascript" src="swfobject.js"></script>

.. from http://www.racing-images.co.uk/homepage.asp and replace:

<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. 
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>
<script type="text/javascript">
var fo = new SWFObject("sandown/viewer.swf", "viewer", "800", "600", "8", "#181818");
fo.write("flashcontent");    
</script>

... with:

<iframe src="sandown/index.html" frameborder="0" width="800" height="600"></iframe>

... and leave the paths in http://www.racing-images.co.uk/sandown/gallery.xml alone.

Last edited by Steven Speirs (2009-12-13 12:08:02)

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

I've done that but nothing shows up on the page

Re: Embedding Simpleviewer

You've removed:

<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. 
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>

Reinstate it just above:

<script type="text/javascript">
var fo = new SWFObject("sandown/viewer.swf", "viewer", "800", "600", "8", "#181818");
fo.addVariable("xmlDataPath", "sandown/gallery.xml");
fo.write("flashcontent");    
</script>
Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

thanks - getting there slowly but no main image showing up

Re: Embedding Simpleviewer

You need a trailing slash in your imagePath in http://www.racing-images.co.uk/sandown/gallery.xml ie:

imagePath="sandown/images/"

Also, to make the background white, use:

var fo = new SWFObject("sandown/viewer.swf", "viewer", "800", "600", "8", "#ffffff");
Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

That's great - many thanks for all your help!

Re: Embedding Simpleviewer

Now that the background is white, you'll probably want to change the frameColor in the xml file so that the frames and navigation arrows show up.  Try frameColor="0x181818"

Steven Speirs
SimpleViewer Support Team.

Re: Embedding Simpleviewer

Perfect! This was just a test, but I think I can manage the real thing now thanks

Re: Embedding Simpleviewer

Hello again! I've tried putting another gallery on a different website but, for some reason, it insists on perching above the logo. Could you please tell me what I'm doing wrong?

Re: Embedding Simpleviewer

Sorry - forgot the link http://libraimages.co.uk/pictures.htm

Re: Embedding Simpleviewer

You need to place the following code:

<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. 
<a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a></div>

... in your html page where you want the gallery to be displayed.  At the moment it is the first thing immediately after the opening <body> tag which is why it appears above everything else on the page.

Steven Speirs
SimpleViewer Support Team.