SimpleViewer


SimpleViewer
A flash based image gallery

Attach:viewer.swf

http://www.airtightinteractive.com/simpleviewer/


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:

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

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

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:
imagePath="http://www.mywebsite/mygallery/images/" 
thumbPath="http://www.mywebsite/mygallery/thumbs/"
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" 
FlashVars="xmlDataPath=http://www.mywebsite/mygallery/gallery.xml" 
bgcolor=#000000 WIDTH=420 HEIGHT=520 
TYPE="application/x-shockwave-flash"></embed>  

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.01 config end
 2: 00.21 00.20 MarkupToHTML begin
 3: 00.22 00.21 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 4: 00.22 00.22 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 5: 00.34 00.32 MarkupToHTML end
 6: 00.34 00.32 MarkupToHTML begin
 7: 00.35 00.33 MarkupToHTML end
 8: 00.35 00.33 MarkupToHTML begin
 9: 00.36 00.34 MarkupToHTML end
10: 00.36 00.34 now
Peak memory: 3,690,216 bytes