View Full Version : Search Page

01-28-2004, 08:28 AM
I'm trying to make PhpDig work with my site. Everything is fine, except for displaying search results.
My site engine use URL-s like index.html?page=pagename. On page index.html?page=search I inserted PhpDig search form (using $relative_script_path). But even if I change define('SEARCH_PAGE','index.html?page=search'); when I press "Go" browser go to index.html?site=0&path=&result_page=index.html%3Fpage%3Dsearch
How can I fix this?

01-28-2004, 10:35 AM
Hi. With 'index.html?page=search' you might end up with things like 'index.html?page=search?some=more&stuff=here' for links. What's the link to your search page or the HTML for the PhpDig part of the search page?

01-29-2004, 03:48 AM
I find a solution.
Fist of all, I added into template:
<input type="hidden" name="page" value="search"/>
And modified file search_function.php:

$delimiter = (strpos(SEARCH_PAGE, '?') === false)?'?':'&';
$url_bar = SEARCH_PAGE.$delimiter."browse blah-blah-blah"
$l_site = "<a class='phpdig' href='".SEARCH_PAGE.$delimiter."refine blah-blah-blah"
$l_path = ", ".phpdigMsg('this_path')." : <a class='phpdig' href='".SEARCH_PAGE.$delimiter."refine blah-blah-blah"

So even if SEARCH_PAGE is set to 'index.htlm?page=search' everything works fine.

03-23-2004, 02:07 PM
could you please tell a little bit more, how you did this and especially where you added/replaced the code?!