![]() |
|
![]() |
#1 |
Green Mole
Join Date: Sep 2005
Posts: 4
|
![]()
Hi
I have installed phpdig to my site: http://www.aboutautism.org.uk/phpDig/search.php I have created a basic page with the form from the documentation page: http://www.aboutautism.org.uk/test.htm I have a search results page: http://www.aboutautism.org.uk/search.htm Is there a way in which I can target the search queerys from my form to appear in my results page? I would like to incorporate the form into my default template so that it is available on all pages. |
![]() |
![]() |
![]() |
#2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Does this thread get the results that you want?
__________________
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. |
![]() |
![]() |
![]() |
#3 |
Green Mole
Join Date: Sep 2005
Posts: 4
|
Thanks, yes this has helped
Thank you.
The form is now posting correctly, but it still brings up the search results in a new window, I think my problem is that I am using iframes as opposed to normal frames. My form is thus: <form action="http://www.aboutautism.org.uk/phpDig/search.php" target="search_results_frame" method="post"> <input type="text" name="query_string" value=""> <input type="submit" name="search" value="Go"> </form> I have set $result['form_head'] = "<form target='search_results_frame' action='$result_page' method='post'> in the three locations within phpdig_functions.php as suggested. I have created a search page, search.htm which contains an <iframe> which I have called 'search' using the 'name' function. When I submit on my test page (test.htm) I need the search to appear within the <iframe> that exists within search.htm. Is this possible? Thanks Martin |
![]() |
![]() |
![]() |
#4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
When I do a search at http://www.aboutautism.org.uk/search.htm I see the search results in a frame. When I click one the the search result links, the page opens in a new window. If it is the latter you want in the same window, look for LINK_TARGET in the config file.
__________________
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. |
![]() |
![]() |
![]() |
#5 |
Green Mole
Join Date: Sep 2005
Posts: 4
|
Charter
Thanks for that - the links in the search page are now working much better I am however, still stuck with my search form that I wanted to incorporate on all of my pages (see www.aboutautism.org.uk/test.htm) Do you know if I can target my html search page ? The html search page is www.aboutautism.org.uk/search.htm Thanks for helping martin |
![]() |
![]() |
![]() |
#6 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
In test.htm find:
Code:
<form action="http://www.aboutautism.org.uk/phpDig/search.php" target="search.htm" method="post"> <input type="text" name="query_string" value=""> <input type="submit" name="search" value="Go"> </form> Code:
<script language="JavaScript"> function setCookie(name1, name2, expires, path, domain, secure) { var querynam = 'query_string'; var queryval = document.forms[name1].elements[name2].value; document.cookie= querynam + "=" + escape(queryval) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } </script> <form name="query_form" action="search.htm" method="post" onsubmit="setCookie('query_form','query_string')"> <input type="text" name="query_string" value=""> <input type="submit" name="search" value="Go"> </form> Code:
if (ALLOW_RSS_FEED) { Code:
if (strlen($query_string) == 0 && isset($_COOKIE['query_string'])) { if (strlen($_COOKIE['query_string']) > 0) { $query_string = $_COOKIE['query_string']; $_COOKIE['query_string'] = ''; } } If these changes don't work, the above may need tweaking or you can make a template like those in the templates folder.
__________________
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. |
![]() |
![]() |
![]() |
#7 |
Green Mole
Join Date: Sep 2005
Posts: 4
|
Sorted!!!
Thank you very much - this worked perfectly and I will now replicate test.htm to my main template / other pages. Martin |
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restricting search results by URL at the search form level | innerfire | How-to Forum | 3 | 08-01-2005 08:36 AM |
Pulling search results into existing search system. | satcom | How-to Forum | 2 | 05-03-2005 10:58 AM |
No most searched terms, biggest results, most 0 results, last search queries, etc. | jongag1 | How-to Forum | 6 | 04-22-2005 10:43 AM |
won't install - keeps redirecting to login page | sbrazil | Script Installation | 3 | 09-24-2004 05:47 PM |
Search on search results page not working | bforsyth | Troubleshooting | 10 | 08-20-2004 09:35 PM |