Topic: How do I link directly to a specific image in a gallery?
I upgraded to Simpleviewer Pro 2 from the free version. I was hoping to be able to link to a specific image within the gallery. I understand that you can change the "firstimageindex" but I do want the gallery to start at 0. However, I want to be able to link to a specific image within the gallery. I tried pasting the code from an HTML document to a PHP document and adding:
<!-- saved from url=(0014)about:internet -->
<!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" lang="en" xml:lang="en">
<head>
<title>Photo Gallery</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery.xml";
var params = {};
params.allowfullscreen = true;
params.allowscriptaccess = "always";
params.bgcolor = "222222";
swfobject.embedSWF("simpleviewer.swf", "flashContent", "100%", "100%", "9.0.124", false, flashvars, params);
</script>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "100%", "600", "8", "#000000");
<?php
foreach($_GET as $variable => $value) {
echo "fo.addVariable('firstImageIndex', '$value');";
}
?>
// SIMPLEVIEWER CONFIGURATION OPTIONS
// To use an option, uncomment it by removing the "//" at the start of the line
// For a description of config options, go to:
// http://www.airtightinteractive.com/simp … tions.html
//fo.addVariable("xmlDataPath", "gallery.xml");
//fo.addVariable("langOpenImage", "Open Image in New Window");
//fo.addVariable("langAbout", "About");
//fo.addVariable("preloaderColor", "0xFFFFFF");
fo.write("flashcontent");
</script>
<style type="text/css" media="screen">
html, body { height:100%; }
body {
margin:0;
padding:0;
overflow:hidden;
background-color: #222;
color:#666;
font-family:sans-serif;
font-size:20px;
}
a {
color:#ff0000;
}
</style>
</head><body><div id="flashContent">SimpleViewer requires JavaScript and the Flash Player. <a href="http://get.adobe.com/flashplayer/">Get Flash</a></div></body>
</html>
For example on Simpleviewer gallery: http://simpleviewer.net/simpleviewer/su … .php?id=10
I tried typing "?id=10" at the end of my URL but it didn't go to the 10th image, but instead went to the first image.