PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 03-03-2004, 07:20 AM   #1
atticus1214
Green Mole
 
Join Date: Feb 2004
Posts: 2
"limit to" option on form page?

hi i just want to say that i am very impressed with preformance of this search engine. i had one question though. i have a sub navigation menu, on the menu i have add the search function as so:
PHP Code:
<form action='http://mywebsite.com/search/search.php' target="template_content" method='get'>
<
input type='hidden' name='template_demo' value=''/>
<
input type='hidden' name='site' value=''/>
<
input type='hidden' name='path' value=''/>
<
input type='hidden' name='result_page' value='search.php'/>
<
input class='liwords' type='text' name='query_string'/>  
<
input class='liwords' type='submit' name='search' value='Search'/>
</
form
what i would like to do is give the user the ablity to search the whole site (which it does at this point) or select "search this directory only" which would give results for the current folder and everything under. i know this option is avalible from the results page but i would like to give the option from the search prompt. i figure it has something to do with the script above labeled "name='path'" but i am unsure of the syntax. any support would be greatly appreciated.

thank you,
atticus1214

oh yeah - my search engine is on a different webhost, so relative path stuff doesn't really work.
(i dont really know what i'm talking about - relative path is like "../../foldername" right?)

Last edited by atticus1214; 03-03-2004 at 07:43 AM.
atticus1214 is offline   Reply With Quote
Old 03-03-2004, 11:12 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Perhaps the code in this thread will help.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 03-03-2004, 12:59 PM   #3
atticus1214
Green Mole
 
Join Date: Feb 2004
Posts: 2
in the part that i add to function_phpdig_form.php were do i specify what path to search. i want the drop down menu to default at "www.mysite.com/library" on the library page but on the downloads page to default to "www.mysite.com/downloads." however on both pages i want the user to be able to select "Search Whole Site" searching "www.mysite.com"

i read the post at the link you gave and that sounds very close to what i want to do but i am not using an array (that i know of - i didnt make any changes to the script in that fashion). also the form is not on the template html page. it is on a subnavigation frame and the results dispay on a results_content frame. it is very possible that the script you are reffering to is exactly what in need, however i guess i dont understand how to apply it to my specific needs.

thank you for your time,
atticus1214
atticus1214 is offline   Reply With Quote
Old 03-03-2004, 02:05 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Not tested, but you could try to add a switch statement right before the phpdigSearch function call in the search.php file, where the variable used is one of the server predefined variables. As for code to do this, I just don't have the time to continue coding individual requests. Perhaps another member would be willing to code this for you.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shows blank page if "Search All" and "exact phrase", timeout? alokjain9 Troubleshooting 2 03-07-2006 08:08 AM
How can I re-name name="option"? chris33 How-to Forum 4 04-19-2005 08:41 AM
Re-indexing a page, "boosting" pages Kozz How-to Forum 2 04-06-2005 02:32 PM
"1 1" between page header and search result jensb Troubleshooting 2 01-13-2005 02:37 PM
"search depth" and "links per" features laurentxav How-to Forum 1 01-12-2005 08:27 PM


All times are GMT -8. The time now is 06:54 AM.


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