OK, this was a little more complicated than I originally thought it would be, but here goes.
Find the following code in config.php:
PHP Code:
if ((isset($relative_script_path)) && ($relative_script_path != ".") && ($relative_script_path != "..")) {
exit();
}
and modify it as follows:
PHP Code:
if ((isset($relative_script_path)) && ($relative_script_path != ".") && ($relative_script_path != "..") &&
($relative_script_path != "/your_complete_script_path")) {
exit();
Find the following code in config.php:
PHP Code:
//template file and style
$template = "$relative_script_path/templates/template.php";
and delete it. Add that same bit of code into search.php just before this statement:
PHP Code:
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template);
Create a file called searchbox.php and save it in the templates folder, with the following code:
Code:
<table>
<tr>
<td>
<phpdig:form_title/>
</td>
</tr>
<tr>
<td>
<phpdig:form_field/>
<phpdig:form_button/>
<phpdig:form_select/>
</td>
</tr>
<tr>
<td>
<phpdig:form_radio/>
</td>
</tr>
</table>
In the body of your page(s) that you want the phpDig search box, insert the following code:
Code:
$relative_script_path = 'full/path/to/phpdig';
include "$relative_script_path/includes/config.php";
include "$relative_script_path/admin/debug_functions.php";
include "$relative_script_path/libs/search_function.php";
// extract vars
extract(phpdigHttpVars(
array('query_string'=>'string',
'refine'=>'integer',
'refine_url'=>'string',
'site'=>'integer',
'limite'=>'integer',
'option'=>'string',
'lim_start'=>'integer',
'browse'=>'integer',
'path'=>'string'
)
));
//template file and style
$template = "$relative_script_path/templates/searchbox.php";
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template);
Please test both the new pages and your original search page, to make sure I haven't left out any steps. I don't think I did, but you never know.