Green Mole
Join Date: Jun 2004
Location: Oklahoma, U.S.A.
Posts: 19
|
To prevent an inconvenience, I purposely made the text smaller.
Well, I managed to follow the directions that I found on that thread. However, I somehow managed to mess up in using my Web site template for the search pages. I'll try to be as descriptive as possible, so people can see exactly where I went wrong and hopefully offer a possible solution. First, http://www.destroyerx.net/staff.php is one of the pages of my new Web site layout that I'm working on. Here's the coding I used for search_function.php that was suggested to put in:
function get_my_includes($filename) {
if (file_exists($filename)) {
$buffer = "";
$handle = fopen($filename, "r");
while (!feof($handle)) {
$buffer .= fgets($handle, 4096);
}
fclose($handle);
return $buffer;
}
}
// check that the paths are correct or use full paths
$my_page_header = includes("/home/destroyerx/search/templates/destroyerx/header.php");
$my_page_sidebar = includes("/home/destroyerx/search/templates/destroyerx/sidebar.php");
$my_page_main = includes("/home/destroyerx/search/templates/destroyerx/main.php");
$my_page_footer = includes("/home/destroyerx/search/templates/destroyerx/footer.php");
if ($template == 'array' || is_file($template)) {
$phpdig_version = PHPDIG_VERSION;
$t_mstrings = compact('my_page_header','my_page_footer','powered_by_link','title_message'
,'phpdig_version','result_message','nav_bar','ignore_message','ignore_comme
ss','pages_bar','previous_link','next_link','templates_links');
$t_fstrings = phpdigMakeForm($query_string,$option,$limite,SEARCH_PAGE,$site,$path,'templ
ate',$template);
if ($template == 'array') {
return array_merge($t_mstrings,$t_fstrings,array('results'=>$table_results));
}
else {
$t_strings = array_merge($t_mstrings,$t_fstrings);
phpdigParseTemplate($template,$t_strings,$table_results);
}
}
In my "search/templates/destroyerx" folder, I made four includes: header.php, sidebar.php, main.php, and forum.php. Since the coding for each of them can be quite lenghty, I've saved them all as text files at
http://www.destroyerx.net/search/tem...erx/header.txt
http://www.destroyerx.net/search/tem...rx/sidebar.txt
http://www.destroyerx.net/search/tem...oyerx/main.txt
http://www.destroyerx.net/search/tem...erx/footer.txt
After I made the modifications to search_function.php, I then created destroyerx.html in "/search/templates/destroyerx." Below is the HTML I used for that HTML document:
<html>
<head>
<title><phpdig:title_message/></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<phpdig:my_page_header/>
<phpdig:my_page_sidebar/>
<phpdig:my_page_main/>
<phpdig:my_page_footer/>
</body>
</html>
Once I completed that, I tried going to http://www.destroyerx.net/search/search.php, but it gave me the following error message:
Fatal error: Call to undefined function: includes() in /home/destroyerx/public_html/search/libs/search_function.php on line 594
Anyway, I was hoping if someone on the forum can offer a solution to my problem. I managed to install the search engine to my Web site just fine. The only snag I'm facing right now is customizing the template. Anyway, thank you very much everyone for your time.
Ciao for now!
__________________
Visit the Destroyer X Network at http://www.destroyerx.net/
Last edited by Destroyer X; 06-20-2004 at 09:43 PM.
|