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.