Topic: Correct paths for embedding in a Zenphoto PHP page

I can't figure out how to make Tiltviewer work within a Zenphoto page or post. I can't get correct paths.
The generated HTML page does work, but I'm trying to copy the code into a Zenphoto PHP page to use.

Folder is at \galleries\tiltviewer. In zenphoto page I have following:

<div id="flashcontent">TiltViewer requires JavaScript and the latest Flash player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">// <![CDATA[
        var fo = new SWFObject("TiltViewer.swf", "viewer", "100%", "100%", "9.0.28", "#000000");
        fo.addVariable("useFlickr", "false");
fo.addVariable("xmlURL", "/galleries/tiltviewer/gallery.xml");    
        fo.addVariable("maxJPGSize","660");

        // TILTVIEWER CONFIGURATION OPTIONS
        // To use an option, uncomment it by removing the "//" at the start of the line
        // For a description of config options, go to:
        // http://www.airtightinteractive.com/projects/tiltviewer/config_options.html
        //FLICKR GALLERY OPTIONS
        // To use images from Flickr, uncomment this block
        //fo.addVariable("useFlickr", "true");
        //fo.addVariable("user_id", "48508968@N00");
        //fo.addVariable("tags", "jump,smile");
        //fo.addVariable("tag_mode", "all");
        //fo.addVariable("showTakenByText", "true");        

        //GENERAL OPTIONS
        //fo.addVariable("showFlipButton", "true");
        //fo.addVariable("showLinkButton", "true");
        //fo.addVariable("langGoFull", "Go Fullscreen");
        //fo.addVariable("langExitFull", "Exit Fullscreen");
        //fo.addVariable("langAbout", "About");        

        fo.addVariable("useReloadButton", "false");
        fo.addVariable("columns", "2");
        fo.addVariable("rows", "2");

        fo.addVariable("frameColor",      '0xEEEEEE');
        fo.addVariable("backColor",       '0xA6A6A6');
        fo.addVariable("bkgndInnerColor", '0x999999');
        fo.addVariable("bkgndOuterColor", '0x000000');

        fo.addVariable("linkLabel", "Click to follow link");
        
        fo.addParam("allowFullScreen","true");
        fo.write("flashcontent");
// ]]></script>

In header.php I have added:

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

In test gallery.xml (located at \galleries\tiltviewer\) I have:

<?xml version="1.0" encoding="UTF-8"?>
<tiltviewergallery><photos>
<photo linkurl="/galleries/news/in-pursuit-of-the-six-spotted-tiger-beetle" imageurl="/galleries/tiltviewer/images/20080503_NIKON_D200_043.jpg" showFlipButton="true">
<title>Six-spotted Tiger Beetle</title>
<description>My wife Marcia and I were hiking at Torreya State Park near the Apalachicola River when I saw bright glints of green in bare patches of dirt on the trail. Upon closer examination, I saw that they were Six-spotted Tiger Beetles (Cicindela sexguttata). As always, I had my camera with me and I set out to photograph this beautiful metallic green beetle. Unfortunately for me, the beetles had no interest in posing for a portrait.</description>
</photo>
</photos></tiltviewergallery>

I know that I'm doing something wrong but am out of ideas.

Re: Correct paths for embedding in a Zenphoto PHP page

From what I can see here everything looks right, what is happening on the page when it is not working? Are you getting an error? Do you have a URL we could take a look at?

Mike Richards
SimpleViewer Support Team.

Re: Correct paths for embedding in a Zenphoto PHP page

In above code I did misspell the tiltviewer link but I've fixed that but still same results - nothing shows at all other than  blank area where images should appear. No errors.

Link to test page is

http://natureinfocus.com/galleries/news/the-story-behind-the-photo

Thank you.

UPDATE: I got it to work by adding full path to new SWFObject:

var fo = new SWFObject("/galleries/tiltviewer/TiltViewer.swf", "viewer", "100%", "100%", "9.0.28", "#000000");

So my next question. What is the correct way for me to tell TiltViewer to use \galleries\tiltviewer as its base path? Right now I am including full path everywhere including in the XML file.

Last edited by NaturalEnquirer (2010-11-25 19:48:58)