Topic: embedding into php page?

i can't figure out what to substitute in the vertical template index.html page to get what i want: a simpleviewer between header and footer images and menus. the site was put together by someone else using php. what do i change?

here is the existing page code:

<?php include('../_header.php') ?>

    <div align="center" id="flashcontent">
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    simpleviewer.ready(function () {
        simpleviewer.load('sv-container', '100%', '400', '222222', true);
    <div id="sv-container"></div>


<?php include('../_footer.php') ?>

and here is the template code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" lang="en" xml:lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" media="screen" href="../css/sv.vertical.template.css" />
    <title>SimpleViewer Gallery 1</title>
    <script type="text/javascript">
    var svCoreURL = '../svcore/';
    <script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="../svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    function doLayout() {
        var winHeight, headerHeight, footerHeight;
        winHeight = window.innerHeight ? window.innerHeight : $(window).height();
        headerHeight = $('#header').outerHeight();
        footerHeight = $('#footer').outerHeight();
        var newH = parseInt(winHeight) - parseInt(headerHeight) - parseInt(footerHeight);

    $(document).ready(function () {
        $(window).bind('resize', doLayout);
        SV.simpleviewer.load('sv-container', '100%', '100%', '222222',true);

    <div id="header">
        <a href = "../gallery1/index.html">Gallery 1</a> | <a href = "../gallery2/index.html">Gallery 2</a>    

    <div id="flashContent">
        <div id="sv-container"></div>

    <div id="footer">This is the footer.</div>


i had to use the fixed height of 400 in the existing code to keep from having the thumbnails cut off and a tiny image in the viewer. changing to a value of 400 seems to fix that but i'd like something a little more flexible with all the different viewing platforms available now.

thanks for any help.

Re: embedding into php page?

It would appear that your 'header.php' and 'footer.php' files contain elements such as the web page's Doctype Declaration and opening and closing <html>, <head> and <body> tags so, although it would be possible to manually merge the files, it would not be a case of simply substituting the 'header' <div> in the template with your 'header.php' file (and likewise for the footer).
You would likely need to remove the Doctype Declaration from your 'header.php' file, split the file into two and include the <head> contents from the file in the <head> section of the template and replace the header <div> in the template with the <body> contents from the file.
You would also need to change the file extension of the template file to '.php' as you would be using PHP within it.
Finally, you would need to specify fixed heights for your header and footer in the 'vertical-template/css/sv.vertical.template.css' file.

Steven Speirs
SimpleViewer Support Team

Re: embedding into php page?

thanks, stephen.

all that would screw up all of the pages that don't use simpleviewer so,
i guess, i'll have to stick with the more limited version i've been testing.

thanks again,