View Single Post
Old 04-01-2004, 08:01 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Using the same method as above, you could include header.php, sidebar.php, and footer.php in a template, or you could also make your own custom PHP search page as follows.

In the search.php file do the following:
PHP Code:
$arrayout phpdigSearch($id_connect$query_string$option$refine,
                       
$refine_url$lim_start$limite$browse,
                       
$site$path$relative_script_path'array');

if (
is_file("custom_search.php")) {
    include 
"custom_search.php";
} else { exit(); } 
Save the following in the same directory as the search.php file:
PHP Code:
<?php
// custom_search.php

if (eregi("custom_search.php",$_SERVER['SCRIPT_FILENAME']) || 
    
eregi("custom_search.php",$_SERVER['REQUEST_URI'])) {
    exit();
}

echo 
"<html><body>";

echo 
$arrayout['result_message'],
     
$arrayout['powered_by_link'],
     
$arrayout['title_message'],
     
$arrayout['phpdig_version'],
     
$arrayout['nav_bar'],
     
$arrayout['pages_bar'],
     
$arrayout['next_link'],
     
$arrayout['form_head'],
     
$arrayout['form_title'],
     
$arrayout['form_field'],
     
$arrayout['form_select'],
     
$arrayout['form_button'],
     
$arrayout['form_radio'],
     
$arrayout['form_foot'];

if (!empty(
$arrayout['results'])) {
    
$num_out count($arrayout['results']);
} else { 
$num_out 0; }
$num_start $lim_start 1;
$num_end $lim_start $num_out;

for (
$i=$num_start$i<=$num_end$i++) {
     echo 
$i.". ";
     
$arrayout2 $arrayout['results'][$i];
     echo 
$arrayout2['weight'],
          
$arrayout2['img_tag'],
          
$arrayout2['page_link'],
          
$arrayout2['limit_links'],
          
$arrayout2['filesize'],
          
$arrayout2['update_date'],
          
$arrayout2['complete_path'],
          
$arrayout2['link_title'],
          
$arrayout2['text'];
     echo 
"<br><br>";
}

echo 
"</body></html>";

?>
Remember to remove any "word" wrapping in the above code.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote