NeptuneLabs FSI Viewer JS User Manual page 239

Table of Contents

Advertisement

8 FSI Viewer
1.
Defining default parameters
Be sure to provide as many recurring parameters as possible in the_
default.xml file. This way you don't have to pass these parameters via
query. The most important parameter is ImageServer, as this parameter
enables you to subsequently define image parameters using relative
addressing. If there are some images that require different parameter
values than defined in the _ default.xml file, you can still overwrite the
default setting by passing the value via query.
2. Creating image specific URLs
Be sure to have image specific data available for server scripting by using a
database, your content management system, or any other appropriate
source. You will at least need to provide the Image_Server parameter from
your data source. After collecting the image specific data from your data
source you have to build a standard HTTP query string (RFC1738)
containing the data using server side scripting ( → Using HTTP Queries ).
Generating FSI queries (fetch_fpx_image.php)
// Retrieve FPX properties for picture 1 from table
"FPX_Images"
$result = mysql_query('select
FPXSrc,FPXHeight,FPXWidth,TilesX,TilesY
from FPX_Images where PictureID=1');
if ($result) {
// Fetch SQL data
$fpx_parameter=mysql_fetch_assoc($result);
if ($fpx_parameter){
// RFC1738 parameter encoding
foreach ($fpx_parameter as $fpx_key => $fpx_val) {
$query_collection[]= $fpx_key.'='.
rawurlencode($fpx_val);
}
// Make one large query string
$fsi_query=implode('&', $query_collection);
// Add Query to FSI Viewer URL
$fsi_url='fsi.swf?'.$fsi_query;
}
}
3. Creating the HTML-Code dynamically
Create a variable that contains the <object> and <embed> tag with all
variables provided as script variables. Replace all variables inside the
239
NeptuneLabs - FSI Viewer

Advertisement

Table of Contents
loading

Table of Contents