A flash based image gallery


The problem with getting SimpleViewer is that it requires additional files and expects to find everything in, or under, the current directory. For example, if the viewer.swf, gallery.xml, swfobject.js and subdirectories (images and thumbs) are all located in the same directory, then an html file that is located in that same directory can contain the following:

<script type="text/javascript" src="swfobject.js"></script>
	<div id="flashcontent">SimpleViewer requires Macromedia Flash. 
       <a href="">
       Get Macromedia Flash.</a> If you have Flash installed, 
       <a href="index.html?detectflash=false">click to view gallery</a>.

	<script type="text/javascript">
		var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#181818");	
		fo.addVariable("preloaderColor", "0xffffff");
		fo.addVariable("xmlDataPath", "gallery.xml");	

In PmWiki, uploading everything as attachments will put the files in the same locations, but that location (/uploads/$Group) is not the same as the location where the current page is rendered. Even if that were solved, the xml file and image and thumbs directories would need to be uploaded, which the core attachment feature does not support.

For SimpleViewer to be run remotely, absolute urls need to be specified in the embed portion of the html, in the gallery.xml file, as detailed below:

25: Can I add a SimpleViewer gallery to a MySpace? page?

Yes. [(approve links) edit diff]. To add a gallery to a MySpace? page, do the following:

First, you will need to host your gallery files (including images) on a webserver somewhere (in this example: [(approve links) edit diff]).

In your gallery.xml file, specify absolute URLs? to your image and thumbnails folders. For example:
Add the following code to your myspace page. Enter the URLS to your viewer.swf and gallery.xml files:
<embed src="http://www.mywebsite/mygallery/viewer.swf" 
bgcolor=#000000 WIDTH=420 HEIGHT=520 

Even with all that, when I tried to test SimpleViewer with my remote files [(approve links) edit diff] it didn't work. Pico August 30, 2006, at 01:46 AM

 0: 00.00 00.00 config start
 1: 00.01 00.00 config end
 2: 00.05 00.02 MarkupToHTML begin
 3: 00.07 00.03 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.08 00.03 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.34 00.16 MarkupToHTML end
 6: 00.35 00.16 MarkupToHTML begin
 7: 00.37 00.17 MarkupToHTML end
 8: 00.38 00.18 MarkupToHTML begin
 9: 00.38 00.18 MarkupToHTML end
10: 00.39 00.18 now
Peak memory: 3,085,552 bytes