Code for Embedding TiltViewer example page

Home | Instructions | Source code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <?php
      /*
      This block of php code allows svManager to set the background color and page title.
      */
      error_reporting(0);
      $preferences = file_get_contents('preferences.txt');
      $preferences = unserialize($preferences);
      $title = htmlspecialchars($preferences['htmlTitle'], ENT_QUOTES, 'UTF-8');
      $backgroundColor = substr($preferences['backgroundColor'], 2, strlen($preferences['backgroundColor']) - 2);
      /* 
      In this example, the page title is not set automatically
      print '<title>'.$title.'</title>';
      */
    ?>
    <link rel="stylesheet" type="text/css" href="stylesheet.css" />
    <title>Advanced svManager and SimpleViewer 2</title>
    <script type="text/javascript" src="svmanager/g1/swfobject.js"></script>
    <!-- I am linking to the swfobject script in the g1 gallery. You could also get it from the web like this:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
    -->
		<script type="text/javascript">
			var flashvars = {};
			flashvars.baseURL="/svmanager/g1/"; 
			flashvars.galleryURL = "gallery.xml";
			var params = {};			
			params.allowfullscreen = true;
			params.allowscriptaccess = "always";
			params.bgcolor = "<?php echo $backgroundColor; ?>";
			swfobject.embedSWF("/svmanager/g1/simpleviewer.swf", "flashContent", "800", "600", "9.0.124", false, flashvars, params);
		</script>

    <style type="text/css">	    
    </style>
  </head>
  <body onload="this.focus();">
    <div id="wrapper">
      <h1>Embedding an svManager/SimpleViewer 2 gallery in your home page</h1>
      <p>Home | <a href="instructions.php">Instructions</a> | <a href="source.php">Source code</a></p>
      <p style="background-color: #FFFF99; padding: 10px 0 10px 0">NOTE: SimpleViewer has been <a href="http://www.simpleviewer.net/simpleviewer/support/upgrade.html">upgraded to version 2.0</a>. This document applies to <strong>SimpleViewer 2.0</strong>. Other examples are available for <a href="http://svm1.jhardie.com">SimpleViewer&nbsp;1.9</a> and <a href="http://tv1.jhardie.com">TiltViewer</a>. AutoViewer and PostcardViewer work in a similar way to the TiltViewer example.</p>
      <p>This example is aimed at people who are already familiar with <a href="http://www.simpleviewer.net/simpleviewer/">SimpleViewer</a> and <a href="http://www.simpleviewer.net/svmanager/">svManager</a>.</p>
      <p><a href="instructions.php">Instructions</a> are on a separate page. To see how this page works, <a href="source.php">look at the source code.</a></p>
    	<div id="flashContent">SimpleViewer requires JavaScript and the Flash Player. <a href="http://www.adobe.com/go/getflashplayer/">Get Flash.</a>.
	    </div>
  	  <p>If there is anything that&rsquo;s not clear then please post a question on the <a href="http://www.simpleviewer.net/forum/index.php">svManager forum</a>.</p>
      <p>jack</p>
  	</div>
  </body>
</html>