Hi. Change header.php back to the following:
PHP Code:
<?php
echo $Navigation->getHeader();
?>
Change footer.php back to the following:
PHP Code:
<?php
echo $Navigation->getFooter();
?>
Remove the following from search.php and stick it into a new file, say makeheadfoot.php located at /home/napathon/public_html/ssi/makeheadfoot.php:
PHP Code:
/*
--------------------------------------------------------------------------------
My code goes here to incorporate my template
--------------------------------------------------------------------------------
*/
require_once '/home/napathon/public_html/class/Navigation.php';
// This goes into the meta name="description" content field
$MetaDescription = "Build your own website search engine using phpDig.";
// This goes into the meta name="keywords" content field
$MetaKeywords = "website search engine";
// This goes into the page title
$PageTitle = "Search My Website";
// This goes into the table title
$TableTitle = $PageTitle;
// Robots meta tag. Leave this as null if you don't intend to use it
$Robots = "Index, Follow";
// Instantiate the Navigation class; then build the page header and footer
$Navigation = new Navigation();
$Navigation->addHeader($HTMLTitle, $MetaDescription, $MetaKeywords, $PageTitle, $Robots);
$Navigation->addFooter();
In search_function.php move the following code to right above $timer = new phpdigTimer('html'); but inside the function:
PHP Code:
ob_start();
require("/home/napathon/public_html/ssi/header.php");
$my_header_file = ob_get_contents();
ob_end_clean();
ob_start();
require("/home/napathon/public_html/ssi/footer.php");
$my_footer_file = ob_get_contents();
ob_end_clean();
Also in search_function.php right before the first ob_start(); call but still inside the function add the following:
PHP Code:
require("/home/napathon/public_html/ssi/makeheadfoot.php");
"Inside the function" means the following:
PHP Code:
function phpdigSearch($id_connect, $query_string, $option='start', $refine=0,
$refine_url='', $lim_start=0, $limite=10, $browse=0,
$site=0, $path='', $relative_script_path = '.', $template='',
$templates_links='')
{
///////////////// stuff goes here /////////////////
$timer = new phpdigTimer('html');
$timer->start('All');
Keep the template, $t_mstrings variable, and config file the same and give it a whirl.