PDA

View Full Version : Need Help Placing SimpleViewer into HTML Code


joesp
08-01-2009, 12:19 AM
I've been reading through some old posts and came across a SimpleViewer recommendation for a gallery. So I downloaded SimpleViewer and created a gallery from Photoshop CS3. It looks great, but now I would like to place it into the mainContent div on my website, but have obiously lost something in translation. I opened up the gallery XML document that was created and copied it into my mainContent div. All I'm getting is the text, with no images. I found this site through a previous thread, and this is what I would like to accomplish in my site.

http://www.cjs-photography.co.uk/galleries/hdr/hdr.html

The following is the beginning and end of my mainContent div with the content from the SimpleViewer XML file:


<div id="mainContent"><!-- InstanceBeginEditable name="EditRegion3" -->
<h2 class="style1">Gallery of Images</h2>
<p class="style2">Visit often for updated photos as well as architectural plans and renderings of the new space as we progress.</p>
<?xml version="1.0" encoding="UTF-8" ?>
- <simpleviewerGallery maxImageWidth="500" maxImageHeight="350" textColor="0x66cccc" frameColor="0x4d4a48" frameWidth="10" stagePadding="20" navPadding="20" thumbnailColumns="2" thumbnailRows="4" navPosition="left" vAlign="top" hAlign="top" title="Flagler" enableRightClickOpen="false" backgroundImagePath="" imagePath="" thumbPath="">
- <image>
<filename>DSC00513.jpg</filename>
<caption>DSC00513.jpg</caption>
</image>

. . .

<filename>DSC00535.jpg</filename>
<caption>DSC00535.jpg</caption>
</image>
</simpleviewerGallery>
<!-- InstanceEndEditable -->
<!-- end #mainContent --></div>


What's missing or out of place? Any guidance would be appreciated.

edbr
08-01-2009, 01:03 AM
http://www.simpleviewer.net/simpleviewer/instruct.html
gives a manual. you have coped xml code into your html and that is not recognised. you will probably need javascript to use the viewer which is explained on the site

joesp
08-01-2009, 01:21 AM
Thank you. I don't know why I wasn't able to find this on their site the first time. Your suggestions were dead on.

joesp
08-01-2009, 02:23 AM
Well, it worked outside of my template, but I can't get it to work inside my .htm file created and dependent on a template. I inserted the java script into the head of the template and saved the template. Then I placed the SimpleViewer code into my editable region. I get the "SimpleViewer requires JavaScript and the Flash Player," but then nothing after I allow it to run. Any thoughts?

edbr
08-01-2009, 02:45 AM
check the path to the javascript

joesp
08-01-2009, 03:49 AM
How so? As you can tell I don't do this for a living. I'm an architect.

Am I checking it in the head or in the editable region? Does it all need to be in the same folder within the site. If so, that may be the problem. I created a separate folder for the SimpleViewer.

edbr
08-01-2009, 04:42 AM
difficult to say without the code , im just guessing its the path as this is the most common glitch.
post it here

joesp
08-01-2009, 01:00 PM
Thanks again for looking at this. I can get it to work without the template, but that defeats the point.

Here's the code code that works without the template:



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="swfobject.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>SimpleViewer Gallery</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->

. . .

<body class="oneColElsCtrHdr">
<div id="container">
<div id="header">
<div class="style3"><a href="../115Main-Concept.html">CONCEPT</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-History.html">HISTORY</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Leasing.html">LEASING INFO</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Community.html">COMMUNITY</a>&nbsp;&nbsp;&nbsp;<a href="../115 Main Gallery/115Main-Gallery.html">GALLERY</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Blog.html">BLOG</span></a></div>
</div>
<div id="mainContent"><!-- TemplateBeginEditable name="EditRegion3" -->
<h2 class="style1">H2 level heading </h2>
<p class="style2">us quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.macromedia.com/go/getflashplayer/">Get (http://www.macromedia.com/go/getflashplayer/%22%3EGet) Flash.</a></div> <script type="text/javascript"> var fo = new SWFObject("viewer.swf", "viewer", "760", "390", "8", "#181818"); fo.write("flashcontent"); </script>
<!-- TemplateEndEditable -->
<!-- end #mainContent --></div>
<!-- end #container -->
</div>
</body>
</html>



and here's the code that DOES NOT work with the template:


<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/115Main-Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<script type="text/javascript" src="../swfobject.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>115 Main - Gallery</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->

. . .

<body class="oneColElsCtrHdr">
<div id="container">
<div id="header">
<div class="style3"><a href="../115Main-Concept.html">CONCEPT</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-History.html">HISTORY</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Leasing.html">LEASING INFO</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Community.html">COMMUNITY</a>&nbsp;&nbsp;&nbsp;<a href="115Main-Gallery.html">GALLERY</a>&nbsp;&nbsp;&nbsp;<a href="../115Main-Blog.html">BLOG</span></a></div>
</div>
<div id="mainContent"><!-- InstanceBeginEditable name="EditRegion3" -->
<h2 class="style1">Gallery of Images</h2>
<p class="style2">Visit often for updated photos as well as architectural plans and renderings of the new space as we progress.</p>
<div id="flashcontent">SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.macromedia.com/go/getflashplayer/">Get (http://www.macromedia.com/go/getflashplayer/%22%3EGet) Flash.</a></div> <script type="text/javascript"> var fo = new SWFObject("viewer.swf", "viewer", "760", "390", "8", "#181818"); fo.write("flashcontent"); </script>
<!-- InstanceEndEditable -->
<!-- end #mainContent --></div>
<!-- end #container -->
</div>
</body>
<!-- InstanceEnd --></html>

joesp
08-04-2009, 01:58 PM
Any thoughts?

domedia
08-04-2009, 03:13 PM
As you can see from the the two files, they use two different paths to the JavaScript file. Third line in both documents.