Topic: SMF + Tiny Portal Simpleviewer Integration

Greetings.

I am currently trying to figure out who to integrate Simpleviewer with SMF + Tiny Portal.

I am making pages/articles, and wanted to embed a Simpleviewer article in there.  I have the

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

in the <head>

And I have the

<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>

in the body of the article.

But how do I get it to load the gallery found in folder /images/nickjj?  In the nickjj folder I have all the files (images folder, thumbs folder, gallery.xml, index.html, swfobject.js, and viewer.swf)

Right now I see the loading bar, and "Gallery Not Found" on the article page.

Any and all help is greatly appreciated.

Thanks

EDIT:

For those wondering how it's done, here is everything you need to know how:

First, add

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

right before </head> in your index.template.php file of the theme you are working with.

Second, before you add,

<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>

in the article you want to embed the gallery in, find

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

and add afterwards

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

so it looks like

        var fo = new SWFObject("images/nickjj/viewer.swf", "viewer", "700", "600", "8", "#d3d7fd");
        fo.addVariable("xmlDataPath", "myGalleryFolder/gallery.xml");

Third, in your gallery.xml file, you'll need to make sure your gallery knows where the images and thumbs are.  At the end of the second line of the gallery.xml file, there is

imagePath="" thumbPath=""

change that to

imagePath="http://www.yourwebsite.com/path-to-images/images/" thumbPath="http://www.yourwebsite.com/path-to-thumbs/thumbs/"

And that should be it.

Last edited by Xtreme4U2NV (2009-11-12 04:51:11)

Re: SMF + Tiny Portal Simpleviewer Integration

I even tried editing the line in

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

to

var fo = new SWFObject("http://www.website.ca/images/nickjj/viewer.swf", "viewer", "800", "600", "8", "#181818");

but that's not working.

Re: SMF + Tiny Portal Simpleviewer Integration

Hi,

'Gallery Not Found' means the SimpleViewer SWF cannot find the 'gallery.xml' file that describes the gallery. SimpleViewer looks in the same folder as the HTML doc for the XML file. So the easiest solution is to move the gallery files into the same folder as the HTML doc that you are embedding in.

If you want your gallery files to be in a different folder than the HTML file your are embedding into, you will need to add a path to the XML file, by adding this line directly under the SWFObject line:

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

Then you will need to add paths to the images and thumbnails folders in the gallery.xml. Use the imagePath and thumbPath XML options

Felix Turner
SimpleViewer Support Team.

Re: SMF + Tiny Portal Simpleviewer Integration

Thank you kindly, giving it a try now

Re: SMF + Tiny Portal Simpleviewer Integration

Solved, please refer to edit in first post for a quick how-to