View Full Version : libs/search_function.php extended and beautified

12-03-2004, 03:10 AM
I've enhanced the phpdigSearch() function to allow $path_exclude!

Apart from that $path (and the new $path_exclude) might be arrays.

I needed this for the site where we're using phpdig and while doing this I reformatted/beautified the whole file.

I hope this is useful and suggest using BeyondCompare (or some other comparing program as powerful) to merge this file.

The original file was based on 1.8.3 and I hope the changes make it into the next release.

Thank you.

12-13-2004, 04:02 AM
Merged the file with version 1.8.5

I have not thoroughly tested the new functionality of path and excludepath.

It would be nice if this makes it into the next release. Probably the search.php (and form functions) need adjustments (to serialize the array in hidden fields etc).

We use it here from our customized search.php file like this:

$path_exclude = array();
if( X )
$path = 'XXX/%';
elseif( Y )
$path = 'YYY/%';
$path_exclude = array( 'XXX/%', 'YYY/%' );

and call phpdigSearch then.

This way we exclude certain paths when we are not in that subpage and only use the special path for this subpages when we are in them.