Topic: AV Gallery and PHP Include

Hello All,

I have a "news" page that displays the press releases for a high school district I work for. I want to be able to have a slideshow for these stories embedded in the page.

I have an HTML page in my g1 folder that works great. It has the slideshow embedded exactly how I want it. Now I just need to figure out how to include that HTML page in the PHP page and get it to work.

A little backside, my news stories are all stored in a MSSQL database, and the PHP page stays the same for all the stories, the MSSQL id just changes to reflect whatever story the viewer wants to see.

I have it working where it links to the index.html file in the g1 folder. Except all I get is a black box with no photos showing. I think I'm having an issue with the swfobject.js

Any thoughts?

Thanks!

Re: AV Gallery and PHP Include

Please post a URL to your gallery so that we can take a look.

Steven Speirs
SimpleViewer Support Team.

Re: AV Gallery and PHP Include

My index.html page that works is:
http://www.lw210.org/svm/g1/index.html

The page I'm trying to put it in is:
http://www.lw210.org/news/stories2.php?id=448

It's a test page right now, so no one will see that without the direct link.

Re: AV Gallery and PHP Include

Your embedding code in 'stories2.php' expects both the 'swfobject.js' and 'autoviewer.swf' files to be in the same folder as the 'stories2.php' page (ie. http://www.lw210.org/news/) but they are currently located in http://www.lw210.org/svm/g1/
You could either:

(1) Change your embedding code to:

<script type="text/javascript" src="../svm/g1/swfobject.js"></script>
<div id="flashcontent">AutoViewer 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("../svm/g1/autoviewer.swf", "viewer", "400", "300", "8", "#181818");
fo.write("flashcontent"); 
</script>

However, if you do this, then the paths to the images in the gallery's XML file will also need to be changed.
The paths are currently relative (to http://www.lw210.org/svm/g1/index.php) but in order for the images to be displayed, the paths need to be either:
(a) relative to the HTML page into which AutoViewer is embedded (ie. http://www.lw210.org/news/stories2.php)
eg. <url>../svm/g1/images/image_name.JPG</url>
... or:
(b) absolute
eg. <url>http://www.lw210.org/svm/g1/images/image_name.JPG</url>
When using svManager to create your gallery, you can choose to have the paths to the images saved as absolute URLs by going to 'Customize -> Advanced settings' and choosing 'Save paths as' ABSOLUTE or HTTP (either should work in your case).

... or:

(2) Embed the gallery using an <iframe> instead, eg:

<iframe src="../svm/g1/index.php" width="400" height="300" frameborder="0" scrolling="no"></iframe>
Steven Speirs
SimpleViewer Support Team.