PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   Search Page (http://www.phpdig.net/forum/showthread.php?t=450)

Voldar 01-28-2004 08:28 AM

Search Page
 
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?

Charter 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?

Voldar 01-29-2004 03:48 AM

I find a solution.
Fist of all, I added into template:
PHP Code:

<input type="hidden" name="page" value="search"/> 

And modified file search_function.php:

PHP Code:

$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.

polle 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?!


All times are GMT -8. The time now is 01:25 PM.

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