Topic: How would I include the TiltViewer in my Silex web site

Hi

I have created a web site in Silex. I would like to integrate this TiltViewer Gallery in my Silex created web site.

Please provide some help in integrating this Gallery into my Silex created web site.

Thanks
Pankaj

Re: How would I include the TiltViewer in my Silex web site

I am not familiar with Silex.
However, the 'TiltViewer Embedding Guide' (which explains how to embed a TiltViewer gallery into an HTML page) can be found here.

An alternative solution would be to find a suitable host for your TiltViewer gallery (either a regular web host or a file sharing service such as Dropbox).
You would then upload the entire gallery folder to your web server of choice and then embed the gallery in a page using an <iframe> such as:

<iframe src="http://www.example.com/gallery/index.html" width="800" height="600" frameborder="0" scrolling="no"></iframe>

... ensuring that the 'src' attribute of the <iframe> points towards the 'index.html' file within your gallery folder.

Steven Speirs
SimpleViewer Support Team.

Re: How would I include the TiltViewer in my Silex web site

Hi Steven

Thanks for the reply. I included TiltViewer as an iFrame in my Silex web site. I made some changes in the gallery.xml file and index.html file. Following are the changes made in the index.html file:

</style>
</head>
<body>
    <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">

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

// XML GALLERY OPTIONS
        // To use local images defined in an XML document, use this block
        //fo.addVariable("useFlickr", "false");
        fo.addVariable("xmlURL", "gallery.xml");
        fo.addVariable("maxJPGSize","600");

        //GENERAL OPTIONS
        //fo.addVariable("useReloadButton", "false");
        fo.addVariable("columns", "4");
        fo.addVariable("rows", "4");

// END TILTVIEWER CONFIGURATION OPTIONS

        fo.addParam("allowFullScreen","true");
        fo.write("flashcontent");
    </script>
</body>
</html>

changes made in the gallery.xml file
==========================

<tiltviewergallery>
    <photos>
        <photo imageurl="media/Pratrive_Artwork/thumb/DSC_5790.jpg" linkurl="media/Pratrive_Artwork/full-sized/DSC_5790.jpg">

        </photo>
       
        <photo imageurl="media/Pratrive_Artwork/thumb/DSC_5793.jpg" linkurl="media/Pratrive_Artwork/full-sized/DSC_5793.jpg">

        </photo>

</photos>
</tiltviewergallery>


The issue now is that when I load my web page including the iFrame, the gallery pictures does not come from the imageurl included in the gallery.xml file which is defined as "media/Pratrive_Artwork/thumb/" and it shows some random pictures (I guess it is fetching pics somewhere from the internet)

why the gallery is not displaying images from the path defined in the gallery.xml file instead of fetching it from the internet?

Thanks
Pankaj

Re: How would I include the TiltViewer in my Silex web site

Currently, your gallery is sourced by public Flickr images.
You will need to remove the leading // from the line: //fo.addVariable("useFlickr", "false"); so that it reads:

fo.addVariable("useFlickr", "false");

The // tells the browser that the line is a comment and is to be ignored when the page is being parsed.
The default value for the useFlickr configuration option is 'true' (as seen here in the 'TiltViewer Configuration Options' page) so you must set it to 'false' for the gallery to use an XML file.

Steven Speirs
SimpleViewer Support Team.

Re: How would I include the TiltViewer in my Silex web site

Hi Steven

After doing changes in the index.html, the image tiles do show for a second but vanishes when the page loads completely. I did the following change in index.html file:

fo.addVariable("useFlickr", "false");

Images that are in my gallery have dimension as 154x109 and I have made maxJPGSize as 200 in index.html file.

Thanks
Pankaj

Re: How would I include the TiltViewer in my Silex web site

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

Steven Speirs
SimpleViewer Support Team.

Re: How would I include the TiltViewer in my Silex web site

Hi Steven

Thanks a lot for your help. There was a typo in the imageurl inside index.html and it worked after correcting it.

Regards
Pankaj