PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Submissions (http://www.phpdig.net/forum/forumdisplay.php?f=24)
-   -   libs/search_function.php extended and beautified (http://www.phpdig.net/forum/showthread.php?t=1569)

blueyed 12-03-2004 03:10 AM

libs/search_function.php extended and beautified
 
1 Attachment(s)
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.

blueyed 12-13-2004 04:02 AM

updated to 1.8.5
 
1 Attachment(s)
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:

Code:

$path_exclude = array();
if( X )
{
        $path = 'XXX/%';
}
elseif( Y )
{
        $path = 'YYY/%';
}
else
{
        $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.


All times are GMT -8. The time now is 03:35 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.